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

clock_gettime(CLOCK_MONOTONIC, &tp); prevents compilation of common-dbus #76

Closed
starks opened this issue Feb 12, 2012 · 2 comments
Closed

Comments

@starks
Copy link
Member

starks commented Feb 12, 2012

gcc -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -Wformat=2 -pipe -I/usr/include/libbsd -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wextra -funsigned-char -DGITVERSION='"3.0-28-g67461da"' -g -O2 -o bin/optirun src/module.o src/bbconfig.o src/bblogger.o src/bbrun.o src/bbsocket.o src/driver.o src/optirun.o src/bbsocketclient.o -lglib-2.0
/usr/bin/ld: src/bblogger.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
/usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO /lib/librt.so.1 so try adding it to the linker command line
/lib/librt.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [bin/optirun] Error 1
make[1]: Leaving directory `/home/eric/beed'
make: *** [all] Error 2

Commenting the line out allows compilation.

@Samsagax
Copy link
Member

That's a bug in upstream ld

Add -lrt to the C_FLAGS and will compile correctly

@starks
Copy link
Member Author

starks commented Feb 12, 2012

Works. Thanks.

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