Compile failing on Termux
M-Gonzalo opened this issue · 3 comments
Up to a few months back, I could compile it just fine but now I'm getting this error:
[ 1%] Built target simd
[ 4%] Built target genfiles
[ 4%] Built target lodepng
[ 6%] Built target miniz
[ 7%] Built target leanify
[ 15%] Built target zopfli
[ 26%] Built target zlib
[ 43%] Built target png_static
[ 90%] Built target jpeg-static
[ 95%] Built target optipng
[ 95%] Linking CXX executable ect
/data/data/com.termux/files/usr/bin/ld: cannot find -lM_LIBRARY-NOTFOUND
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/ect.dir/build.make:185: ect] Error 1
make[1]: *** [CMakeFiles/Makefile2:284: CMakeFiles/ect.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Any clue as about what is the problem? I have nasm installed
This might be hard to diagnose with the provided information, but it looks like CMake had trouble finding a library. Boost comes to mind, so make sure that you have it installed or set up your build to not use boost. If that does not work, try to build with VERBOSE=1 make
, this should provide more output – likely more than necessary, but it should reveal which library is causing these issues.
Found it! It was libm, for libpng. For some reason cmake couldn't find it.
I fixed it by changing find_library
to set
on src/libpng/CMakeLists.txt
.
It was actually the idea of this people
Glad you got it to work!