ZeroTierOne icon indicating copy to clipboard operation
ZeroTierOne copied to clipboard

Cross compilation

Open tinola opened this issue 4 years ago • 8 comments

Hi all,

I'd like to cross compile ZeroTierOne on FreeBSD host to target Linux mipsel cpu arch device. Is there any straight forward method to achieve this?... There is no "configure" file to pass --host=... variable

tinola avatar Feb 18 '22 17:02 tinola

I want to say @someara has been working on this kind of stuff for our CI and so I'm going to ping him and swiftly run away

erikh avatar Feb 18 '22 17:02 erikh

Hi @erikh, did you receive any pong from @someara how can we cross compile ZeroTier One for different CPU architectures?...

tinola avatar Mar 12 '22 21:03 tinola

Hi @tinola. We're not really set up for cross compilation right now... is there a way you can compile directly on your target architecture? Perhaps in a virtual machine?

someara avatar Mar 13 '22 07:03 someara

Well, unfortunately I haven't such possibility. I have got few STB's and some other devices with "truncated" Linux, there's small flash memory on board, there's no build tools as well :( The only possibility is to cross compile ZeroTier on other machine (VM or whatever else) using specific architecture toolchains. I think a lot of people would appreciate being able to cross compile...

tinola avatar Mar 13 '22 20:03 tinola

Proper cross compilations are definitely on The List.... we're working on re-vamping our build multi-arch infrastructure right now.

I'll be sure to keep FreeBSD in mind =) -s

someara avatar Mar 14 '22 15:03 someara

Thank you very much! :) I think this will be a milestone in developing and promoting ZeroTier for many different devices =) Personally I use a few toolchains built on FreeBSD via crosstool-ng to cross compile stuff. There're a lot of samples of different architectures where ZeroTier might become available :)

Again, thank you Sean!

tinola avatar Mar 15 '22 06:03 tinola

@tinola I have some experience with crosstool-ng and would like to see your ctng config for your target architecture. I can probably help you get up and running.

joseph-henry avatar Apr 12 '22 00:04 joseph-henry

@joseph-henry Do you have FreeBSD 13 as a host system? I've got already running toolchain for mipsel-unknown-linux-gnu built about a year ago, but no saved config. I can alternatively send you my complete toolchain if you want to look and try cross compile ZeroTier for mipsel target architecture. Thank you for your involvement.

tinola avatar Apr 12 '22 06:04 tinola

Is the any update regarding cross compilation? @someara I also want to cross compile zerotier for armv71 device using arm-linux-gnueabihf toolchain. Please help me out. Thanks

SahuPrabhat avatar Aug 20 '23 00:08 SahuPrabhat