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' when install #1

Closed
touala opened this issue Dec 27, 2017 · 1 comment
Closed

Undefined reference to `clock_gettime' when install #1

touala opened this issue Dec 27, 2017 · 1 comment

Comments

@touala
Copy link

touala commented Dec 27, 2017

Hi,

I got the following error when installing:

$ g++ -std=c++11 -O3  src/sptree.cpp src/tsne.cpp src/nbodyfft.cpp  -o bin/fast_tsne -pthread -lfftw3 -lm
/tmp/cczspn62.o: In function `TSNE::run(double*, int, int, double*, int, double, double, int, bool, int, int, int, int, double, int, int, double, double*, double*, bool, int, double, int, int)':
tsne.cpp:(.text+0x8698): undefined reference to `clock_gettime'
tsne.cpp:(.text+0x8c8b): undefined reference to `clock_gettime'
tsne.cpp:(.text+0x9be8): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status

You can fix that by adding -lrt during compilation.

@touala touala closed this as completed Dec 27, 2017
@linqiaozhi
Copy link
Member

Thanks so much! It looks like this is an issue for glibc versions <2.17. So for users with older versions of glibc, this is very helpful.

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