You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to build dav1d for Android and I am running in the following error
$ meson setup --prefix=... --libdir=... --default-library=static --cross-file meson-cross-file.txt path
The Meson build system
Version: 1.6.0
Source dir: ...
Build dir: ...
Build type: cross build
Project name: dav1d
Project version: 0.9.0
C compiler for the host machine: /opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/bin/clang (clang 17.0.2 "Android (11349228, +pgo, +bolt, +lto, -mlgo, based on r487747e) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)")
C linker for the host machine: /opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/bin/clang ld.lld 17.0.2
Compiler for language c for the build machine not found.
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: aarch64
Host machine cpu: aarch64
Target machine cpu family: aarch64
Target machine cpu: aarch64
Run-time dependency threads found: YES
Checking for function "clock_gettime" : NO
Library rt found: NO
Checking for function "clock_gettime" with dependency -lrt: NO (cached)
../../dav1d-src/meson.build:142:12: ERROR: Problem encountered: clock_gettime not found
A full log can be found at path/meson-log.txt
The meson-log.txt file contains further information
Using cached compile:
Cached command line: /opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/bin/clang .../_deps/dav1d-build/Debug/meson-private/tmpaacak3kg/testfile.c -o .../_deps/dav1d-build/Debug/meson-private/tmpaacak3kg/output.exe --sysroot=/opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/sysroot -D_FILE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration -std=c99 -D_GNU_SOURCE
Code:
#include <time.h>
int main(void) {
/* With some toolchains (MSYS2/mingw for example) the compiler
* provides various builtins which are not really implemented and
* fall back to the stdlib where they aren't provided and fail at
* build/link time. In case the user provides a header, including
* the header didn't lead to the function being defined, and the
* function we are checking isn't a builtin itself we assume the
* builtin is not functional and we just error out. */
#if !0 && !defined(clock_gettime) && !0
#error "No definition for __builtin_clock_gettime found in the prefix"
#endif
#ifdef __has_builtin
#if !__has_builtin(__builtin_clock_gettime)
#error "__builtin_clock_gettime not found"
#endif
#elif ! defined(clock_gettime)
__builtin_clock_gettime;
#endif
return 0;
}
Cached compiler stdout:
Cached compiler stderr:
In file included from .../_deps/dav1d-build/Debug/meson-private/tmpaacak3kg/testfile.c:1:
In file included from /opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/time.h:37:
In file included from /opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/time.h:33:
In file included from /opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/types.h:36:
/opt/android/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
^~~~~~~~~~~~~
1 error generated.
Hi, I am trying to build dav1d for Android and I am running in the following error
The
meson-log.txt
file contains further informationThe meson config file looks like this
Apparently, meson shouldn't be trying to link with -lrt on Android: https://code.videolan.org/videolan/dav1d/-/merge_requests/854.
Any idea about how to fix this? Thanks.
The text was updated successfully, but these errors were encountered: