RH 5.0 won't run my an app compiled from RH 4.1?

RH 5.0 won't run my an app compiled from RH 4.1?

Post by Stephen Polkowsk » Thu, 11 Dec 1997 04:00:00



Hi all,

        I was just wondering if there is an obvious reason why a program
compiled on RH 4.1 (kernel 2.0.27) won't run on RH 5.0 (kernel 2.0.31).
I have a work program that was developed on 4.1.  When I try to run the
program on 5.0 the program gets core dumped even before it has a chance
to execute the first printf in main().  The program works fine on 4.1.
Any ideas?

When I try to recompile the apps, it finally loads and runs, but it
eventually dies in a fprintf() call.  What's going on?

Regards,

Steve
--
Stephen Polkowski
Centaur Technology  
Austin, TX
(512) 418-5730

 
 
 

RH 5.0 won't run my an app compiled from RH 4.1?

Post by Veksler Micha » Wed, 17 Dec 1997 04:00:00


: Hi all,

:       I was just wondering if there is an obvious reason why a program
: compiled on RH 4.1 (kernel 2.0.27) won't run on RH 5.0 (kernel 2.0.31).
: I have a work program that was developed on 4.1.  When I try to run the
: program on 5.0 the program gets core dumped even before it has a chance
: to execute the first printf in main().  The program works fine on 4.1.
: Any ideas?

Sounds like a glibc2 (RH 5.0) vs. libc5 (RH 4.1) problem.
Most, if not all, shared libraries compiled for glibc2 are not
compatible with libc5. Attempt to use the wrong library will probably
be followed by a SEGV.

The funny thing is that someone decided to keep both variants
under the same names. For example both libX11.so libraries are named
libX11.so.6.1 !

This means that if you have an old X application it won't run under RH 5.0 .
To make it work anyway, you have to install a special rpm with old
libc5 libraries. I don't know how RH 5.0 handled this, but what I usually
do is:
  env LD_LIBRARY_PATH=/usr/i486-linux-libc5/lib netscape
  (instead of plain "netscape")
This will work for all shells.
I suspect there is a way to tell the dynamic linker to do this automagically,
does anyone know ?

: When I try to recompile the apps, it finally loads and runs, but it
: eventually dies in a fprintf() call.  What's going on?

: Regards,

Strange, maybe you are trying to access FILE* data structures directly?
Do you have old dlls compiled with glibc2?
Try to run "ldd your_exec" and make sure you don't get libc5 listed.

Hope this helps
Michael

 
 
 

RH 5.0 won't run my an app compiled from RH 4.1?

Post by Ulrich Dreppe » Thu, 18 Dec 1997 04:00:00



> The funny thing is that someone decided to keep both variants
> under the same names. For example both libX11.so libraries are named
> libX11.so.6.1 !

Plainly wrong.  There are ways to make sure this all works and they
are implemented in the current ld.so for libc5 and glibc which are
also distributed in RH5.0.

-- Uli
---------------.      drepper at gnu.org  ,-.   Rubensstrasse 5
Ulrich Drepper  \    ,-------------------'   \  76149 Karlsruhe/Germany
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

 
 
 

RH 5.0 won't run my an app compiled from RH 4.1?

Post by Benjamin Redelings » Thu, 18 Dec 1997 04:00:00



> Hi all,

>         I was just wondering if there is an obvious reason why a program
> compiled on RH 4.1 (kernel 2.0.27) won't run on RH 5.0 (kernel 2.0.31).
> I have a work program that was developed on 4.1.  When I try to run the
> program on 5.0 the program gets core dumped even before it has a chance
> to execute the first printf in main().  The program works fine on 4.1.
> Any ideas?

I had the same problem with the developmental debian app.  At first I
would alter the LD_LIBRARY_PATH variable to point to the old versions of
the shared libraries (e.g.
LD_LIBRARY_PATH=/lib/libc5-compat:/usr/lib/libc5-compat) However, then I
found out that the linker is supposed to do this FOR you!  It is
supposed to figure out if a program wants to be linked with libc5 or
libc6!  The reason this wasn't working for me was that I has specified
"/usr/X11R6/lib" in my normal LD_LIBRARY_PATH.
        However, with Debian (and presumably Red Hat) you don't need a massive
LD_LIBRARY_PATH variable, like
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R6/lib.
EVERY ONE of THOSE libraries is standard, and should be in your
/etc/ld.so.conf file.  Mine looks like this:

/usr/local/lib
/usr/X11R6/lib
/usr/lib/libc5-compat
/lib/libc5-compat

Notice that it isn't necessary to specify /lib or /usr/lib... they are
automatically assumed.
        You can tell which library your applications are linked with by running
'ldd' on it:

ldd netscape: (compiled with OLD libc5)
        libXt.so.6 => /usr/lib/libc5-compat/libXt.so.6 (0x4000b000)
        libSM.so.6 => /usr/lib/libc5-compat/libSM.so.6 (0x4004d000)
        libICE.so.6 => /usr/lib/libc5-compat/libICE.so.6 (0x40056000)
        libXmu.so.6 => /usr/lib/libc5-compat/libXmu.so.6 (0x4006b000)
        libXpm.so.4 => /usr/lib/libc5-compat/libXpm.so.4 (0x4007d000)
        libXext.so.6 => /usr/lib/libc5-compat/libXext.so.6 (0x4008b000)
        libX11.so.6 => /usr/lib/libc5-compat/libX11.so.6 (0x40096000)
        libdl.so.1 => /lib/libdl.so.1 (0x40134000)
        libc.so.5 => /lib/libc.so.5 (0x40137000)
        libm.so.5 => /lib/libm.so.5 (0x401f3000)

ldd xterm: (from Debian, so compiled with libc6)
        libXaw.so.6 => /usr/X11R6/lib/Xaw95/libXaw.so.6 (0x4000f000)
        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x40064000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40076000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x400be000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x400c7000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x400dc000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x400e8000)
        libncurses.so.3.4 => /lib/libncurses.so.3.4 (0x4018d000)
        libc.so.6 => /lib/libc.so.6 (0x401d2000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Basically, programs that were compiled with old libraries should get
libc.so.5 and some libc5-compat stuff, which newer programs should get
/lib/ld-linux.so.2 and libc.so.6        

Quote:> When I try to recompile the apps, it finally loads and runs, but it
> eventually dies in a fprintf() call.  What's going on?

I'm not quite sure.  This might be a separate problem :)  Do you have
the above problem?

Regards,
-BenRI

 
 
 

RH 5.0 won't run my an app compiled from RH 4.1?

Post by Andreas Dietri » Fri, 19 Dec 1997 04:00:00




Quote:>Hi all,

>    I was just wondering if there is an obvious reason why a program
>compiled on RH 4.1 (kernel 2.0.27) won't run on RH 5.0 (kernel 2.0.31).
>I have a work program that was developed on 4.1.  When I try to run the
>program on 5.0 the program gets core dumped even before it has a chance
>to execute the first printf in main().  The program works fine on 4.1.
>Any ideas?

This is a know bug in RH5.0. Update your ld.so from the Errata page, then it
_shoud_ work.

Quote:>When I try to recompile the apps, it finally loads and runs, but it
>eventually dies in a fprintf() call.  What's going on?

Have you tried to debug the problem? Newer libc's use different
(read:stricter) implementation of malloc, that will core dump on slightly
broken code, that used to work with older libc's.

Andreas

--
We're all looking for a woman who can sit in a mini-skirt and talk
philosophy, executing both with confidence and style.

 
 
 

RH 5.0 won't run my an app compiled from RH 4.1?

Post by Eze Ogwu » Sat, 27 Dec 1997 04:00:00






>>Hi all,

>>        I was just wondering if there is an obvious reason why a program
>>compiled on RH 4.1 (kernel 2.0.27) won't run on RH 5.0 (kernel 2.0.31).
>>I have a work program that was developed on 4.1.  When I try to run the
>>program on 5.0 the program gets core dumped even before it has a chance
>>to execute the first printf in main().  The program works fine on 4.1.
>>Any ideas?

> This is a know bug in RH5.0. Update your ld.so from the Errata page, then it
> _shoud_ work.

Do that first then install the libc5 from the updates directory. Make sure that you first remove all the old libc5 libs on your system. This should leave you with the libc5 from "updates" and the glibc also from "updates".

--
Eze Ogwuma

 
 
 

1. RH 4.1 -> RH 5.0 gotcha

I have a system which I generated from an RH 4.1 CD. Everything
'significant' is as installed from the CD - original kernel and
libraries.

Now I would like to upgrade it to RH 5.0  

Looking at www.redhat.com/errata I see that this upgrade has a
potential problem and that I need to update rpm-2.4.10-1glibc first.
[Message headed 'upgrade failure', dated 08-Dec-1997 ]

But the command specified always reports 'failed dependencies',
whether or not I include the '--force' parameter. [I am typing
in the command

 rpm -Uvh --force rpm-2.4.10-1glibc.i386.rpm

The dependencies are /bin/sh, /bin/bash, libc.so.6, and
ld-linux.so.2

I've tried upgrading bash from the RH 5.0 CD, but that also
fails with an even longer list of dependencies. I've tried
upgrading bash from the RH 4.1 CD, but it says (reasonably)
that it is already installed.

Can anyone suggest what is wrong and how to proceed, please?

--

2. How the HELL do I get PPP to work with Red Hat 5.2???

3. *help* RH 5.0...Programs won't run under x (newbie)

4. UPS for Linux-PC ?

5. Why won't my executables run - RH 5.0?

6. SCO O/S 5.0.0 - IDE install (aargh)

7. RH 4.1 ftape won't initialize

8. Annual Linux Showcase - Announcement and Call for Papers

9. SMBFS-2.0.2 on RH 5.0 (was Re: make error on RH 5.0)

10. Can a pgm compiled on RH 5.1 run on RH 4.2?

11. Problems installing Star Office 5.0 on RH 4.1

12. Kaffe Won't Work in RH 5.0

13. RH 5.0 won't recognize ATAPI