-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
perl "remembers" spack's compiler, which does the wrong thing #4338
Comments
This snippet: tie %Config, 'Config', {
archlibexp => '/home/hartzelg/tmp/spack-perl-cc/opt/spack/linux-centos7-x86_64/gcc-4.8.5/perl-5.24.1-35ejv4426dmzreum4ekdibu3ddmhquvi/lib/5.24.1/x86_64-linux',
archname => 'x86_64-linux',
cc => 'cc',
# [...] Is this a text file somewhere in the installation? Can we filter it post-install like we do for the MPI wrappers? |
Look at the |
@adamjstewart -- yes, here @tgamblin -- will do. |
For whichever reason, I stumbled over this misbehaviour only this week, after a fresh checkout. My system has gcc 4.8.5 installed, and usually I build the latest gcc version in two stages, using (1) 4.8.5 to build 9.2.0, then (2) using that to build 9.2.0 again. As a result, I would get rid of everything built with 4.8.5 (and indeed, a "spack uninstall %gcc@4.8.5" didn't report any conflicts), living on with a gcc-9.2.0 tree only. perl, and libtool FWIW, still kept a memory of the old bootstrapping gcc (perl in Config.pm and Config_heavy.pl in lib/5.30.0/*multi/; libtool in ... yes, bin/libtool). Fortunately, those are text files easily tweaked with "sed". Afterwards, "perl-html-parser" built fine. How come this issue could resurface at all? |
Additional Perl packages (e.g. from CPAN) should (need to) be built with the same compiler that built
perl
itself.Perl handles this detail by remembering the compiler with which it was built. It "remembers" it by stashing a copy of it in the
Config
hash defined inConfig.pm
:On my system this drags
/usr/bin/cc
into the fray, resulting in sadness.As an example, using the
cpanm
that Spack builtwill eventually fail while trying to build
Net::HTTP
because it tries to usecc
as its compiler.As a quick hack/test, telling configure to use
gcc
as the C compiler results$Config{cc}
containinggcc
and happily the first gcc on my path is the one I used to build Perl.This changes lets
Net::HTTP
build and install.Spack's compiler wrappers and etc seem magical to me. What's a good way to fix this?
The text was updated successfully, but these errors were encountered: