"Undefined reference to sin" and "Undefined reference to crypt" errors prevent successful build of Wt on Linux 22.04 vps
Added by Michael Knight about 2 months ago
I reinstalled the image as Linux 22.04 on a vps.I am using Clang 11 as compiler.I have installed boost and Openssl 3.
The build process stops at &61. The errors are:
/usr/bin/clang-11 -DCHECK_FUNCTION_EXISTS=sin -o CMakeFiles/cmTC_195b9.dir/CheckFunctionExists.c.o -c /opt/cmake-3.13>
/opt/cmake-3.13.5-Linux-x86_64/share/cmake-3.13/Modules/CheckFunctionExists.c:7:3: warning: incompatible redeclaration of l>
CHECK_FUNCTION_EXISTS(void);
^
:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS sin
^
/opt/cmake-3.13.5-Linux-x86_64/share/cmake-3.13/Modules/CheckFunctionExists.c:7:3: note: 'sin' is a builtin with type 'doub>
:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS sin
^
1 warning generated.
Linking C executable cmTC_195b9
/opt/cmake-3.13.5-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_195b9.dir/link.txt --verbose=1
/usr/bin/clang-11 -DCHECK_FUNCTION_EXISTS=sin CMakeFiles/cmTC_195b9.dir/CheckFunctionExists.c.o -o cmTC_195b9
/usr/bin/ld: CMakeFiles/cmTC_195b9.dir/CheckFunctionExists.c.o: in function main':sin'
CheckFunctionExists.c:(.text+0x17): undefined reference to
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_195b9.dir/build.make:87: cmTC_195b9] Error 1
gmake[1]: Leaving directory '/home/jack/wt-4.11.4/build/CMakeFiles/CMakeTmp'
Run Build Command:"/usr/bin/gmake" "cmTC_c408f/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_c408f.dir/build.make CMakeFiles/cmTC_c408f.dir/build
gmake[1]: Entering directory '/home/jack/wt-4.11.4/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c408f.dir/CheckFunctionExists.c.o
/usr/bin/clang-11 -DCHECK_FUNCTION_EXISTS=crypt -o CMakeFiles/cmTC_c408f.dir/CheckFunctionExists.c.o -c /opt/cmake-3.>
Linking C executable cmTC_c408f
/opt/cmake-3.13.5-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c408f.dir/link.txt --verbose=1
/usr/bin/clang-11 -DCHECK_FUNCTION_EXISTS=crypt CMakeFiles/cmTC_c408f.dir/CheckFunctionExists.c.o -o cmTC_c408f
/usr/bin/ld: CMakeFiles/cmTC_c408f.dir/CheckFunctionExists.c.o: in function main':crypt'
CheckFunctionExists.c:(.text+0x17): undefined reference to
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_c408f.dir/build.make:87: cmTC_c408f] Error 1
gmake[1]: Leaving directory '/home/jack/wt-4.11.4/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_c408f/fast] Error 2
Replies (4)
RE: "Undefined reference to sin" and "Undefined reference to crypt" errors prevent successful build of Wt on Linux 22.04 vps - Added by Michael Knight about 1 month ago
Although I linked the libraries, it still halts on 61% or something.But I no longer think that failure to build is caused by "sin" or "crypt" functions.I used "dmesg" on linux and it indicates that it gets out of memory while building.I tried using Ubuntu on my Windows pc and it builded without any problem ,the same version of Wt, using same versions of cmake, gcc and boost, although it give the same sin and crypt function errors, still it built the whole Wt without any problems.So it seems like my vps' 1 gb of memory is not enough to build wt from source.
I was able to solve the issue by compiling the files on Ubuntu on my Windows and then transferring them to the Ubuntu vps.
RE: "Undefined reference to sin" and "Undefined reference to crypt" errors prevent successful build of Wt on Linux 22.04 vps - Added by Michael Knight about 1 month ago
And thanks for creating this great Wt framework.
RE: "Undefined reference to sin" and "Undefined reference to crypt" errors prevent successful build of Wt on Linux 22.04 vps - Added by Matthias Van Ceulebroeck 11 days ago
Hi Michael,
apologies for the delay, but happy to hear the issue resolved itself.
Generally I do think 1GB is low, I do find it strange this results in such an error.
Enabling swap will likely alleviate it, and allow you to build on the machine.
RE: "Undefined reference to sin" and "Undefined reference to crypt" errors prevent successful build of Wt on Linux 22.04 vps - Added by Michael Knight 8 days ago
Thanks for your answer.
Actually I had tried enabling swap, but I was not able to do it succesfully because storage capacity also was very limited on the server.I switched to a new account with 2 gb memory and 80gb sdd, now I haven't tried to build Wt on it yet but if 2 gb memory causes problem I can enable swapping, thanks to much larger storage capacity than previous one.