port only builds with build_arch=i386 on command line -- any way to specify that in the portfile?
Ken Cunningham
ken.cunningham.webuse at gmail.com
Fri Sep 2 09:42:14 PDT 2016
Short version:
I have a port that builds correctly only with arch=i386. x86_64 builds fail.
I can get this to build with "sudo port install basiliskII build_arch=i386"
but I can't seem to find the command to specify that the portfile.
Is there a way?
Long version:
I'm working on updating the BasiliskII portfile. I use this software often enough to care about it being up to date, but it has a few idiosyncracies.
Indeed I have the new portfile working to the latest github commits, BUT because of the current BasiliskII JIT compiler internals, it requires gcc-4.0 only (I'm hoping that apple-gcc40 will build it on newer OSs once I get this working here), and it builds if it's compiled only with architecture i386.
The x64_86 build runs into troubles with errors like this in their bitshifting / bitblitting routines:
./../CrossPlatform/video_blit.h:131: error: integer constant is too large for ‘unsigned long’ type
./../CrossPlatform/video_blit.h:131: error: integer constant is too large for ‘unsigned long’ type
I was initially led to believe this was due to libSDL's architecture not being i386, but this is apparently not right. It's a 32bit/64bit thing.
Clearly upstream needs to fix this someday, but it's been like this for years. Everyone just builds it i386 and leaves it at that.
My machine, like almost everyone's, builds x86_64 and optionally i386. Even with +universal the build fails, however, when the x86_64 arch runs into the above error.
Clang does build it universal, but then the JIT fails due to the assembly language being i386 specific. So for now at least, it's gcc-4.0/i386 only if you want the JIT.
I can get the port to build and work just fine with:
sudo port install basiliskII build_arch=i386
but I can't seem to find a way to specify this in the portfile (ie disable the x86_64 build and build only the i386 build).
I dug through the website to see if I could find the appropriate portfile command and tried things like
build.args arch=i386
but that did not do the same thing as the command line option.
Thoughts?
Ken
More information about the macports-dev
mailing list