Menu

#3 [ Compilation ] Link problem on 64bits.

v1.0 (example)
open
None
5
2015-10-13
2015-10-13
No

link problem on 64bits architecture.

patch needed:

--- configure.ac (revision 110)
+++ configure.ac (working copy)
@@ -10,6 +10,7 @@
AC_CHECK_DECL(linux,
AC_CHECK_LIB(sctp, sctp_sendmsg, [LIBS="$LIBS -lsctp"
, [AC_MSG_ERROR(unresolved symbol)])
AC_CHECK_LIB(rt, clock_gettime, [LIBS="$LIBS -lrt"], [AC_MSG_ERROR(unresolved symbol)])
+ AC_CHECK_LIB(pthread, sem_post, [LIBS="$LIBS -lpthread"], [AC_MSG_ERROR(unresolved symbol)])
])

AC_CHECK_LIB(lzo2, [lzo1x_decompress], [LIBS="$LIBS -llzo2"], [AC_MSG_ERROR(function not found)])

LOG_TRACES:
gcc -DHAVE_CONFIG_H -I. -I.. -I../../include -g -O2 -MT lock.o -MD -MP -MF .deps/lock.Tpo -c -o lock.o test -f '../../common/lock.c' || echo './'../../common/lock.c
mv -f .deps/lock.Tpo .deps/lock.Po
gcc -I../../include -g -O2 -o clarac provider.o provider_device.o query.o opencl_device.o opencl_context.o opencl_cmdqueue.o opencl_memobj.o opencl_program.o opencl_kernel.o opencl_event.o aux.o net.o block.o stream.o api.o rpc_server.o map.o alloc.o rb.o set.o lock.o -lsctp -lrt -llzo2 -lOpenCL
/usr/bin/ld: lock.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: [clarac] Error 1
make[2]: Leaving directory /home/jmo/clara-code/provider/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/jmo/clara-code/provider'
make:
[all] Error 2

Discussion


Log in to post a comment.