failed to build jlibnxt on linux

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

failed to build jlibnxt on linux

Postby rbunke » Thu Oct 11, 2007 1:55 am

when I run ant it fails with the following output.

Code: Select all
jlibnxt:
       [cc] 1 total files to be compiled.
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c: In function 'Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1find':
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c:54: warning: cast from pointer to integer of different size
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c: In function 'Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1open':
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c:61: warning: cast to pointer from integer of different size
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c: In function 'Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1close':
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c:67: warning: cast to pointer from integer of different size
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c: In function 'Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1send_1data':
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c:81: warning: cast to pointer from integer of different size
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c: In function 'Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1read_1data':
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/main_jlibnxt.c:97: warning: cast to pointer from integer of different size
       [cc] Starting link
       [cc] /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /home/rick/Projects/lejos_nxj/src/libnxt/libnxt.a(lowlevel.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
       [cc] /home/rick/Projects/lejos_nxj/src/libnxt/libnxt.a: could not read symbols: Bad value
       [cc] collect2: ld returned 1 exit status

BUILD FAILED
/home/rick/Projects/lejos_nxj/build/build.xml:65: The following error occurred while executing this line:
/home/rick/Projects/lejos_nxj/src/libnxt/build.xml:127: gcc failed with return code 1


I tried to add the -fPIC argument and it compiles ok then. Then as I tried going through the Readme.html I got up to the point where I run the command
Code: Select all
nxj -r Tune
and it segfaults.

Code: Select all
Linking...
Uploading...
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x00002aaaab065370, pid=19640, tid=47159187349248
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (Blackdown-1.4.2-03 mixed mode)
# Problematic frame:
# C  [libjlibnxt.so+0x1370]  nxt_open0+0x4
#
# An error report file with more information is saved as hs_err_pid19640.log
Segmentation fault


Itried using both the sun jdk 1.5 and the blackdown JDK 1.4.2.03 but I get the same results.

I can also post the complete log and a core dump if you need it. I tried to run it in gdb but between my java binary not having symbols compiled in and problems with gdb's threads command I gave up. Any ideas?
rbunke
New User
 
Posts: 1
Joined: Thu Oct 11, 2007 1:28 am

Postby lawrie » Fri Oct 12, 2007 6:27 pm

There is a long thread on this - see Building lejos_nxj 0.3 under Linux.

Are you using a 64-bit Lunux system?
lawrie
leJOS Team Member
 
Posts: 934
Joined: Mon Feb 05, 2007 1:27 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff