From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44362 invoked by alias); 25 Mar 2016 17:59:52 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 44341 invoked by uid 89); 25 Mar 2016 17:59:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=raspberries, mate, H*r:212.227.15, rpi X-HELO: mout.web.de Received: from mout.web.de (HELO mout.web.de) (212.227.15.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Mar 2016 17:59:50 +0000 Received: from [192.168.0.105] ([79.245.169.168]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0Lg3bv-1Zzfp40iCZ-00pbLh for ; Fri, 25 Mar 2016 18:59:45 +0100 From: "Diez B. Roggisch" X-Pgp-Agent: GPGMail 2.5.2 Content-Type: multipart/signed; boundary="Apple-Mail=_E683ACA7-D0E5-4117-A5FD-19C501ED0694"; protocol="application/pgp-signature"; micalg=pgp-sha512 Subject: crosstools, sysroolts and raspberries Date: Fri, 25 Mar 2016 17:59:00 -0000 Message-Id: To: crossgcc@sourceware.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-UI-Out-Filterresults: notjunk:1;V01:K0:jOdaOgT8Lsk=:Epg2coE9JlUSv5MEKRpIp7 uUhAyYeeEjx1Qrt6Oxrq9uHKl8nWByogVCgoAlZCkvTOZvFug7x4L1o8usI8fZSanp0bRCybx l75l+v3GXCd38G4m67c20NJ1YD/R9BQOAKXIGGDuhZQS/4G15kmAfvVmrK6lOtE/FJm21qb36 ZiJiBYzTI2obzFpaRTHM/YMsnVGe2ErIXbT8+ylCINRqYx2FkktZp/ON69KsJa8hRVMXegdbB cruesscTnUfsNbE9yK4/qgCmvefGH1TJ1hoICsJD1tzHYvQZr8U35rEfbCO31Ft1/gTl2rYRm NtaSot+Kr4wIJsrPbDwkPw4IIWQxxP3/o86Hzxq4T6FRHXLrcH7S4o48mcm0pmAX3GMzrxu9z vCga66Qz5dVd7bR43Eiwb5aZ17od7OSiwQ+y6hU1VaEKgITvGSoVw54dtX/dIodaTnz7f7W+G dH4EuHsOvEt8PRPuxq+LWgvTy06N5z93ykYxfukUNCjKRQ7nzFIzcFjIbPGQ2NPZZIxPc0qIS srEfy9v9aF74hmelIhuY0mXZ3AwPyfkBcx4NTcxYgJOz1lxZgoGsyYgCA38S68pMDA2o0FOjt wnpqlN4yHCD6lfsqB30/zpaBU2YUIf35KHNh8bVk4CENeTtnwAnXYqqOdr95jLRhIy0/G7RUL NyGKqvmYOeBkzjeNm8/shW6ggYpmCYqUpVUKkwn1mO1iGhf9+u6ph3TlT4kvRauV5GXfNIWp4 XoombTjdZ/TnDsJedA1KglEvidTMxDy52FCSpRyUayI2j13HGiWbzi0RtoM= X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00032.txt.bz2 --Apple-Mail=_E683ACA7-D0E5-4117-A5FD-19C501ED0694 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Content-length: 2612 Hey, I=E2=80=99ve searched the internet high and low - but nowhere I found answe= rs for my current problem of getting a proper sysroot for my raspberry PI2.= I=E2=80=99ll try and outline my problem and current state of affairs as go= od as possible. I run an ubuntu mate on a RPi model 2. After a while, I=E2=80=99m tired of = compiling on the device, as probably most people who care about cross-compi= lation. My host-system is a lubuntu trusty (actually running in a VM on my mac, but= I guess that doesn=E2=80=99t matter), 64 bit. So I downloaded crosstools-NG latest version (1.22.0), built it, picked arm= v7-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 et= c - and this is where my problems start. I decided to use rsync to create a mirror of the installed dev and binary p= ackages. I call that RPIROOT. Now I can use -I, -L and -l options to compile & build against these librar= ies, 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 =E2=80=94sysro= ot-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 too= ls 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 execut= able that I want to use or create. I also would like to prevent to bootstra= p 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 librarie= s differently than the sysroot that is part of the crosscompile chain. It p= uts e.g. cdefs.h not under /usr/include/sys/, but /usr/include/arm-linux-gn= ueabihf/sys. The same goes for libraries - they (some) are under /usr/lib/a= rm-=E2=80=A6/ 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 binari= es pre-built? Or will I run into (subtle, runtimey) problems with e.g. the = ABI, that I didn=E2=80=99t detect with my simple compilations so far? - if it *is* feasible, how do I teach my toolchain to use the same directo= ry layout? - if it is *not* feasible, do I have to bootstrap all libraries, and is th= ere a chance of doing that without having to fiddle with their buildsystems? Thanks for listening, Diez --Apple-Mail=_E683ACA7-D0E5-4117-A5FD-19C501ED0694 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail Content-length: 496 -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJW9XyPAAoJEMgWrvcLlYXnRHEIAJlmpdZikhwJVvfs4Ej9NOBZ U+ufR8doUsyYl7NmHPcnU54ZvyPmUqULCCMmJHgsrKuUr7GK4XjQ0AIySwCyWf0W xATVx9S16jsLpt8JT4s/YoAUG0p+8vpadM5sT5W7bySsbG4boLVX2yK6APfVaKTK 0XiFCphC8Erff0pQTOtd4NcmQdz7pyWXeKGv1/mexLg7qUeOjkuxjzXiM4gqOwjj 1IDlzVZboPLoT52ryXBHhu+j8+RkVfFKugueR+Z4dCpsfvDaItdt+RAxmRcZmdIm rOArVb2GyVy1sVGCdKqiNi1B4HdmxjM/b9hyCRn34PZERYg70CMEleBJosELVGs= =xEOk -----END PGP SIGNATURE----- --Apple-Mail=_E683ACA7-D0E5-4117-A5FD-19C501ED0694--