public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X
@ 2005-01-11  4:54 bothner at gcc dot gnu dot org
  2005-01-11 13:02 ` [Bug java/19368] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-01-11  4:54 UTC (permalink / raw)
  To: java-prs

A fresh CVS (from last night) configured with default options (only --prefix)
builds but the resulting gcj doesn't work.
Linking this "hello world" program:
public class Hello
{
  public static void main (String[] args)
  { System.err.println("Hello!"); }
}
yields:
gcj -o Hello --main=Hello Hello.java                
/usr/bin/ld: warning suggest use of -bind_at_load, as lazy binding may result in
errors or different symbols being used
symbol _sqrt used from dynamic library /usr/lib/libm.dylib(sqrt970.o) not from
earlier dynamic library /Users/bothner/GNU/install-gcc/lib/libgcj.6.dylib(w_sqrt.o)

Adding -Wl,-bind_at_load yields an executable without complaint,
but running that executable just hangs.

-- 
           Summary: GCJ doesn't build working "hello world" on OS X
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bothner at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: powerpc-apple-darwin7.7.0
  GCC host triplet: powerpc-apple-darwin7.7.0
GCC target triplet: powerpc-apple-darwin7.7.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
@ 2005-01-11 13:02 ` pinskia at gcc dot gnu dot org
  2005-01-11 13:03 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 13:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-11 13:02 -------
Does it hang, or just really slow to start up.
For me it takes 14seconds to run this pogram (yes that slow, the problem is related to the dynamic 
loader on Mac OS X 10.3, it is fixed I hear on 10.4) on a 1.5GHz G4.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
  2005-01-11 13:02 ` [Bug java/19368] " pinskia at gcc dot gnu dot org
@ 2005-01-11 13:03 ` pinskia at gcc dot gnu dot org
  2005-01-11 14:11 ` andreast at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 13:03 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-11 13:03 -------
(In reply to comment #1)
One more note this was a 5 day old compiler but that should not matter.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
  2005-01-11 13:02 ` [Bug java/19368] " pinskia at gcc dot gnu dot org
  2005-01-11 13:03 ` pinskia at gcc dot gnu dot org
@ 2005-01-11 14:11 ` andreast at gcc dot gnu dot org
  2005-01-11 18:02 ` bothner at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-01-11 14:11 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From andreast at gcc dot gnu dot org  2005-01-11 14:11 -------
Todays gcc builds and runs this hello fine :)

The difference I have here is the linking stage of libstdc++ and libgcj which I
do with -dynamiclib -single_module.

Without these modifications in ltcf-** we really have to wait that long until
the result comes over.

[wolfram:objdir/powerpc-apple-darwin7.7.0/libjava] andreast% time ./hello
Hello!

0.780u 0.060s 0:01.68 50.0%     0+0k 0+0io 0pf+0w

On a G4/1.5GHz with full mauve testsuite load, the above mentioned :)

Configured with: /Volumes/src/gcc/gcc-cvs/gcc/configure
--prefix=/Volumes/src/gcc/gcc-cvs/testbin --enable-languages=c,c++,java
--enable-java-awt=gtk --enable-gtk-cairo --enable-libgcj-multifile
--disable-checking
Thread model: posix
gcc version 4.0.0 20050111 (experimental)

in reply to comment #1, yes it does run with tiger much faster. Also we can run
awt and swing apps based on gtk.

Unless Apple updates dylib we have no chance to have it better on 10.3.x :(
I even do not know if it would be possible.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-01-11 14:11 ` andreast at gcc dot gnu dot org
@ 2005-01-11 18:02 ` bothner at gcc dot gnu dot org
  2005-01-11 19:00 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-01-11 18:02 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From bothner at gcc dot gnu dot org  2005-01-11 18:02 -------
Indeed, it just takes forever: About 40+ seconds on my 1Gz G4 PowerBook.
Linking with -Wl,-bind_at_load doesn't make much difference.

I thought it worked before (I don't consider 40 seconds start-up time "working")
but perhaps I'm mistaken.

Andreast wrote: "Todays gcc builds and runs this hello fine".  I'm unclear this
means there was a change/fix in gcc, in how you configured/built gcc, or how you
compiled/linked the application.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-01-11 18:02 ` bothner at gcc dot gnu dot org
@ 2005-01-11 19:00 ` pinskia at gcc dot gnu dot org
  2005-01-11 19:15 ` andreast at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-11 19:00 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-11 19:00 -------
(In reply to comment #4)
> Indeed, it just takes forever: About 40+ seconds on my 1Gz G4 PowerBook.
> Linking with -Wl,-bind_at_load doesn't make much difference.

You have to link libgcj with -single_module to get the speed up.  This is a dyld (dynamic loader aka 
ld.so) problem and not really a java problem. 


> I thought it worked before (I don't consider 40 seconds start-up time "working")
> but perhaps I'm mistaken.

The start up time comes from looking up symbols in the dynamic library and it is really a bug in dyld 
and the only work around I know of is to link libgcj with -single_module, I can post a patch for that but 
that will take a while because there are more important things with respect with the release of GCC than 
the slow start-up time of gcj on Pather (Tiger it is fixed).

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-01-11 19:00 ` pinskia at gcc dot gnu dot org
@ 2005-01-11 19:15 ` andreast at gcc dot gnu dot org
  2005-01-11 19:17 ` andreast at gcc dot gnu dot org
  2005-01-19  1:43 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-01-11 19:15 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From andreast at gcc dot gnu dot org  2005-01-11 19:15 -------
Created an attachment (id=7929)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7929&action=view)
link libgcj with -single_module


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-01-11 19:15 ` andreast at gcc dot gnu dot org
@ 2005-01-11 19:17 ` andreast at gcc dot gnu dot org
  2005-01-19  1:43 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-01-11 19:17 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From andreast at gcc dot gnu dot org  2005-01-11 19:17 -------
I simply meant I did not test the previous ones. My cable connection dropped.

I attached my hackerish ltcf** diff. You may try and see if it gives you a speed up.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

* [Bug java/19368] GCJ doesn't build working "hello world" on OS X
  2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-01-11 19:17 ` andreast at gcc dot gnu dot org
@ 2005-01-19  1:43 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-19  1:43 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-19 01:43 -------
This was fixed on somewhere between the 10th and 11th.
By one of the patches listed in:
http://gcc.gnu.org/ml/gcc-regression/2005-01/txt00012.txt

The current time for Hello World is:
Hello!
0.760u 0.110s 0:01.53 56.8%     0+0k 1+1io 0pf+0w

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19368


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

end of thread, other threads:[~2005-01-19  1:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-11  4:54 [Bug java/19368] New: GCJ doesn't build working "hello world" on OS X bothner at gcc dot gnu dot org
2005-01-11 13:02 ` [Bug java/19368] " pinskia at gcc dot gnu dot org
2005-01-11 13:03 ` pinskia at gcc dot gnu dot org
2005-01-11 14:11 ` andreast at gcc dot gnu dot org
2005-01-11 18:02 ` bothner at gcc dot gnu dot org
2005-01-11 19:00 ` pinskia at gcc dot gnu dot org
2005-01-11 19:15 ` andreast at gcc dot gnu dot org
2005-01-11 19:17 ` andreast at gcc dot gnu dot org
2005-01-19  1:43 ` pinskia at gcc dot gnu dot org

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).