[antlr-interest] binary executable for ANTLR tool
Benjamin Niemann
pink at odahoda.de
Fri Jun 15 02:31:04 PDT 2007
Benjamin Niemann wrote:
> Terence Parr wrote:
>
>>
>> On Jun 15, 2007, at 5:19 PM, Benjamin Niemann wrote:
>>
>>> Hi,
>>>
>>> Terence Parr wrote:
>>>
>>>> Anybody wanna build windows / linux / mac binaries for ANTLR tool
>>>> itself? I couldn't even get GCJ on my mac. I'm trying to find a gcj
>>>> binary for linux so I can make an ANTLR binary. Why is GCJ hard so
>>>> hard to find/download? Must be because it doesn't work.
>>>
>>> "apt-get install gcj" for me. Which dist are you using?
>>
>> some fedora thing at school and 10.4.9 os x on my laptop.
>>
>>> I somehow remember, someone (you?) posted some build instructions
>>> for gcj
>>> somewhere...
>>
>> someone posted to a blog and i put into bug list to do.
>>
>> http://weblog.hypotheticalabs.com/?p=94
>
> yeah, just stumbled upon ANTLR-132, too :)
> I'll give it a try
I was not able to get it working as described. The last command did not work
for me, I had to compile antlr-3.0.jar as a lib, too, and then link all
three libs. But the resulting executable segfaulted :(
My gcj version is "gcj (GCC) 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)"
I was able to get a statically linked version though using the following
sequence:
export CLASSPATH=antlr-2.7.7.jar:stringtemplate-3.0.jar
gcj -fPIC -O3 -c antlr-2.7.7.jar -o antlr-2.7.7.o
gcj -fPIC -O3 -c stringtemplate-3.0.jar -o stringtemplate-3.0.o
gcj -fPIC -O3 -c antlr-3.0.jar -o antlr-3.0.o
gcj --main=org.antlr.Tool antlr-2.7.7.o stringtemplate-3.0.o antlr-3.0.o \
-o antlr3
strip antlr3
Fetch the resulting file from
<http://testbox.puppetmaster.homelinux.org/antlr3> and try, if it works on
your system (will need some gcc/gcj libs, packages libgcj7-1 on debian,
other stuff should be fairly standard).
Anybody feel free to suggest improvements that's the first time I used gcj.
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
More information about the antlr-interest
mailing list