This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

crosstools, sysroolts and raspberries


Hey,

Iâve searched the internet high and low - but nowhere I found answers for my current problem of getting a proper sysroot for my raspberry PI2. Iâll try and outline my problem and current state of affairs as good as possible.

I run an ubuntu mate on a RPi model 2. After a while, Iâm tired of compiling on the device, as probably most people who care about cross-compilation.

My host-system is a lubuntu trusty (actually running in a VM on my mac, but I guess that doesnât matter), 64 bit.

So I downloaded crosstools-NG latest version (1.22.0), built it, picked armv7-rpi2-linux-gnueabihf sample, and built the toolchain.

It works. I can compile little hello-world programs, they run, hurray.

However, I of course want to use a lot of libraries - e.g. OpenCV, boost etc - and this is where my problems start.

I decided to use rsync to create a mirror of the installed dev and binary packages. I call that RPIROOT.

Now I can use -I, -L and -l options to compile & build against these libraries, and at least for the small toyish examples, that works just fine.

But my *dream* goal is to *not* do that, but instead use the âsysroot-option of the crosscompiler, point it to RPIROOT, and then just compile & link.

The primary reason for this is that I want to use standard built system tools like cmake, and I prefer using them with a CMAKE_TOOLCHAIN_FILE instead of creating my own built scripts/systems for each piec of library or executable that I want to use or create. I also would like to prevent to bootstrap all the libraries I use, especially since this would probably mean I need to install these on my PI as well.

And this is where the confusion starts. The ubuntu mate structures libraries differently than the sysroot that is part of the crosscompile chain. It puts e.g. cdefs.h not under /usr/include/sys/, but /usr/include/arm-linux-gnueabihf/sys. The same goes for libraries - they (some) are under /usr/lib/arm-â/ instead directly under /usr/lib, as in my XX-sysroot.

So the questions I have is:

 - is it even feasible to achieve what I want - a system where I use binaries pre-built? Or will I run into (subtle, runtimey) problems with e.g. the ABI, that I didnât detect with my simple compilations so far?
 - if it *is* feasible, how do I teach my toolchain to use the same directory layout?
 - if it is *not* feasible, do I have to bootstrap all libraries, and is there a chance of doing that without having to fiddle with their buildsystems?

Thanks for listening,

Diez

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]