Compilation problem on 64bit OS
Kai Ruottu
kai.ruottu@wippies.com
Fri Feb 4 12:48:00 GMT 2011
4.2.2011 13:05, Dan Track kirjoitti:
> Hi,
>
> I'm getting the following error when compiling a program on a 64bit
> OS, I'm at a a loss as to what it can be I've tried looking it up but
> to no avail, can someone please enlighten me with what is going on?
>
> The error I have:
>
> /opt/source/src/Makefile:112: warning: ignoring old commands for target `clean'
> /usr//bin/g++ -shared -o /opt/source/src/target/obj_dbg/libpugi.so
> -L/opt/source/src/target/obj_dbg -static -ltds_objects -static
> -lreplacements /opt/source/src/target/obj_dbg/pugixml.o
> /opt/source/src/target/obj_dbg/pugixpath.o
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginT.o: relocation
> R_X86_64_32 against `__deregister_frame_info' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginT.o: could not read
> symbols: Bad value
As the first hit got via searching "crtbeginT.o" (What was this?) :
https://bugzilla.redhat.com/show_bug.cgi?id=214465
tells first :
"This is a user error. Using -static together with -shared is nonsense.
Either you want to create a shared library, or a statically linked
binary, but never both."
there are some fuzziness in using '-shared' and '-static' on the same
command line :o(
More information about the Gcc-help
mailing list