public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* glibc 2.2.3-pre1 & Java
@ 2001-03-28 13:21 Graham Murray
  2001-03-28 13:36 ` Ulrich Drepper
  0 siblings, 1 reply; 5+ messages in thread
From: Graham Murray @ 2001-03-28 13:21 UTC (permalink / raw)
  To: libc-alpha

I have just installed glibc-2.2.3-pre1 and have found just one
problem. Neither java nor jre from jdk1.3.0_01 will not run. It worked
perfectly with glibc 2.2.2

Linux kernel 2.4.3-pre8
i686
gcc 2.95.3 (patched as per the announcement and rebuilt under glibc 2.2.2)
binutils 2.11.90.0.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: glibc 2.2.3-pre1 & Java
  2001-03-28 13:21 glibc 2.2.3-pre1 & Java Graham Murray
@ 2001-03-28 13:36 ` Ulrich Drepper
  2001-04-26 20:43   ` testing out incompatible glibc with shared executables...possible? Ken Whaley
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Drepper @ 2001-03-28 13:36 UTC (permalink / raw)
  To: libc-alpha

Graham Murray <graham@barnowl.demon.co.uk> writes:

> I have just installed glibc-2.2.3-pre1 and have found just one
> problem. Neither java nor jre from jdk1.3.0_01 will not run. It worked
> perfectly with glibc 2.2.2

These are known problems with the java implementation.  Sun is working
on fixing it.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* testing out incompatible glibc with shared executables...possible?
  2001-03-28 13:36 ` Ulrich Drepper
@ 2001-04-26 20:43   ` Ken Whaley
  2001-04-26 22:50     ` Andreas Jaeger
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Whaley @ 2001-04-26 20:43 UTC (permalink / raw)
  To: libc-alpha

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]

I'm trying to build and run a dynamically shared executable based on
an install of a "test" build of glibc (2.2.1 in this case) on a x86-linux
system (redhat 6.2) based on glibc 2.1.x.  I'm using gcc 2.95.2.  I've read
the glibc FAQ, and didn't find any usable solution in there.

The static build runs fine, but I can't get the shared version of a
hello world app to work (it links w/out error but seg faults when run
(the glibc 2.1.x gdb on the system is of no help in debugging it, no
surprise there)).

Here's the makefile:

testglibc = /usr/local/testglibc2.2.1
.PHONY: all
all: hello-shared hello-static

hello-shared: hello.o
	gcc -v -shared -fPIC -Wl,-t \
		-B$(testglibc)/lib/ \
		-Wl,-rpath=$(testglibc)/lib \
		-I$(testglibc)/include \
		$< -o $@

hello-static: hello.o
	$(gcc) -v -static \
		-B$(testglibc)/lib/ \
		-I$(testglibc)/include \
		$< -o $@

hello.o: hello.c
 $(gcc) -v -c -g -O0 -I$(testglibc)/include $< -o $@

hello.c is just

#include <stdio.h>
main(){ printf("howdy\n"); }

ldd shows:
% ldd hello-shared
     libc.so.6 => /usr/local/testglibc2.2.1/lib/libc.so.6 (0x40003000)
     ld-linux.so.3 => /usr/local/testglibc2.2.1/lib/ld-linux.so.3
(0x40113000)

I can see from the -v output that all the $(testglibc) files are being used
in the compile, none from /lib.

(I had to change the reference to ld-linux.so.2 in libc.so.6 so
that it would use the test glibc 2.2.1's ld.so, not the system
installed /lib/ld-linux.so.2.  I called this ld-linux.so.3
If there's any cleaner way to do this without damaging the system (i.e.,
preventing the system binaries based on glibc 2.1.x from running),
I'd like to know it, but I don't think this is the problem).

Any hints/ideas would be greatly appreciated.

thanks,

