Problem when trying to install nxtOSEK in Lubuntu

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
dbdevelopment
Posts: 4
Joined: 13 Sep 2013, 12:44

Problem when trying to install nxtOSEK in Lubuntu

Post by dbdevelopment »

Hi!

I am trying to install nxtOSEK in Lubuntu. I am following this guide: http://lejos-osek.sourceforge.net/insta ... _linux.htm The problem is, when I try to build libnxt using scons, as in step 3, it doesn't work. I get this:

Code: Select all

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: libnxt.a' is up to date. gcc -o fwflash main_fwflash.o -L. -lusb -lnxt ./libnxt.a(lowlevel.o): In functionnxt_init':
/home/username/nxt/libnxt-0.3/lowlevel.c:49: undefined reference to usb_init' ./libnxt.a(lowlevel.o): In functionnxt_find':
/home/username/nxt/libnxt-0.3/lowlevel.c:60: undefined reference to usb_find_busses' /home/username/nxt/libnxt-0.3/lowlevel.c:61: undefined reference tousb_find_devices'
/home/username/nxt/libnxt-0.3/lowlevel.c:63: undefined reference to usb_get_busses' ./libnxt.a(lowlevel.o): In functionnxt_open':
/home/username/nxt/libnxt-0.3/lowlevel.c:97: undefined reference to usb_open' /home/username/nxt/libnxt-0.3/lowlevel.c:99: undefined reference tousb_set_configuration'
/home/username/nxt/libnxt-0.3/lowlevel.c:102: undefined reference to usb_close' /home/username/nxt/libnxt-0.3/lowlevel.c:106: undefined reference tousb_claim_interface'
/home/username/nxt/libnxt-0.3/lowlevel.c:109: undefined reference to usb_close' /home/username/nxt/libnxt-0.3/lowlevel.c:118: undefined reference tousb_release_interface'
/home/username/nxt/libnxt-0.3/lowlevel.c:119: undefined reference to usb_close' ./libnxt.a(lowlevel.o): In functionnxt_close':
/home/username/nxt/libnxt-0.3/lowlevel.c:130: undefined reference to usb_release_interface' /home/username/nxt/libnxt-0.3/lowlevel.c:131: undefined reference tousb_close'
./libnxt.a(lowlevel.o): In function nxt_send_buf': /home/username/nxt/libnxt-0.3/lowlevel.c:148: undefined reference tousb_bulk_write'
./libnxt.a(lowlevel.o): In function nxt_recv_buf': /home/username/nxt/libnxt-0.3/lowlevel.c:166: undefined reference tousb_bulk_read'
collect2: error: ld returned 1 exit status
scons: *** [fwflash] Error 1
scons: building terminated because of errors.
Can someone help me?
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by gloomyandy »

Looks like you have the wrong version of libUSB development package installed. I think NXTOSEK is based on the old leJOS code which uses libUSB 0.x many of these functions like usb_init do not exist in the libUSB SDK. There may be some sort of compatibility layer you can use.
lvoc
Posts: 38
Joined: 10 Sep 2013, 13:34

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by lvoc »

Step 3 is a one time process, if you have a Windows computer I recomedn using NXT-G to do this.
You may use this tutorial
http://drgraeme.net/LEGOUpDateNXTFirmwa ... rmware.htm
dbdevelopment
Posts: 4
Joined: 13 Sep 2013, 12:44

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by dbdevelopment »

Thank you for your Quick replies! I used this command: ~$ sudo apt-get install scons libusb-dev libusb-0.1-4 as described in the guide. Shouldn't that give me the old version? I'm not so used to Linux, so I might be wrong. The reason I do this in Linux is because I do it on my school computer, so I want to be in at virtual machine. I could try to do it in windows instead if I cant get it to work in Linux.
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by mrblp »

dbdevelopment wrote: I used this command: ~$ sudo apt-get install scons libusb-dev libusb-0.1-4 as described in the guide. Shouldn't that give me the old version?
Only the runtime lib will be the old one, the development lib has to be the old one, too. So you have to install libusb-dev in the 0.1 version. I always use the graphic installer so I do not know the exact name of the package.

Good luck,
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
dbdevelopment
Posts: 4
Joined: 13 Sep 2013, 12:44

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by dbdevelopment »

I couldnt find the old version of libusb-dev, only the runtime version. Do you know where I can find it?
mrblp
Posts: 82
Joined: 02 Oct 2010, 14:33

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by mrblp »

dbdevelopment wrote:I couldnt find the old version of libusb-dev, only the runtime version. Do you know where I can find it?
Open Synaptic or the Lubuntu Software Center and search for libusb-dev. Check the version information and verify it is 0.1. In my software center the version infomation looks like libusb-dev 2:0.1.12-20. Mmhh - and that is the package named "libusb-dev". So you already have the right one installed...

Did you setup udev to set the access right correctly?
Bye Marvin

- "I think you ought to know I'm feeling very depressed." - (Android Marvin in "The Hitchhiker's Guide to the Galaxy" by Douglas Adams, 1978)
dbdevelopment
Posts: 4
Joined: 13 Sep 2013, 12:44

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by dbdevelopment »

Sorry for not replying earlier, but I have struggled to get the screen on my NXT working, I got this problem: http://www.youtube.com/watch?v=w8pwffsYFGo but I got it fixed now. I also got this problem to work in Windows, so now I'm programming in C++ with a working screen :D
lvoc
Posts: 38
Joined: 10 Sep 2013, 13:34

Re: Problem when trying to install nxtOSEK in Lubuntu

Post by lvoc »

Could you provide more information about how you fixed the issue? I think it would be good to have it documented.
Lauro
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest