Ok, i downloaded the latest library here: http://luabinaries.luaforge.net/download.html

Using that library, the build works (seems that library was compiled the -fPIC compiler flag).

--zlatko

On 19.05.2010 11:31, Zlatko Franjcic wrote:
Hi all,

I was trying to compile luajava-1.1 on a 64-bit Ubuntu server (Version 9.10) installation, and got the following output:

> make
/usr/lib/jvm/java-6-sun/bin/javadoc -public -classpath src/java/ -quiet -d "doc/us/API" src/java/org/keplerproject/luajava/JavaFunction.java src/java/org/keplerproject/luajava/LuaException.java src/java/org/keplerproject/luajava/LuaInvocationHandler.java src/java/org/keplerproject/luajava/LuaObject.java src/java/org/keplerproject/luajava/LuaState.java src/java/org/keplerproject/luajava/LuaStateFactory.java src/java/org/keplerproject/luajava/Console.java export MACOSX_DEPLOYMENT_TARGET=10.3; gcc -m64 -shared -o libluajava-1.1.so src/c/luajava.o /usr/lib/liblua5.1.a /usr/bin/ld: /usr/lib/liblua5.1.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC
/usr/lib/liblua5.1.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libluajava-1.1.so] Error 1

I attached the Makefile and the config file I am using.

Could someone please help me with this?

Thanks in advance.

--zlatko

Some additional information that might be useful:

> uname -a
Linux Sanoyea 2.6.31-20-server #58-Ubuntu SMP Fri Mar 12 05:40:05 UTC 2010 x86_64 GNU/Linux

> dpkg --get-selections | grep gcc
  gcc                                             install
  gcc-4.4                                         install
  gcc-4.4-base                                    install
  gccxml                                          install
  libgcc1                                         install

> dpkg --get-selections | grep lua
   liblua5.1-0                                     install
   liblua5.1-0-dev                                 install
   lua5.1                                          install


_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to