Ken





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: testing out incompatible glibc with shared executables...possible?
  2001-04-26 20:43   ` testing out incompatible glibc with shared executables...possible? Ken Whaley
@ 2001-04-26 22:50     ` Andreas Jaeger
  2001-04-27 19:28       ` testing out incompatible glibc with shared executables...possible? SOLVED Ken Whaley
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Jaeger @ 2001-04-26 22:50 UTC (permalink / raw)
  To: Ken Whaley; +Cc: libc-alpha

"Ken Whaley" <ken@believe.com> writes:

> I'm trying to build and run a dynamically shared executable based on
> an install of a "test" build of glibc (2.2.1 in this case) on a x86-linux
> system (redhat 6.2) based on glibc 2.1.x.  I'm using gcc 2.95.2.  I've read
> the glibc FAQ, and didn't find any usable solution in there.
> 
> The static build runs fine, but I can't get the shared version of a
> hello world app to work (it links w/out error but seg faults when run
> (the glibc 2.1.x gdb on the system is of no help in debugging it, no
> surprise there)).

Add -Wl,--dynamic-linker=/usr/local/testglibc2.2.1/lib/ld-linux.so.2

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: testing out incompatible glibc with shared executables...possible? SOLVED
  2001-04-26 22:50     ` Andreas Jaeger
@ 2001-04-27 19:28       ` Ken Whaley
  0 siblings, 0 replies; 5+ messages in thread
From: Ken Whaley @ 2001-04-27 19:28 UTC (permalink / raw)
  To: libc-alpha

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

Thanks, that does it.  I had another problem as well (-fPIC and -shared
are wrong to give to gcc when building an executable, that's why I seg
faulted, duh).  For the record, here's the makefile that allows this
all to work:

testglibc = /usr/local/glibc2.2.3
gcc = gcc

.PHONY: all
all: hello

hello: hello.o
 $(gcc) -Wl,--dynamic-linker=$(testglibc)/lib/ld-linux.so.2 \
  -B$(testglibc)/lib/ \
  -Wl,-rpath=$(testglibc)/lib \
  $< -o $@

hello.o: hello.c
 $(gcc) -c -g -O0 -I$(testglibc)/include $< -o $@

	Ken

> -----Original Message-----
> From: libc-alpha-owner@sources.redhat.com
> [ mailto:libc-alpha-owner@sources.redhat.com]On Behalf Of Andreas Jaeger
> Sent: Thursday, April 26, 2001 10:49 PM
> To: Ken Whaley
> Cc: libc-alpha@sourceware.cygnus.com
> Subject: Re: testing out incompatible glibc with shared
> executables...possible?
>
>
> "Ken Whaley" <ken@believe.com> writes:
>
> > I'm trying to build and run a dynamically shared executable based on
> > an install of a "test" build of glibc (2.2.1 in this case) on a
> x86-linux
> > system (redhat 6.2) based on glibc 2.1.x.  I'm using gcc
> 2.95.2.  I've read
> > the glibc FAQ, and didn't find any usable solution in there.
> >
> > The static build runs fine, but I can't get the shared version of a
> > hello world app to work (it links w/out error but seg faults when run
> > (the glibc 2.1.x gdb on the system is of no help in debugging it, no
> > surprise there)).
>
> Add -Wl,--dynamic-linker=/usr/local/testglibc2.2.1/lib/ld-linux.so.2
>
> Andreas
> --
>  Andreas Jaeger
>   SuSE Labs aj@suse.de
>    private aj@arthur.inka.de
>     http://www.suse.de/~aj
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-04-27 19:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28 13:21 glibc 2.2.3-pre1 & Java Graham Murray
2001-03-28 13:36 ` Ulrich Drepper
2001-04-26 20:43   ` testing out incompatible glibc with shared executables...possible? Ken Whaley
2001-04-26 22:50     ` Andreas Jaeger
2001-04-27 19:28       ` testing out incompatible glibc with shared executables...possible? SOLVED Ken Whaley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).