Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker fails to find Android logger #1126

Open
MajorMurphy opened this issue Feb 10, 2024 · 0 comments · May be fixed by #1127
Open

Linker fails to find Android logger #1126

MajorMurphy opened this issue Feb 10, 2024 · 0 comments · May be fixed by #1127

Comments

@MajorMurphy
Copy link

MajorMurphy commented Feb 10, 2024

Running build-android-libs.sh fails with the following error

[ 79%] Linking CXX executable encode ld: error: undefined symbol: __android_log_write referenced by catch.hpp:10374 (/home/vboxuser/GitHub/project/externals/libheif/tests/catch.hpp:10374) CMakeFiles/encode.dir/main.cc.o:(Catch::Detail::(anonymous namespace)::StreamBufImpl<Catch::Detail::(anonymous namespace)::OutputDebugWriter, 256u>::sync()) referenced by catch.hpp:10374 (/home/vboxuser/GitHub/project/externals/libheif/tests/catch.hpp:10374) CMakeFiles/encode.dir/main.cc.o:(Catch::Detail::(anonymous namespace)::StreamBufImpl<Catch::Detail::(anonymous namespace)::OutputDebugWriter, 256u>::overflow(int)) clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [tests/CMakeFiles/encode.dir/build.make:146: tests/encode] Error 1 make[1]: *** [CMakeFiles/Makefile2:937: tests/CMakeFiles/encode.dir/all] Error 2 make: *** [Makefile:166: all] Error 2

This can be fixed with the cmake argument:
-DCMAKE_CXX_STANDARD_LIBRARIES="-llog"

NDK version: 25.2.9519653
Min API level: 24

@MajorMurphy MajorMurphy linked a pull request Feb 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant