/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbeginT.o: relocation R_X86_64_32 against `__DTOR_END__' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/crtbeginT.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Hi,
I am getting the same error while trying to compile JNI lib. I compiled very similar library before on Ubuntu 9.04 32bit without any problems.
gcc -o libparportacces sor.so -shared -Wl,-soname, libparportacces sor.so lukas/jdk1. 6.0_22/ include lukas/jdk1. 6.0_22/ include/ linux parporttester_ io_ParallelPort Accessor_ linux.c -static -lc
-I/home/
-I/home/
net_zarubsys_
/usr/bin/ld: /usr/lib/ gcc/x86_ 64-linux- gnu/4.4. 5/crtbeginT. o: relocation R_X86_64_32 against `__DTOR_END__' can not be used when making a shared object; recompile with -fPIC gcc/x86_ 64-linux- gnu/4.4. 5/crtbeginT. o: could not read symbols: Bad value
/usr/lib/
collect2: ld returned 1 exit status
Ubuntu 10.10 amd64 (Lenovo W510 - core i7)
gcc -v output: pkgversion= 'Ubuntu/ Linaro 4.4.4-14ubuntu5' --with- bugurl= file:// /usr/share/ doc/gcc- 4.4/README. Bugs --enable- languages= c,c++,fortran, objc,obj- c++ --prefix=/usr --program- suffix= -4.4 --enable-shared --enable-multiarch --enable- linker- build-id --with-system-zlib --libexecdir= /usr/lib --without- included- gettext --enable- threads= posix --with- gxx-include- dir=/usr/ include/ c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable- clocale= gnu --enable- libstdcxx- debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable- checking= release --build= x86_64- linux-gnu --host= x86_64- linux-gnu --target= x86_64- linux-gnu
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
Thanks for any solution.
Best
Lukas Zaruba