-
Notifications
You must be signed in to change notification settings - Fork 17
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
Document how to build portable, cross-platform binaries #4
Comments
Initial brainstorming notes: OS X
Linux
Windows
C++ Language specific portability limitations
|
Working on https://github.com/springmeyer/glibcxx-symbol-versioning to get a good handle on how symbol versioning works on linux and what triggers your binaries to require certain GLIBCXX symbols. /cc @mapsam @GretaCB |
@springmeyer out of curiosity do you see writing code that handles different endianness properly to be part of this discussion, or a different issue? |
@apendleton absolutely, let's document anything we've hit as a real-world issue, even if only partially solved. Protozero, for example, has basic support for handling endianess. We should get @joto to document the design and status of that (https://github.com/mapbox/protozero/blob/f5ea37d5b431024de6f87a95c9b0226b850d2ef4/include/protozero/config.hpp#L21-L47) |
@apendleton I've added a section to the outline above called |
@springmeyer There is no "design" in the endianness handling of protozero. I checked what boost was doing and then built the simplest thing that made everything work on the test cases we had (specifically Debian builds on unusual architectures in their build cluster) without using boost. Generally I recommend creating Debian packages for everything. Not only are they useful for lots of people, but they also force good code (like endianness correctness as seen here) and they also check licenses and are really nitpicky about every detail. |
Creating C++ binaries portable to a given platform (osx, linux, windows) or platform version (ubuntu precise or trusty) is absolutely feasible but a poorly documented topic. Often our goal at Mapbox is to support the latest C++11 and C++14 features but maintain code portable to older operating systems like Windows 7, OS X 10.8, and Ubuntu Precise, or RHEL 6/7. This is also feasible. For example its possible to run C++14 binaries on AWS lambda (built on ubuntu precise) even though you can't easily compile them on AWS Lambda.
We should document how Mapbox writes and distributes portable C?C++ code to make clear when this approach is advantageous and when it is not. And to ensure the techniques are robust and replicable.
This issue is to track:
The text was updated successfully, but these errors were encountered: