Project

General

Profile

"Undefined reference to sin" and "Undefined reference to crypt" errors prevent successful build of Wt on Linux 22.04 vps

Added by Michael Knight 2 days 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':
CheckFunctionExists.c:(.text+0x17): undefined reference to
sin'
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':
CheckFunctionExists.c:(.text+0x17): undefined reference to
crypt'
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