building gcj on OS X (also AWT)
John Gabriele
john3g@bestweb.net
Fri May 21 05:15:00 GMT 2004
On May 20, 2004, at 3:49 PM, Thomas Fitzsimmons wrote:
> Hi,
>
> I work on GCJ's AWT and GTK+ peers.
>
Thank you for your work! :)
> [snip] The article is here:
>> http://www.bestweb.net/~john3g/gcj_on_osx.html
>> I'd, of course, be grateful for any corrections/additions/
>> links anyone has to offer. :)
>>
>
> You may want to clarify this part:
>
>> Unfortunately, at this time, there's no easily-obtained support for
>> GUI's (AWT or Swing).
>
> I think you're saying here that it's still really hard to build on
> MacOS
> X, right? I'm concerned people will interpret it as "there's no
> AWT/Swing code at all" which is wrong.
>
> We're actively developing the AWT and Swing and they're coming along
> quite quickly. So, for example, on Linux, it is possible for
> developers
> to build an AWT-enabled GCJ that works out-of-the-box.
>
That's good news. I updated the article.
> Anyway, that's my two cents. Thanks for writing the article!
>
You're welcome.
It took about 4 hours for me to "make bootstrap", but here I am
with a nice fresh gcj binary. :) Right off the bat though, what
puzzles me is, when I run gcj it presumably uses other tools in
/usr/local/gcj/bin and /usr/local/gcj/libexec to do its job (g++,
gcc, the preprocessor, etc.). Since I installed everything in
/usr/local/gcj, and since that directory is *not* in my path,
when I run
/usr/local/gcj/bin/gcj -c Foo.java
/usr/local/gcj/bin/gcj --main=Foo -o myProgram Foo.o
how does gcj find the tools it needs in /usr/local/gcj if
that directory isn't in my $PATH? Why doesn't it get the wrong
tools instead (the ones in /usr/local/bin) and barf?
Same goes for libraries. I'm not sure how OS X does things,
but I know that:
A. I've got two libstdc++'s (one in /usr/local/gcj/lib and the
other in /usr/lib).
B. I haven't edited any /etc/ld.so.conf and haven't run any
ldconfig (which, I notice don't even exist on OS X)
So, when I run my little myProgram (which works fine), how does
it find the right libstdc++? (or any other lib that it needs from
/usr/local/gcj/lib for that matter). (Hmm... no ldd here either...)
Thanks,
---J
More information about the Java
mailing list