public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* crosstools, sysroolts and raspberries
@ 2016-03-25 17:59 Diez B. Roggisch
  2016-04-02  9:27 ` Waldemar Brodkorb
  0 siblings, 1 reply; 2+ messages in thread
From: Diez B. Roggisch @ 2016-03-25 17:59 UTC (permalink / raw)
  To: crossgcc

[-- Attachment #1: Type: text/plain, Size: 2554 bytes --]

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 #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 496 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: crosstools, sysroolts and raspberries
  2016-03-25 17:59 crosstools, sysroolts and raspberries Diez B. Roggisch
@ 2016-04-02  9:27 ` Waldemar Brodkorb
  0 siblings, 0 replies; 2+ messages in thread
From: Waldemar Brodkorb @ 2016-04-02  9:27 UTC (permalink / raw)
  To: Diez B. Roggisch; +Cc: crossgcc

Hi Diez,
Diez B. Roggisch wrote,

> Hey,
> 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,

I think you should try something like Buildroot, which has
opencv/boost ported to raspberry pi. Buildroot will build a
cross-compiler and all libraries for you. Adding a new package is
very simple.

best regards
 Waldemar

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-02  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-25 17:59 crosstools, sysroolts and raspberries Diez B. Roggisch
2016-04-02  9:27 ` Waldemar Brodkorb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).