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

Don't link rt library in Mac OS X #2

Closed
wants to merge 1 commit into from

Conversation

bluesalt
Copy link
Contributor

librt (POSIX.1b Realtime Extensions library) is not available in Mac OS X, thus it should not be linked.

librt (POSIX.1b Realtime Extensions library) is not available in Mac OS X,
thus it should not be linked.
@bluesalt
Copy link
Contributor Author

Actually I found that even the rt is disabled in Linux, the test still pass. Why the library is needed here ?

@yosukehara
Copy link
Member

Thank you for your contribution and report.

It only happened errors to build LeoFS on Ubuntu-13.10 as the follows.
So we set "rt".

$ make
Scanning dependencies of target cutil
[ 10%] Building C object src/CMakeFiles/cutil.dir/lcu_cache.c.o
[ 20%] Building C object src/CMakeFiles/cutil.dir/lcu_hashmap.c.o
[ 30%] Building C object src/CMakeFiles/cutil.dir/lcu_slab.c.o
[ 40%] Building C object src/CMakeFiles/cutil.dir/lcu_lru.c.o
[ 50%] Building C object src/CMakeFiles/cutil.dir/lcu_string.c.o
Linking C static library libcutil.a
[ 50%] Built target cutil
Scanning dependencies of target test_suites
[ 60%] Building C object tests/CMakeFiles/test_suites.dir/main.c.o
[ 70%] Building C object tests/CMakeFiles/test_suites.dir/check_cache.c.o
[ 80%] Building C object tests/CMakeFiles/test_suites.dir/check_hashmap.c.o
[ 90%] Building C object tests/CMakeFiles/test_suites.dir/check_slab.c.o
[100%] Building C object tests/CMakeFiles/test_suites.dir/check_lru.c.o
Linking C executable test_suites
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run':
(.text+0x965): undefined reference to `timer_create'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run':
(.text+0x9b3): undefined reference to `timer_settime'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run':
(.text+0x9d9): undefined reference to `timer_delete'
collect2: error: ld returned 1 exit status
make[2]: *** [tests/test_suites] Error 1
make[1]: *** [tests/CMakeFiles/test_suites.dir/all] Error 2
make: *** [all] Error 2

@yosukehara
Copy link
Member

I've merged your fix to the develop-branch.
d1af101...89ccec3

Thank you.

@yosukehara yosukehara closed this Dec 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants