piernov / hopmod

Automatically exported from code.google.com/p/hopmod
2 stars 2 forks source link

install linking prob #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Trying to install hopmod
2.using the compile.sh
3.

What is the expected output? What do you see instead?

 56%] Building CXX object src/CMakeFiles/luapp.dir/hopmod/luapp.cpp.o
Linking CXX executable luapp
libsauertools.a(utils.cpp.o): In function `timer::timer()':
utils.cpp:(.text+0x319): undefined reference to `clock_gettime'
libsauertools.a(utils.cpp.o): In function `timer::usec_elapsed() const':
utils.cpp:(.text+0x335): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [src/luapp] Error 1
make[1]: *** [src/CMakeFiles/luapp.dir/all] Error 2
make: *** [all] Error 2
libsauertools.a(utils.cpp.o): In function `timer::timer()':
utils.cpp:(.text+0x319): undefined reference to `clock_gettime'
libsauertools.a(utils.cpp.o): In function `timer::usec_elapsed() const':
utils.cpp:(.text+0x335): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [src/luapp] Error 1
make[1]: *** [src/CMakeFiles/luapp.dir/all] Error 2
make: *** [all] Error 2

Took 130 Seconds

What version of the product are you using? On what operating system?
Ubuntu

Please provide any additional information below.
Thanx
Matthew

Original issue reported on code.google.com by matthews...@gmail.com on 26 Nov 2011 at 9:20

GoogleCodeExporter commented 9 years ago
Same problem here, Ubuntu 11.10

Original comment by arnusc...@xylon.de on 2 Dec 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Apply this patch:

Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt  (revision 2487)
+++ src/CMakeLists.txt  (working copy)
@@ -46,6 +46,7 @@
     hopmod/net/address_prefix.cpp)

 add_library(sauertools STATIC ${SAUERTOOLS_SOURCES})
+target_link_libraries(sauertools -lrt)

 set(LUA_MODULES_SOURCES
     hopmod/lua/crypto.cpp

Original comment by arnusc...@xylon.de on 4 Dec 2011 at 1:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
How to apply patch?

Original comment by aquaincu...@gmail.com on 20 May 2012 at 1:52