[zeromq-dev] Best 0MQ usable with gcc-2.95?
Goswin von Brederlow
goswin-v-b at web.de
Wed Jan 15 14:51:38 CET 2014
On Tue, Jan 14, 2014 at 02:05:35PM -0500, Steven McCoy wrote:
> On 14 January 2014 12:21, Dmitry Antipov <antipov at dev.rtsoft.ru> wrote:
>
> > I need to develop 0MQ-based application for an old (RedHat 7.x-based)
> > system with gcc-2.95. Unfortunately upgrading is practically impossible.
> >
>
> Do you have to build on the target system? Use static linking of libc &
> libstdc++ from a host with a newer GCC or Clang.
Beware: You can't (reliably) static link anything with network code.
The NSS modules are dynamically loaded with dlopen. That means you get
the stone age NSS modules mixed with the statically linked modern
libc. Any ABI change in all those years will make it fail.
You might also get incompatibilities with ld.so for anything not
statically linked. That has changed since then a few times. Otherwise
I would suggest just copying newer libc and libstdc++ to the target
system and set LD_LIBRARY_PATH so it finds them first.
You can still do that but you will have to copy the ld.so too and
start the program with:
LD_LIBRARY_PATH=$(pwd)/new ./new/ld.so program
That still has the problem with the NSS modules so it might or might
not work at all. For that you could try using fakechroot or real
chroot.
Oh, and one more problem: Newer libc are likely compiled to only
support newer kernels.
So to summarize:
- NSS modules might not work
- ld.so might not work
- libc might not work
Basically you are screwed trying to run anything modern on such an old
system.
MfG
Goswin
More information about the zeromq-dev
mailing list