-
Notifications
You must be signed in to change notification settings - Fork 51
Adjust "./Configure" for wider architecture support #43
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
Conversation
This adds an appropriate "-Darchname" value for cross-building (arm32v7 builds on an arm64v8 kernel, i386 builds on an amd64 kernel, etc), and conditionally converts "-Duse64bitall" into "-Duse64bitint" (which is what Debian uses when compiling Perl). See also https://sources.debian.net/src/perl/stretch/debian/config.debian/#L115 and https://sources.debian.net/src/perl/stretch/debian/config.debian/#L130. > *** You have chosen a maximally 64-bit build, > *** but your pointers are only 4 bytes wide. > *** Please rerun Configure without -Duse64bitall. > *** Since you have quads, you could possibly try with -Duse64bitint.
Might be worth noting that this requires docker-library/buildpack-deps#65 as-is, which was merged to official-images over in docker-library/official-images#3378. |
"64bit" => "-Duse64bitall $common", | ||
"64bit,threaded" => "-Dusethreads -Duse64bitall $common", | ||
"64bit" => "$common", | ||
"64bit,threaded" => "-Dusethreads $common", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we ought to change the 64bit
names here now to something else (maybe std
,) since we can build 32- or 64-bit depending on dpkg-architecture
.
😇 definitely didn't intend to steal your thunder!
I won't be offended at all if you redo this outright or just want to take
over, but I'm also happy to help, adjust etc as much as you'd like me to. 👍
|
Haha no worries, no offense taken at all! :D |
@tianon how would I go about testing this on my own? Say, I want to try building 32-bit Perl 5.22 and 5.24 on amd64. I was looking at https://doi-janky.infosiftr.net/job/multiarch/ but can't make out the process (probably not looking hard enough...) |
The build server does something like the following. $ docker pull i386/buildpack-deps:stretch
$ docker tag i386/buildpack-deps:stretch buildpack-deps:stretch
$ docker build -t image-name . An example from travis build for memcached. That will most likely interfere with other images you build on the same machine. You can accomplish the same thing by temporarily changing the FROM in the Dockerfile to |
Thanks @tianon @yosifkit for the help, I'm able try building 32-bit Perls 5.22 through 5.26 on amd64, and I'll take @tianon's word about the other archs he has already tested. :) I'll adjust this after merging to rename some paths to the Dockerfiles as hinted in #43 (comment); many thanks again! |
- Update to Perl 5.24.3 and 5.26.1 - Build Perl for more architectures (Perl/docker-perl#43)
This builds on #38, and adds an appropriate
-Darchname
value for cross-building (arm32v7 builds on an arm64v8 kernel, i386 builds on an amd64 kernel, etc), and conditionally converts-Duse64bitall
into-Duse64bitint
(which is what Debian uses when compiling Perl).See also https://sources.debian.net/src/perl/stretch/debian/config.debian/#L115 and https://sources.debian.net/src/perl/stretch/debian/config.debian/#L130.
I've personally tested (successfully) building
5.026.000-64bit/Dockerfile
onarm32v7
,arm64v8
,i386
,s390x
, andppc64le
. I'm happy to perform further testing as desired. This should really work fine on any of the architectures supported bybuildpack-deps:stretch
(amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, s390x
), although I haven't verifiedarm32v5
directly (since it has no hardware floating point, and thus is usually really slow 😅).