I should add a check for 64-bit mode to the Mac-Carbon Makefile.PL. This will save a lot of hassle if I can give a nice error message, with a link to more information, up front.
I can't test this easily, though, since I don't yet have a 10.6 64-bit box (it's only on an original MacBook Pro, which is 32 bits). I will upgrade to Snow Leopard soon. I could try to make my own perl before then, but I don't know it would work the same way. So. If you want to help, now's your chance!
First thought is Config, but we all know Config can be flaky. For example, on my 32-bit box:
$ perl -V:use64bitall
use64bitall='define';
Doesn't really help. I don't know if $Config{intsize} would be 8 on a 64-bit perl. It's 4 on this 10.6 32-bit perl. I do know you should be able to call perl with VERSIONER_PERL_PREFER_32_BIT=yes to give you 32-bit perl, instead of the default 64-bit perl.
So anyway
Snow Leopard perl is both (Score:1)
This can be confusing when you have 32-bit libraries installed.
neptune:Imager tony$ export VERSIONER_PERL_PREFER_32_BIT=no
neptune:Imager tony$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=darwin, osvers=10.0, archname=darwin-thread-multi-2level
uname='darwin neige.apple.com 10.0 darwin
Re: (Score:2)
Thanks Tony, yeah, it looks like I am going to have to fudge $Config{ccflags} etc. before the Makefile is written, to strip out -arch x86_64. I think this will work.
Maybe I'll put up a test Makefile.PL for people to try out.
Re: (Score:2)
Tony, would you mind trying these files out? Drop them in the root Mac-Carbon-0.80 dir, then run `perl Makefile.PL` and `make` and `make test`. They try to remove the -arch x86_64 flags, and give a warning to any user trying to compile with a 64-bit perl.
http://pudge.net/tmp/Makefile.PL [pudge.net]
http://pudge.net/tmp/common.pl [pudge.net]
Re: (Score:1)
Re: (Score:2)
Ugh. OK, I had to rename them, or reconfigure the server, or put them in an archive. So rename them I did!
http://pudge.net/tmp/Makefile.txt [pudge.net]
http://pudge.net/tmp/common.txt [pudge.net]
Thanks.
Re: (Score:1)
Re: (Score:2)
Awesome, thanks. That dumb creator/type test is failing, I'll look at that again. But other than that, it seems to work for 32-bit.
Could you try one more thing? Do the first part again, running as 64-bit. But before you run make test, export VERSIONER_PERL_PREFER_32_BIT=yes, so you will have built it using the 64-bit perl, but are running the tests as 32-bit perl.
Thanks again.
Re: (Score:2)
Oh and, heh, I notice I got the logic backward on the 64-bit test. I reversed it when I was testing it and forgot to put it back before uploading it. Hope that wasn't too confusing.
Re: (Score:1)
build log [develop-help.com]
I used script to capture the output, so there's a few control characters in there, but the Makefile.PL and make were with VERSIONER_PERL_PREFER_32_BIT=yes and the make test with VERSIONER_PERL_PREFER_32_BIT=no
Re: (Score:2)
I used script to capture the output, so there's a few control characters in there, but the Makefile.PL and make were with VERSIONER_PERL_PREFER_32_BIT=yes and the make test with VERSIONER_PERL_PREFER_32_BIT=no
You mean the other way around, right? I don't see make test working under 64-bit. :-)
So it looks like just what I hoped for. It seems buildable no matter if perl is running as 64-bit or 32-bit. Just need to fix that one broken test, and maybe try to find a way to run make test with VERSIONER_PERL_PREFER_32_BIT=yes.
Thanks!
Re: (Score:1)