Skip to content
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

Binary cross-compilers and cross-compiled libraries #2790

Closed
luke-jr opened this issue Sep 15, 2014 · 9 comments
Closed

Binary cross-compilers and cross-compiled libraries #2790

luke-jr opened this issue Sep 15, 2014 · 9 comments

Comments

@luke-jr
Copy link

luke-jr commented Sep 15, 2014

It would be convenient if there was a way to have Travis easily install cross-compilers and cross-compiled libraries. I don't know any sane way to do this on Ubuntu, but it's fairly simple on Gentoo: just crossdev -t i686-pc-mingw32 then i686-pc-mingw32-emerge libwhatever; this can be trivially set up to build binary packages that can be reused/shared between builds.

@Joshua-Anderson
Copy link

What kind of cross compiling do you want? X86_64 -> X86? To ARM?

@luke-jr
Copy link
Author

luke-jr commented Sep 16, 2014

Primarily Linux -> MinGW and Linux -> Mac. Even when/if native support for compiling on those platforms becomes available.

@luke-jr
Copy link
Author

luke-jr commented Sep 16, 2014

Angstrom, Android, and OpenWrt would be nice to target too.

@Joshua-Anderson
Copy link

Cross compilation isn't a common request, often because people often only need to test on architecture, and it's hard to test the cross compiled code. I'm sure you can install and set up the cross compilers for yourself in your build.

@Joshua-Anderson
Copy link

Android is supported via the android language.

@luke-jr
Copy link
Author

luke-jr commented Sep 16, 2014

It's nice to at least know software builds without warnings on all supported platforms, even when running tests isn't possible (although for Windows targets, WINE can usually help run tests). Unfortunately, setting up the cross compilers for myself on Ubuntu involves compiling every single dependency, every single time - which will slow it down and tie up build resources unnecessarily.

@BanzaiMan
Copy link
Contributor

This is a very broad request that should be addressed in small and manageable chunks.

In general, when we consider supporting a new feature of this magnitude, we want to understand what steps are needed (on the repository level) on Travis to achieve the feature, and then identify the wins (does the step require a lot of overhead that the platform can help?), how important it is for our user base, and plot out what can be done (if any) in the long run.

Right now, our workers are on Ubuntu and OS X (which might change in the future, but adding support for other distros would require some considerable effort), so whatever solutions that might be suggested would need to work on at least one of these platforms.

Pre-installing compiled binaries for the VM images might be doable (or even desirable). However, this will tie the compiled tools to worker images, which may not be updated as often as our users might like. In this sense, having on-demand mechanism to install things can be a win.

@roidrage
Copy link
Contributor

I'm closing this issue for now, as we have no immediate plans to add this feature.

Should we add it to the roadmap eventually, we'll make sure to update this ticket.

@doug65536
Copy link

What? None of that stuff is correct. To install and use cross compilers on linux, just install these with the apt-get:

mingw-w64
binutils-mingw-w64
mingw-w64-tools

Then to build 64 bit windows binaries, compile with:
x86_64-w64-mingw32-g++ etc... It's just a prefix.

and to build 32 bit windows binaries:
i686-w64-mingw32-g++ etc... It's just a prefix.

Which actually works fine in my .travis.yml. Problem is, the ancient distribution of used on travis. Seriously version 12? Come on! The package manager's version of mingw doesn't even recognize -std=c++11.

@roidrage Any way to make it use a ppa that has newer packages, or something?

Example cross compile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants