- Subject: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
- From: Various
- Date: Fri Nov 5 12:41:06 1999
Topics:
Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
----------------------------------------------------------------------
Date: Fri, 5 Nov 1999 12:28:02 +0100
From: Kars de Jong <jongk@linux-m68k.org>
To: Andreas Jaeger <aj@suse.de>
Cc: bugs@gnu.org, Andreas Schwab <schwab@suse.de>
Subject: Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Message-ID: <19991105122802.A20972@rincewind.discworld.org>
References: <199909292140.XAA08103@rincewind.discworld.org> <u8n1tykqx4.fsf@gromit.rhein-neckar.de> <19991104025316.A24465@rincewind.discworld.org> <u83dumsm09.fsf@gromit.rhein-neckar.de>
Content-Type: text/plain; charset=us-ascii
On Thu, Nov 04, 1999 at 09:23:50AM +0100, Andreas Jaeger wrote:
> Is it always failing at the same place? You reported the following
> error message:
>
> BUG IN DYNAMIC LINKER ld.so: dl-version.c: 210: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
Yes, I always get that. But read on.
> Could you try this patch so that we get more debugging info?
Okay, did that. Output:
bash$ LD_TRACE_LOADED_OBJECTS=1 ../../../../../../lib/glibc-2.1.2/objs/elf/ld.so `pwd`/ttcp
/usr/src/X11/cde/lib/tt/bin/shell/ttcp: error in loading shared libraries: /usr/src/X11/cde/lib/tt/bin/shell/ttcp: find_needed failed for libpthread.so.0
Now, ttcp wasn't linked against libpthread at all... It was linked against
libtt, and THAT was linked againts libpthread. So this probably makes it a
binutils bug.
But now the fun thing: when libtt.so is in the library path, it goes right:
bash$ LD_TRACE_LOADED_OBJECTS=1 LD_LIBRARY_PATH=/usr/src/X11/cde/exports/lib ../../../../../../lib/glibc-2.1.2/objs/elf/ld.so `pwd`/ttcp
libtt.so.2 => /usr/src/X11/cde/exports/lib/libtt.so.2 (0xc0001000)
libdl.so.2 => /lib/libdl.so.2 (0xc00ab000)
libm.so.6 => /lib/libm.so.6 (0xc00b0000)
libc.so.6 => /lib/libc.so.6 (0xc00cd000)
libpthread.so.0 => /lib/libpthread.so.0 (0xc0186000)
/lib/ld.so.1 => ../../../../../../lib/glibc-2.1.2/objs/elf/ld.so (0xd0000000)
So I guess I'm okay after all. Phew! :)
It's still a bug though.
Kars.
- -
- -----------------------------------------------------------------------------
Kars de Jong Signaalkamp rules the waves! Turrican@Discworld
- -------======]**-----| jongk@cs.utwente.nl |-----**[======---------
------------------------------
Date: Thu, 4 Nov 1999 04:00:02 -0500
From: Andreas Jaeger <aj@suse.de>
To: libc-gnats@gnu.org
Cc: gnats-admin@gnu.org
Subject: Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Message-Id: <199911040900.EAA27317@mescaline.gnu.org>
The following reply was made to PR libc/1336; it has been noted by GNATS.
From: Andreas Jaeger <aj@suse.de>
To: Kars de Jong <jongk@linux-m68k.org>
Cc: bugs@gnu.org, Andreas Schwab <schwab@suse.de>
Subject: Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Date: 04 Nov 1999 09:23:50 +0100
>>>>> Kars de Jong writes:
Kars> On Tue, Oct 05, 1999 at 01:06:31PM +0200, Andreas Jaeger wrote:
[...]
>> This might indicate a bug in your binutils. Could you try a different
>> version?
Kars> Hmm, not easily. If I use an older version, gcc 2.95.2 no longer likes it.
>> If this doesn't help, we need to reproduce it ourselves. You might
>> want to contact Andreas Schwab and find a way so that he can debug the
>> problem (no promises that he'll do it, just ask kindly;-).
Kars> I've checked, it's a generic problem. It happens on PPC and Intel as well.
:-(
Kars> Unfortunately, trying to knock out some simple code to make a nice testcase
Kars> hasn't worked for me yet.
Kars> The problem appears to SOMETIMES occur when a shared library, which uses pthread
Kars> functions, is linked against libpthread, and a later executable that uses the
Kars> library isn't linked against libpthread.
Kars> It's not a simple thing though. I ran into it with the JDK and just now while
Kars> building the ToolTalk part of CDE.
Is it always failing at the same place? You reported the following
error message:
BUG IN DYNAMIC LINKER ld.so: dl-version.c: 210: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
Could you try this patch so that we get more debugging info?
--- elf/dl-version.c.~1~ Tue Feb 23 07:27:04 1999
+++ elf/dl-version.c Thu Nov 4 09:20:34 1999
@@ -67,6 +67,12 @@
if (_dl_name_match_p (name, map->l_searchlist.r_list[n]))
return map->l_searchlist.r_list[n];
+
+ /* Just for debugging. */
+ _dl_signal_error (0, (*map->l_name ? map->l_name : _dl_argv[0]),
+ make_string ("find_needed failed for ",
+ name, "\n"));
+
/* Should never happen. */
return NULL;
}
Another solution would be to run JDK under gdb and debug this :-(.
Sorry, without a way to reproduce it, I can't really help.
andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
------------------------------
Date: Thu, 4 Nov 1999 02:53:16 +0100
From: Kars de Jong <jongk@linux-m68k.org>
To: Andreas Jaeger <aj@suse.de>
Cc: bugs@gnu.org, Andreas Schwab <schwab@suse.de>
Subject: Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Message-ID: <19991104025316.A24465@rincewind.discworld.org>
References: <199909292140.XAA08103@rincewind.discworld.org> <u8n1tykqx4.fsf@gromit.rhein-neckar.de>
Content-Type: text/plain; charset=us-ascii
On Tue, Oct 05, 1999 at 01:06:31PM +0200, Andreas Jaeger wrote:
> >>>>> Kars de Jong writes:
>
> >> Number: 1336
> >> Category: libc
> >> Synopsis: Runtime problem with executables
> > [...]
> > Build CC: gcc
> > Compiler version: 2.95.1 19990816 (release)
> > Kernel headers: 2.2.10
>
> >> Description:
> > Building jdk 1.2.1 works until it starts using the freshly generated java
> > executable. The error message is as follows:
>
> > bash-2.03# bin/java
> > BUG IN DYNAMIC LINKER ld.so: dl-version.c: 210: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
>
> This might indicate a bug in your binutils. Could you try a different
> version?
Hmm, not easily. If I use an older version, gcc 2.95.2 no longer likes it.
> If this doesn't help, we need to reproduce it ourselves. You might
> want to contact Andreas Schwab and find a way so that he can debug the
> problem (no promises that he'll do it, just ask kindly;-).
I've checked, it's a generic problem. It happens on PPC and Intel as well.
Unfortunately, trying to knock out some simple code to make a nice testcase
hasn't worked for me yet.
The problem appears to SOMETIMES occur when a shared library, which uses pthread
functions, is linked against libpthread, and a later executable that uses the
library isn't linked against libpthread.
It's not a simple thing though. I ran into it with the JDK and just now while
building the ToolTalk part of CDE.
Kars.
- -
- -----------------------------------------------------------------------------
Kars de Jong Signaalkamp rules the waves! Turrican@Discworld
- -------======]**-----| jongk@cs.utwente.nl |-----**[======---------
------------------------------
Date: Tue, 5 Oct 1999 07:50:06 -0400
From: Andreas Jaeger <aj@suse.de>
To: libc-gnats@gnu.org
Cc: gnats-admin@gnu.org
Subject: Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Message-Id: <199910051150.HAA30955@mescaline.gnu.org>
The following reply was made to PR libc/1336; it has been noted by GNATS.
From: Andreas Jaeger <aj@suse.de>
To: Kars de Jong <jongk@linux-m68k.org>
Cc: bugs@gnu.org, Andreas Schwab <schwab@suse.de>
Subject: Re: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Date: 05 Oct 1999 13:06:31 +0200
>>>>> Kars de Jong writes:
>> Number: 1336
>> Category: libc
>> Synopsis: Runtime problem with executables
> [...]
> Build CC: gcc
> Compiler version: 2.95.1 19990816 (release)
> Kernel headers: 2.2.10
>> Description:
> Building jdk 1.2.1 works until it starts using the freshly generated java
> executable. The error message is as follows:
> bash-2.03# bin/java
> BUG IN DYNAMIC LINKER ld.so: dl-version.c: 210: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
This might indicate a bug in your binutils. Could you try a different
version?
If this doesn't help, we need to reproduce it ourselves. You might
want to contact Andreas Schwab and find a way so that he can debug the
problem (no promises that he'll do it, just ask kindly;-).
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
------------------------------
Date: Wed, 29 Sep 1999 23:40:52 +0200
From: Kars de Jong <jongk@linux-m68k.org>
To: bugs@gnu.org
Subject: libc/1336: Problem building JDK 1.2.1 with glibc 2.1.2
Message-Id: <199909292140.XAA08103@rincewind.discworld.org>
>Number: 1336
>Category: libc
>Synopsis: Runtime problem with executables
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: libc-gnats
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Wed Sep 29 17:50:07 EDT 1999
>Last-Modified:
>Originator: Kars de Jong
>Organization:
------------------------------------------------------------------------------
Kars de Jong Signaalkamp rules the waves! Turrican@Discworld
--------======]**-----| jongk@cs.utwente.nl |-----**[======---------
>
>Release: libc-2.1.2
>Environment:
Host type: m68k-unknown-linux-gnu
System: Linux rincewind 2.2.10 #12 Mon Sep 20 21:09:02 CEST 1999 m68k unknown
Architecture: m68k
Addons: crypt glibc-compat linuxthreads
Build CC: gcc
Compiler version: 2.95.1 19990816 (release)
Kernel headers: 2.2.10
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: no
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
Building jdk 1.2.1 works until it starts using the freshly generated java
executable. The error message is as follows:
bash-2.03# bin/java
BUG IN DYNAMIC LINKER ld.so: dl-version.c: 210: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
I can't 'ldd' it either, then the same happens. It was linked like this:
Rebuilding ../../../bin/m68k/green_threads/java because of obj/m68k/java.o obj/m68k/java_md.o
gcc -z defs -L../../../lib/m68k/green_threads -L../../../lib/m68k obj/m68k/java.o obj/m68k/java_md.o -lhpi -L../../../lib/m68k/classic -ljvm -ldl -lc -lBrokenLocale -o ../../../bin/m68k/green_threads/java
The native_threads version DOES work (linked against the pthread library):
Rebuilding ../../../bin/m68k/native_threads/java_g because of obj_g/m68k/java.o obj_g/m68k/java_md.o
gcc -o ../../../bin/m68k/native_threads/java -z defs -L../../../lib/m68k/native_threads -L../../../lib/m68k obj/m68k/java.o obj/m68k/java_md.o -lpthread -lhpi -L../../../lib/m68k/classic -ljvm -ldl -lc -lBrokenLocale
bash-2.03# bin/java -native
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by :>
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version
-? -help print this help message
-X print help on non-standard options
>How-To-Repeat:
Sorry, no idea. The structure of this project is much too complicated to just lift a particular
case out. It probably all works together. I am hoping the assertion gives enough info on what
went wrong. If not, let me know what else you need to know from me.
>Fix:
No idea. It works fine when building on a RedHat 5.2 system (glibc 2.0.x based), and running it
under 2.1.2. But then the native (pthread) threads version fails with a signal 11...
All in all I'm not too happy :(
>Audit-Trail:
>Unformatted:
------------------------------
End of forward7fEk_d Digest
***************************