Ant Error in Quickstart

80 views
Skip to first unread message

Cerin

unread,
Sep 15, 2011, 10:16:34 PM9/15/11
to europa-users
Hi,

I just discovered the project, and was working through the Quickstart
(http://code.google.com/p/europa-pso/wiki/QuickStart). Everything was
going well, until I ran Ant, which gave me the error:

localhost:~/Light$ ant
Buildfile: build.xml

init:
[mkdir] Created dir: /home/myuser/Light/build/classes
[mkdir] Created dir: /home/myuser/Light/build/swig/Light

compile:
[javac] Compiling 1 source file to ~/Light/build/classes

run:
[echo] Running Light project
[java] Exception in thread "main"
java.lang.UnsatisfiedLinkError: /home/myuser/europa-2.5-linux/lib/
libSystem_g.so: /home/myuser/europa-2.5-linux/lib/libSystem_g.so:
wrong ELF class: ELFCLASS32 (Possible cause: architecture word width
mismatch)
[java] at java.lang.ClassLoader$NativeLibrary.load(Native
Method)
[java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:
1750)
[java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:
1646)
[java] at java.lang.Runtime.load0(Runtime.java:787)
[java] at java.lang.System.load(System.java:1022)
[java] at psengine.util.LibraryLoader.loadLibrary(Unknown
Source)
[java] at psengine.PSUtil.loadLibraries(Unknown Source)
[java] at Light.Main.main(Main.java:16)

BUILD FAILED
/home/myuser/Light/build.xml:64: Java returned: 1

I'm running this in 64-bit Ubuntu 10.04. From the error, can I assume
the prebuilt Linux binaries are for 32-bit systems? Do I need to
recompile all the Europa code?

Regards,
Chris

Javier Barreiro

unread,
Sep 15, 2011, 10:41:41 PM9/15/11
to europa...@googlegroups.com
2 options:
- you can use a 32 bit jvm, on 64bit macosx that's accomplished by
running java5, there is probably a similar option on Ubuntu (maybe
there is a command line option where you can force the jvm to run in
32 bit mode?).
- we recently got a 64bit linux machine to do builds on, you can grab
binaries from the trunk (bleeding edge, but relatively sae to use as
long as the build is green) from the autobuild page: http://babelfish.arc.nasa.gov/trac/europa/build

> --
> You received this message because you are subscribed to the Google
> Groups "europa-users" group.
> To post to this group, send email to europa...@googlegroups.com.
> To unsubscribe from this group, send email to europa-users...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/europa-users?hl=en
> .
>

Cerin

unread,
Sep 15, 2011, 11:45:15 PM9/15/11
to europa-users
On Sep 15, 10:41 pm, Javier Barreiro <javier.barre...@nasa.gov> wrote:
> 2 options:
> - you can use a 32 bit jvm, on 64bit macosx that's accomplished by  
> running java5, there is probably a similar option on Ubuntu (maybe  
> there is a command line option where you can force the jvm to run in  
> 32 bit mode?).
> - we recently got a 64bit linux machine to do builds on, you can grab  
> binaries from the trunk (bleeding edge, but relatively sae to use as  
> long as the build is green) from the autobuild page:http://babelfish.arc.nasa.gov/trac/europa/build

Thanks. I tried using the recent 64bit build, but unfortunately I get
a different error:

[java] Exception in thread "main"
java.lang.UnsatisfiedLinkError: /home/myuser/europa-2.6b-linux64/lib/
libSystem_g.so: libantlr3c.so: cannot open shared object file: No such
file or directory
[java] at java.lang.ClassLoader$NativeLibrary.load(Native
Method)
[java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:
1750)
[java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:
1646)
[java] at java.lang.Runtime.load0(Runtime.java:787)
[java] at java.lang.System.load(System.java:1022)
[java] at psengine.util.LibraryLoader.loadLibrary(Unknown
Source)
[java] at psengine.PSUtil.loadLibraries(Unknown Source)
[java] at Light.Main.main(Main.java:17)

BUILD FAILED
/home/myuser/Light/build.xml:67: Java returned: 1

The file libantlr3c.so was included in the 2.5 release, but seems to
be missing in the 2.6 release. Is this correct? Where should I get
this library? I have antlr installed from Ubuntu's standard repo, but
I'm not sure if that can be used instead.

Chris

Michael J Iatauro

unread,
Sep 16, 2011, 9:24:59 AM9/16/11
to europa...@googlegroups.com

> Thanks. I tried using the recent 64bit build, but unfortunately I get
> a different error:
>
> [java] Exception in thread "main"
> java.lang.UnsatisfiedLinkError: /home/myuser/europa-2.6b-linux64/lib/
> libSystem_g.so: libantlr3c.so: cannot open shared object file: No such
> file or directory
> [java] at java.lang.ClassLoader$NativeLibrary.load(Native
> Method)
> [java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:
> 1750)
> [java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:
> 1646)
> [java] at java.lang.Runtime.load0(Runtime.java:787)
> [java] at java.lang.System.load(System.java:1022)
> [java] at psengine.util.LibraryLoader.loadLibrary(Unknown
> Source)
> [java] at psengine.PSUtil.loadLibraries(Unknown Source)
> [java] at Light.Main.main(Main.java:17)
>
> BUILD FAILED
> /home/myuser/Light/build.xml:67: Java returned: 1
>
> The file libantlr3c.so was included in the 2.5 release, but seems to
> be missing in the 2.6 release. Is this correct? Where should I get
> this library? I have antlr installed from Ubuntu's standard repo, but
> I'm not sure if that can be used instead.

The expectation (changed from 2.5 to 2.6) is that you have ANTLR
installed locally. We have the source for the correct version checked
into our "ThirdParty" repository at
http://europa-pso.googlecode.com/svn/ThirdParty/trunk. There's an ANTLR
tarball in there. It's important, if you're using 64-bit Europa, that
you install 64-bit ANTLR libraries.

~MJI

------------------
Michael J. Iatauro
Software Engineer
Dell | Services, Federal Government

NASA Ames Research Center
Office: 650-604-0662
Mail stop: 269-2
P.O. Box 1
Moffett Field, CA 94035-0001
www.dell.com/perotsystems

Chris Spencer

unread,
Sep 16, 2011, 11:59:16 AM9/16/11
to europa...@googlegroups.com

I didn't understand. Like I said, I do have 64 bit ANTLR installed locally.

Chris

Javier Barreiro

unread,
Sep 16, 2011, 12:01:43 PM9/16/11
to europa...@googlegroups.com
is libantlr3c.so on your $LD_LIBRARY_PATH?

Chris Spencer

unread,
Sep 16, 2011, 1:26:44 PM9/16/11
to europa...@googlegroups.com
On Fri, Sep 16, 2011 at 12:01 PM, Javier Barreiro
<javier....@nasa.gov> wrote:
> is libantlr3c.so on your $LD_LIBRARY_PATH?

It looks like all of Ubuntu's packages are the Java versions of
antlr3, and only provide jar files, not so files...

I tried compiling the version listed at
http://europa-pso.googlecode.com/svn/ThirdParty/trunk and received the
error

In file included from /usr/include/features.h:378,
from /usr/include/stdio.h:28,
from include/antlr3defs.h:219,
from include/antlr3baserecognizer.h:39,
from src/antlr3baserecognizer.c:9:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
In file included from /usr/include/stdio.h:34,
from include/antlr3defs.h:219,
from include/antlr3baserecognizer.h:39,
from src/antlr3baserecognizer.c:9:
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stddef.h:211: error:
duplicate ‘unsigned’
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include/stddef.h:211: error: two
or more data types in declaration specifiers
make[1]: *** [antlr3baserecognizer.lo] Error 1

I'm not sure what dependencies I'm missing. From googling, I found
this might be caused by missing the development headers provided by
the libc6-dev package, but I have both Ubuntu's libc6 and libc6-dev
packages installed.

Chris

Chris Spencer

unread,
Sep 16, 2011, 1:41:31 PM9/16/11
to europa...@googlegroups.com

I discovered I also needed the gcc-multilib package...

With that, I can compile and install /usr/local/lib/libantlr3c.so.

However, building a Europa project with ant just generates another exception:

[java] Exception in thread "main" java.lang.UnsatisfiedLinkError:

/home/chris/europa-2.6b-linux64/lib/libSystem_g.so: libantlr3c.so:
wrong ELF class: ELFCLASS32


[java] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[java] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
[java] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
[java] at java.lang.Runtime.load0(Runtime.java:787)
[java] at java.lang.System.load(System.java:1022)
[java] at psengine.util.LibraryLoader.loadLibrary(Unknown Source)
[java] at psengine.PSUtil.loadLibraries(Unknown Source)
[java] at Light.Main.main(Main.java:17)

I'm guessing the the default build for antlr3 is 32-bits.

Well, thanks for everyone's help. However, this is way too much hassle
just to demo Europa. I'll wait for the next official 64-bit release...

Regards,
Chris

Reply all
Reply to author
Forward
0 new messages