Open slahtinen opened 11 years ago
Why perlbrew should automatically tune options? Is it a PAR::Packer bug?
I don't think that it's PAR::Packer bug, because this ain't the only cpan module which can't be installed because of this. Honestly, I can't remember which those others are, but I have seen this multiple times.
Why not to fix this? I can't see anything wrong in good and working defaults. User can override these options, but I think that a most times users are a much more happier to use product which works, than spending a few sleepless nights trying to figure out why they can't install modules from cpan.
Because it not fix, it is a workaround that hides real bug. Seems like PAR::Packer incorrectly detect compiler environment. And add incorrect for this OS option (may be in this line https://metacpan.org/source/RSCHUPP/PAR-Packer-1.014/myldr/Makefile.PL#L126 )
Just create a bug in PAR-Packer rt queue: https://rt.cpan.org/Public/Bug/Display.html?id=84588
Thanks for this. I just had the same problem using perlbrew to build perl-5.12.4 and then cpanm PAR::Packer on OS X 10.8. I can confirm that re-installing perl-5.12.4 with perlbrew option -Dcc="clang" solved the issue. It also fixed several other modules installs that failed in the testing phase, but could still be installed with --force, one of which was (pretty sure it was) Crypt::OpenSSL::RSA.
Here is my perlbrew config for brewing a universal perl on OS X. I believe some of these may be redundant.
addflags="-arch i386 -arch x86_64 -mmacosx-version-min=10.5" PERLBREW_CONFIGURE_FLAGS='-Accflags="$addflags" -Aldflags="$addflags" -Acccdlflags="$addflags" -Alddlflags="$addflags" -Accdlflags="$addflags" -Uloclibpth -Dlibpth=/usr/lib -Dcc="clang" -de' perlbrew install perl-5.12.4
and the modules I installed:
cpanm File::Slurp PerlIO::gzip File::Slurp JSON Crypt::Mode::CBC Crypt::OpenSSL::RSA XML::Simple Archive::Zip
Remove -Dcc="clang" to reproduce multiple failures.
@slahtinen . This issue is over 10 years old now. If you can close it that would be great. Thanks.
Perlbrew should add -Dcc='clang' option when it installs Perl under OS X Mountain Lion. This may also affect an another OS X versions, but currently I don't have any possibility to test those.
However, this can be easily tested with...
$ cpan -i PAR::Packer
which ends an error...
env MACOSX_DEPLOYMENT_TARGET=10.3 cc boot.o -static-libgcc -fstack-protector -L/usr/local/lib -L/Users/sl/perl5/perlbrew/perls/perl-5.12.5/lib/5.12.5/darwin-2level/CORE -ldl -lm -lutil -lc -o ./boot clang: error: unsupported option '-static-libgcc' make[1]: * [boot] Error 1 make: * [subdirs] Error 2 RSCHUPP/PAR-Packer-1.014.tar.gz /usr/bin/make -- NOT OK 'YAML' not installed, will not store persistent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible
With Perl's which are installed with an option -Dcc='clang' module install end's correctly.