Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `clock_gettime' #10

Closed
haipome opened this issue Jul 28, 2015 · 1 comment
Closed

undefined reference to `clock_gettime' #10

haipome opened this issue Jul 28, 2015 · 1 comment

Comments

@haipome
Copy link

haipome commented Jul 28, 2015

Linking CXX executable qconf_agent
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-timeval.o): In function curlx_tvnow': timeval.c:(.text+0xf): undefined reference toclock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [agent/qconf_agent] Error 1
make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2
make: *** [all] Error 2

I think there should hava -lrt in makefile, but I don't know how to fix this.

@CatKang
Copy link
Contributor

CatKang commented Jul 28, 2015

The error occurs in the build process of curl in CMAKE procedure by the commands bellow:

./configure --prefix=${PROJECT_SOURCE_DIR}/../deps/curl/_install --disable-ldap
--disable-ldaps --without-ssl --without-zlib --without-libidn
make
make install

${PROJECT_SOURCE_DIR} is where the "agent" source code located

You can performing this manually and add -lrt in the Makefile.
And remove line from 51 to 58 in QConf/agent/CMakeLists.txt accordingly.

Let me know if there still having trouble after that

@CatKang CatKang closed this as completed Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants