Skip to content

Errors when compiling #38

@lufinkey

Description

@lufinkey

I'm trying to build this library to include in my build of ffmpeg, and I've been running into some issues.

  • The first issue I ran into was that the typeof keyword wasn't defined by the clang compiler. I found I could fix this by adding -std=gnu2x as a flag to CFLAGS.
  • The next issue I ran into was that malloc was actually pointing to a macro that defined it as rpl_malloc. I found a stackoverflow post that mentioned this could be fixed by defining ac_cv_func_malloc_0_nonnull=yes and ac_cv_func_realloc_0_nonnull=yes as environment variables.
  • The last issue I'm running into is that I get an error about duplicate symbols between run_dummy_icd_through_our_ICDL-run_dummy_icd.o and libOpenCL_la-ocl_icd_loader.o, and between run_dummy_icd_through_our_ICDL-run_dummy_icd_weak_gen.o and libOpenCL_la-ocl_icd_loader_gen.o.

Here are the commands I'm using to build the library:

./bootstrap || return 1

CFLAGS="$CFLAGS -std=gnu2x" \
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
./configure \
  --prefix="${LIB_INSTALL_PREFIX}" \
  --enable-pic \
  --with-sysroot="${ANDROID_SYSROOT}" \
  --enable-static \
  --enable-fast-install \
  --disable-shared \
  --disable-debug \
  --host="${HOST}" || return 1

make || return 1

Any help would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions