Bug #373
Build failed on Fedora 18 64-bit
Description
Hello,
First of all thank you for the strongSwan 5.1.0. So, I just tried to build v5.1.0 on my Fedora 18 (fully updated), but it failed.
Build options: configure --prefix=/usr
Error code:
gcc -DHAVE_CONFIG_H -I. -I.././strongswan-5.1.0/scripts -I.. -I.././strongswan-5.1.0/src/libstrongswan -I.././strongswan-5.1.0/src/libtls -DPLUGINS="\"aes des rc2 sha1 sha2 md5 random x509 pkcs1 pkcs7 pkcs8 pkcs12 pem gmp hmac\"" -g -O2 -Wall -Wno-format -Wno-pointer-sign -include /root/rpmbuild/SOURCES/config.h -MT malloc_speed.o -MD -MP -MF .deps/malloc_speed.Tpo -c -o malloc_speed.o .././strongswan-5.1.0/scripts/malloc_speed.c
mv -f .deps/malloc_speed.Tpo .deps/malloc_speed.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -Wno-format -Wno-pointer-sign -include /root/rpmbuild/SOURCES/config.h -L/usr/lib -o malloc_speed malloc_speed.o ../src/libstrongswan/libstrongswan.la
libtool: link: gcc -g -O2 -Wall -Wno-format -Wno-pointer-sign -include /root/rpmbuild/SOURCES/config.h -o .libs/malloc_speed malloc_speed.o -L/usr/lib ../src/libstrongswan/.libs/libstrongswan.so -Wl,-rpath -Wl,/usr/lib/ipsec
/bin/ld: malloc_speed.o: undefined reference to symbol 'clock_gettime@GLIBC_2.2.5'
@GLIBC_2.2.5' is defined in DSO /lib64/librt.so.1 so try adding it to the linker command line
/bin/ld: note: 'clock_gettime
/lib64/librt.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make2: * [malloc_speed] Error 1
make2: Leaving directory `/root/rpmbuild/SOURCES/scripts'
make1: [all-recursive] Error 1
make1: Leaving directory `/root/rpmbuild/SOURCES'
make: ** [all] Error 2
Please, let me know if you need more info.
regards,
/WS
History
#1 Updated by Martin Willi almost 9 years ago
- Status changed from New to Closed
- Assignee set to Martin Willi
- Target version set to 5.1.1
- Resolution set to Fixed
Hi,
/bin/ld: malloc_speed.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
See [1], the patch at [2] should fix the problem.
Please be aware that you have to run autotools to update the Makefile. Alternatively you may just --disable-scripts to succeed with the build, these are usually not required.
Regards
Martin
[1]https://lists.strongswan.org/pipermail/dev/2013-August/000898.html
[2]http://git.strongswan.org/?p=strongswan.git;a=commitdiff;h=62e1c808