[Solved] Lejos 0.5 & 64 bit linux..

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

Moderators: 99jonathan, roger, imaqine

[Solved] Lejos 0.5 & 64 bit linux..

Postby optiluca » Wed Jan 09, 2008 9:06 pm

Hi. I've been attemping to get lejos to run on my 64 bit linux installation for quite a while now (viewtopic.php?t=355&postdays=0&postorder=asc&start=0)

Saw the 0.5 release announcement and gave it a shot (especially after seeing that 64 bits are now officially supported) but..

Code: Select all
luca@optilaptop ~/bin/lejos_nxj/build $ ant
Buildfile: build.xml

clean:
     [echo] saving existing files to .bak files

libnxt:

clean:

libnxt:
       [cc] 5 total files to be compiled.
       [cc] Starting link
       [cc] ar: creating libnxt.a
       [cc] a - samba.o
       [cc] a - flash.o
       [cc] a - error.o
       [cc] a - lowlevel.o
       [cc] a - firmware.o

nxjflash:
       [cc] 1 total files to be compiled.
       [cc] Starting link

jlibnxt:
       [cc] 1 total files to be compiled.
       [cc] Starting link
       [cc] /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: /home/luca/bin/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/luca/bin/lejos_nxj/src/libnxt/libnxt.a: could not read symbols: Bad value
       [cc] collect2: ld returned 1 exit status

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

Total time: 5 seconds


Whats goin on? :?

Thanks in advance

Luca
Last edited by optiluca on Thu Jan 10, 2008 4:02 pm, edited 1 time in total.
optiluca
Novice
 
Posts: 44
Joined: Wed Jul 18, 2007 6:12 pm

Postby CoBB » Wed Jan 09, 2008 10:47 pm

Go to src/libnxt and try to add this line after line 62 in build.xml (which contains a -ggdb switch):

Code: Select all
                            <compilerarg value="-fPIC"/>

The build will be successful after this, but it will produce compiler warnings in the Unix version of the VM (i.e. the emulator) because of differing pointer and integer sizes, so it might not be completely functional afterwards. I never used it, so it’s probably not much of a problem anyway.
User avatar
CoBB
Novice
 
Posts: 73
Joined: Tue Apr 24, 2007 12:24 pm

Postby optiluca » Thu Jan 10, 2008 4:02 pm

BUILD SUCCESSFUL!! :D Now gotta try the thing..

Thanks for your help
optiluca
Novice
 
Posts: 44
Joined: Wed Jul 18, 2007 6:12 pm

Postby lawrie » Thu Jan 10, 2008 11:56 pm

Hi CoBB,

Will the -fPIC arg work OK on 32 bit Linux systems? Can I apply it unconditionally to the build file?

I claimed that 64-bit Linux systems worked in the release notes as I made the change to store pointers in a jlong rather than a jint, but I do not have a 64-bit Linux system to test the release on.

I don't think anyone uses the Unix emulator (emu-lejosrun), so if that does not work on 64-bit Linux systems, it is no big deal.

Lawrie
lawrie
leJOS Team Member
 
Posts: 929
Joined: Mon Feb 05, 2007 1:27 pm

Postby CoBB » Fri Jan 11, 2008 11:30 am

lawrie wrote:Will the -fPIC arg work OK on 32 bit Linux systems? Can I apply it unconditionally to the build file?

Well, I tried it now with a clean build. It seems to work perfectly; I tested both the USB and the Bluetooth connection by uploading Tune, and both operations were successful. So yes, I think you could simply add it.

lawrie wrote:I claimed that 64-bit Linux systems worked in the release notes as I made the change to store pointers in a jlong rather than a jint, but I do not have a 64-bit Linux system to test the release on.

My 64-bit system is at a different place unfortunately, but I can also test that later unless optiluca confirms that it really works.
User avatar
CoBB
Novice
 
Posts: 73
Joined: Tue Apr 24, 2007 12:24 pm

Postby optiluca » Fri Jan 11, 2008 9:18 pm

Yup firmare uploaded, Tune test file running fine.

Thanks :D

Luca
optiluca
Novice
 
Posts: 44
Joined: Wed Jul 18, 2007 6:12 pm

Postby CoBB » Mon Jan 14, 2008 8:34 am

CoBB wrote:Well, I tried it now with a clean build. It seems to work perfectly; I tested both the USB and the Bluetooth connection by uploading Tune, and both operations were successful. So yes, I think you could simply add it.

In the meantime I did the same on my 64-bit system, and it worked without a hitch; nxjbrowse is also fully functional. I didn’t experiment with other functionality, but I assume that it should be fine if so much works through both media.
User avatar
CoBB
Novice
 
Posts: 73
Joined: Tue Apr 24, 2007 12:24 pm


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

more stuff