tools icon indicating copy to clipboard operation
tools copied to clipboard

Upgrade raspberrypi's cross compile tool to gcc 8.3.0?

Open jiapei100 opened this issue 6 years ago • 13 comments

Any plan to upgrade raspberrypi's cross compile tool to gcc 8.3.0? Some times, it's seriously slow to compile the source code on raspberry pi directly...

jiapei100 avatar Sep 06 '19 00:09 jiapei100

If you want I uploaded mine here. It should be 100% compatible with Buster. I have not experienced problems with it yet.

carlonluca avatar Sep 09 '19 17:09 carlonluca

@carlonluca unfortunately your toolchain is not compatible with buster: your binutils is not patched for multiarch. Your gcc is, so you get linker errors like this:

/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libpcre.so.3, needed by /home/al/Source/rpi-ramdisk/sysroot/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so, not found (try using -rpath or -rpath-link)

In order to fix this you need to apply http://bazaar.launchpad.net/~doko/binutils/pkg-2.24-debian/view/head:/patches/129_multiarch_libpath.patch to binutils source tree before building it.

ali1234 avatar Oct 02 '19 19:10 ali1234

Can this be of any use for this?

https://sourceforge.net/p/raspberry-pi-cross-compilers/code/ci/master/tree/

On Wed, 2 Oct 2019, 22:15 Alistair Buxton, [email protected] wrote:

@carlonluca https://github.com/carlonluca unfortunately your toolchain is not compatible with buster: your binutils is not patched for multiarch. Your gcc is, so you get linker errors like this:

/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libpcre.so.3, needed by /home/al/Source/rpi-ramdisk/sysroot/sysroot/usr/lib/arm-linux-gnueabihf/ libglib-2.0.so, not found (try using -rpath or -rpath-link)

In order to fix this you need to apply http://bazaar.launchpad.net/~doko/binutils/pkg-2.24-debian/view/head:/patches/129_multiarch_libpath.patch to binutils source tree before building it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/raspberrypi/tools/issues/102?email_source=notifications&email_token=ACITD3J36MVIJDXGTO3UWI3QMTXODA5CNFSM4IUDVSOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAF3RVI#issuecomment-537639125, or mute the thread https://github.com/notifications/unsubscribe-auth/ACITD3KSQ7XHAAAJZFEHI7TQMTXODANCNFSM4IUDVSOA .

mtekeli avatar Oct 02 '19 19:10 mtekeli

@mtekeli all the download links for that are broken, but I expect it has the same problem.

ali1234 avatar Oct 02 '19 21:10 ali1234

@ali1234 thanks for the info. I didn't encounter that error with any of my builds. How did you trigger that error?

carlonluca avatar Oct 02 '19 22:10 carlonluca

I tried to cross compile libgssdp from git master against a raspbian sysroot.

ali1234 avatar Oct 02 '19 22:10 ali1234

I created a new repository which contains an updated toolchain with ARMv6 support.

Tested it on a Raspberry PI Zero with Raspbian Buster, and it works perfectly.

See: https://stackoverflow.com/a/58559140/869402

And the repo: https://github.com/Pro/raspi-toolchain

I'm happy for any feedback.

Pro avatar Oct 28 '19 12:10 Pro

Does it cross compile the kernel correctly and the result run OK? That's usually a good test for a new toolchain.

JamesH65 avatar Oct 28 '19 12:10 JamesH65

Does it cross compile the kernel correctly and the result run OK? That's usually a good test for a new toolchain.

I did not test that yet. Honestly, I did not yet try to compile a kernel myself. @JamesH65 do you know any good tutorial or example which shows how to do that? I could try to include this test into Continuous Integration, then we will see :+1:

Pro avatar Oct 28 '19 13:10 Pro

The official RPi kernel building guide is here: https://www.raspberrypi.org/documentation/linux/kernel/building.md

pelwell avatar Oct 28 '19 13:10 pelwell

the toolchain according to ali1234 succeded to cross-compile qt 5.11.3

martburg avatar Nov 06 '19 12:11 martburg

@martburg Could you please share how to make a cross-compiler for qt 5.11.3, in ubuntu please?

mahaju avatar Oct 07 '21 03:10 mahaju

@mahaju this toolchain here https://thebugfreeblog.blogspot.com/2019/09/raspbian-buster-gcc.html works for every Qt version I tested, up to 5.15.1. I tested for both Linux and Mac OS.

carlonluca avatar Oct 08 '21 17:10 carlonluca