-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cross-compilation instructions #162
Comments
Yes, one of the downsides to using boost is the crazy resources used while compiling. :( |
the other issue with this type of cross is you need more then the compiler... you need all of the secondary packages and their related header files in your cross build environment. It's non-trivial to set this up, and I think it is well beyond the scope of 'wpantund' to document this. |
I have successfully cross-compiled wpantund and wpanctl for a BeagleBone Black via arm-linux-gnueabihf-gcc. Here are the steps. If there's a better place to put this write-up (like on a Wiki page) I would be happy to drop it there. First, in a clean repo: Don't forget to sudo-alternatives the arm-linux-gnueabihf gcc installation (it doesn't seem to do it by default on my installation):
Need to download dbus arm library for armhf builds:
Add these lines to /etc/apt/sources.list:
Then: Go to a temporary directory (important!) and run:
The above lines may be different depending on the name of the packages that were downloaded. Also, it may give some errors, but you can safely ignore those. You can delete the temporary directory when you are done. Finally: And the moment you've been waiting for (it can be built now):
Note: You may need to use this configure step instead (depends on linking/version of D-Bus):
The -j12 option sometimes fails. You may need to drop that number (-j4 works nicely) or not use the "-j" option at all. Also, you can remove the dpkg arm architecture after you're done installing dbus, if the sudo apt-get error messages annoy you. [Following steps are optional, only the above steps are necessary to remove the apt-get error message] And remove the following lines from /etc/apt/sources.list:
Lastly, some notes on installing the binaries: wpantund installs here: With some plugins here: With configuration file here:
There are also some header files here: wpanctl installs here: |
The above steps are for Ubuntu 14.04. I just tried those steps for 16.04, and it failed miserably, but I did get it working via a much simpler multiarch setup: Steps to set up multiarch: Add these lines to /etc/apt/sources.list:
Then: Finally, install the libraries (armhf versions) need to build wpantund:
Configure dbus pkg-config: Now you can build away:
|
Nice! I wonder if we could wrap up all of those steps into a docker container so that it would be easier to do. |
Hello I installed the build system for omega2+ https://onion.io/2bt-cross-compiling-c-programs-part-1/
And followed https://github.com/OnionIoT/c-cross-compile-example My problem is:
|
I know very little about the Omega2+, but my guess is that running |
To start, it would be great to have instructions on how to x-compile wpantund on MacOS/Linux targeting a less-beefy SBC like the Raspberry Pi 3. As a user I've used http://crosstool-ng.github.io/ but I'm sure there are other options out there, especially using automake.
The text was updated successfully, but these errors were encountered: