Fixing libc.so.6 unexpected reloc type 0x25

3k Views Asked by At

I'm trying to install gcc4.9 on a SUSE system without an internet connection. I compiled gcc on an Ubuntu machine and installed it into a prefix, then copied the prefix folder to the SUSE machine. When I tried to run it gcc complained about not finding GLIBC_2_14, so I downloaded an rpm for libc6 online and included it into the prefix folders. my LD_LIBRARY_PATH includes prefix/lib and prefix/lib64. When I try to run any program now (ls, cp, cat, etc) I get the error error while loading shared libraries: /home/***/prefix/lib64/libc.so.6: unexpected reloc type 0x25.

Is there any way I can fix this so that I can get gcc4.9 up and running on this system?

As an alternative, is it possible to build gcc staticaly so that I don't have to worry about linking at all when I transfer it between computers?

1

There are 1 best solutions below

0
On BEST ANSWER

my LD_LIBRARY_PATH includes prefix/lib and prefix/lib64

See this answer for explanation of why this can't work.

Is there any way I can fix this so that I can get gcc4.9 up and running on this system?

Your best bet is to install whatever GCC package comes with the SuSE system, then use that GCC to configure and install gcc-4.9 on it.

If for some reason you can't do that, this answer has some of the ways in which you can build gcc-4.9 on a newer system and have it still work on an older one.

is it possible to build gcc staticaly so that I don't have to worry about linking at all when I transfer it between computers?

Contrary to popular belief, fully-static binaries are generally less portable then dynamic ones on Linux.