Building on Ubuntu ia32 / ia64

136 views
Skip to first unread message

Simon Ellwood

unread,
Feb 9, 2014, 1:19:31 PM2/9/14
to lab...@googlegroups.com
Hi all,

I managed to get the trunk version of LabTool building building on my Ubuntu Core2 Duo machine.

The serial analyzer does not seem to work however. I will look in to it when I get time.

I will try and make a branch with the necessary changes over the coming days.

In the meantime this was the most useful webpage:

http://askubuntu.com/questions/225382/install-usblib-package-ubuntu

The changes I had to make are all related to libusb.

The include paths and linker settings both need to change.

If you want me to publish my work in progress in the meantime post here.

All the best.

Simon

Anders Lindvall

unread,
Feb 10, 2014, 5:29:39 AM2/10/14
to Simon Ellwood, lab...@googlegroups.com
Hi Simon,

I'm interested in what you had to change to get it to work. I used Ubuntu as the reference Linux dist while developing LabTool and it was possible to compile there. Are the changes very different compared to the instructions for the RaspberryPi here: https://github.com/embeddedartists/labtool/blob/master/app/COMPILE.raspi.md ?

Best Regards,
Anders


--
You received this message because you are subscribed to the Google Groups "LabTool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labtool+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Simon Ellwood

unread,
Feb 10, 2014, 8:24:05 AM2/10/14
to lab...@googlegroups.com, Simon Ellwood
What you say makes some sense.

I suspect the changes to make it built on RPi have broken the build on Ubuntu.

The issue relates to the usblib both the headers and the library file.

I certainly had to make changes to get it building on my ia32 latest release of Ubuntu.

I am unsure how to proceed to make it build on both platforms without changes as the header files and the .pro file will need to point to different places on the two Linux platforms.

Cheers.

Simon.

Anders Lindvall

unread,
Feb 10, 2014, 9:48:34 AM2/10/14
to lab...@googlegroups.com
Which header files are you talking about?

Regarding the .pro file there might be a way. According to the Qt docs there is something called "Platform Scope Values" (http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html) and looking at the qt code that is opensource (https://qt.gitorious.org/qt/qtbase/source/7f0d6c4529a7446e64d579514c3ab793517a457a:mkspecs/devices) there seems to be a "linux-rasp-pi-g++" device to test against. 

Perhaps the target differentiating can be solved with something like this in the .pro file:

linux-rasp-pi-g++ {
  LIBS += ...
  INCLUDEPATH += ...
  HEADERS += libusbx/include/libusbx-1.0/libusb.h
} else:linux-g++ {
  ...
} else:win32 {
  ...
}

Best Regards,
Anders

Simon Ellwood

unread,
Feb 10, 2014, 6:28:32 PM2/10/14
to lab...@googlegroups.com
I am on the wrong PC at the moment I will try and look in to this in the next few days.

Simon Ellwood

unread,
Feb 14, 2014, 4:54:55 PM2/14/14
to lab...@googlegroups.com
Hi Anders here are the hacks I used:

change to the pro file:
else:unix:!symbian: LIBS += -L$$PWD/libusb/Linux/ -lusb-1.0

Change to the headers:

//#include "libusbx/include/libusbx-1.0/libusb.h"
#include "/usr/include/usb.h"

I am not saying these are the best hacks but they worked for me.

Cheers.

Simon.
Reply all
Reply to author
Forward
0 new messages