WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Cross compile Raspberry pi tcz apps on x86 TC?  (Read 2631 times)

Offline mikedev

  • WikiUser
  • *
  • Posts: 25
Cross compile Raspberry pi tcz apps on x86 TC?
« on: June 13, 2016, 12:42:33 PM »
Anyone has experience/successful stories in cross compiling Raspberry Pi apps/tcz from source on x86 TinyCore Linux?

Besides the compiletc.tcz and related tcz(s) need to be loaded on x86 TinyCore Linux, any toolchain(s) or cross-compilers tcz available?

Thanks.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #1 on: June 13, 2016, 02:21:08 PM »
Why do you want to crosscompile?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline mikedev

  • WikiUser
  • *
  • Posts: 25
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #2 on: June 13, 2016, 02:36:48 PM »
Why do you want to crosscompile?

For a main reason - speed.
It is slow to compile sources on a Raspberry Pi Zero.  It is a single core vs RPI3 quad core.
Nevertheless, if the sources can be compiled on x86 TC and then have the tcz built transferred back to pi, isn't it more effective?  Especially when I try to experience different compile options, flags, etc.  It is going to be much faster and effective to re-run many times on x86 cross-compile than natively done on the pi.

Thanks.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #3 on: June 13, 2016, 03:07:58 PM »
Cross compilation works for the kernel and packages with no dependencies like xz but as soon as you build packages depending on tcz's you can not manage it, or on a complicated way wasting much more time than you win. If you have few packeges to build, start compilation and take coffe, go to cinema, etc. If you have many, buy RPi2 or RPi3. But forget cross compilation at all.

I tried several times and gave up, using it for kernel only.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 8231
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #4 on: June 13, 2016, 06:25:12 PM »
Hi mikedev
Spreading the compilation over multiple PIs might be worth looking into. Google  distcc

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #5 on: June 13, 2016, 11:33:23 PM »
Hi mikedev
Spreading the compilation over multiple PIs might be worth looking into. Google  distcc

There are few packages with long, several hours compilation time like QT5, boost but in general compilation time is acceptable on RPi2, RPi3 even better specially using all CPU cores not only one.  Larger RAM also helps.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline mikedev

  • WikiUser
  • *
  • Posts: 25
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #6 on: June 14, 2016, 09:16:15 AM »
Cross compilation works for the kernel and packages with no dependencies like xz but as soon as you build packages depending on tcz's you can not manage it, or on a complicated way wasting much more time than you win. If you have few packeges to build, start compilation and take coffe, go to cinema, etc. If you have many, buy RPi2 or RPi3. But forget cross compilation at all.

I tried several times and gave up, using it for kernel only.

Thanks!  Just curious to get some additional information, for those packages that depends on other tcz, it is difficult to cross compile the package is it because of the difficulties in mounting th RPI tcz(s) on the arbitrary directory on x86 machines to satisfy the cross compiling requirements?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7035
    • My Community Forum
Re: Cross compile Raspberry pi tcz apps on x86 TC?
« Reply #7 on: June 15, 2016, 04:29:46 AM »
You must unpack TCZ-s to the build system buildroot. Also consider startup scripts.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."