problems linking a shared library using libcilkrts.a

problems linking a shared library using libcilkrts.a

using cilk 8503 on centos 5.5. what does this mean?/usr/local/cilk/bin/cilk++ -shared -Wall -Wextra -Wcast-align -Wbad-function-cast -Wno-missing-noreturn -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror -Wmissing-format-attribute -fvisibility=hidden -fPIC -Wshadow -O3 -finline-functions -g3 -ggdb3 -std=c99 -I../newbrt -I../include -I./lock_tree -I./range_tree -I../linux -I../toku_include -DBRT_LEVEL_STRADDLE_CALLBACK_LOGIC_NOT_READY=1 -D_SVID_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600 -D_GNU_SOURCE -D_THREAD_SAFE -O3 -finline-functions -g3 -ggdb3 ydb_lib.o ydb.a ../src/lock_tree/locktree.a ../src/range_tree/rangetree.a ../newbrt/newbrt.a ../lib/libtokuportability.a -lz -lpthread -Wl, /usr/local/cilk_8503/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/../../../../lib64/libcilkrts.a(control.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC/usr/local/cilk_8503/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.4/../../../../lib64/libcilkrts.a: could not read symbols: Bad value

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It looks like control.c was compiled without -fPIC. Did you compile any of the Cilk runtime manually?

I am using the binary distribution.

We modified the cilk runtime Makefile.linux that builds a new library called "libcilkrts_pic.a". This library contains the runtime files compiled with -fPIC, so its files can be linked into a user's shared library. We attached the patch.


Downloadapplication/octet-stream patch.Makefile.linux1.38 KB

Leave a Comment

Please sign in to add a comment. Not a member? Join today