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
[PATCH] h2ph inc_dirs() fails to prepend gcc include search path, resulting in missing C standard headers on Linux #8183
Comments
From jvdias@redhat.comCreated by jvdias@redhat.comWhen building perl-5.8.7 on Linux, the standard C headers fail to The C standard headers, such as : This is because h2ph's inc_dirs() does not find the string gcc 4 understands the '-print-search-dirs' option: Here's a patch which corrects h2ph.PL's inc_dirs() to pick up --- Inline Patch--- perl-5.8.7/utils/h2ph.PL.bz172236 2005-04-04 17:47:17.000000000 -0400
+++ perl-5.8.7/utils/h2ph.PL 2005-11-01 17:42:36.000000000 -0500
@@ -734,9 +734,15 @@
# non-GCC?) C compilers, but gcc uses an additional include directory.
sub inc_dirs
{
- my $from_gcc = `$Config{cc} -v 2>&1`;
- $from_gcc =~ s:^Reading specs from (.*?)/specs\b.*:$1/include:s;
-
+ my $from_gcc = `LC_ALL=C $Config{cc} -v 2>&1`;
+ if( !( $from_gcc =~ s:^Reading specs from (.*?)/specs\b.*:$1/include:s ) )
+ { # gcc-4+ :
+ $from_gcc = `LC_ALL=C $Config{cc} -print-search-dirs 2>&1`;
+ if ( !($from_gcc =~ s/^install:\s*([^\s]+[^\s\/])([\s\/]*).*$/$1\/include/s) )
+ {
+ $from_gcc = '';
+ };
+ };
length($from_gcc) ? ($from_gcc, $Config{usrinc}) : ($Config{usrinc});
}
--- Perl Info
|
From @smpeters
Thanks, I've applied this as change #26074. |
The RT System itself - Status changed from 'new' to 'open' |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#37582 (status was 'resolved')
Searchable as RT37582$
The text was updated successfully, but these errors were encountered: