Ok I am trying to make an almost bleeding edge linux distro using the LFS version 6.5 but I keep getting this error during the linux kernel headers check.
Insecure dependency in open while running setuid at scripts/headers_install.pl line 31
Then the script fails.
I already tried chowning all the files in my working directory for the lfs user to be readable, writable, and executable.
I opened up the linux kernel scripts/headers_install.pl file and this was the contents:
Code:
use strict;
my ($readdir, $installdir, $arch, @files) = @ARGV;
my $unifdef = "scripts/unifdef -U__KERNEL__";
foreach my $file (@files) {
local *INFILE;
local *OUTFILE;
my $tmpfile = "$installdir/$file.tmp";
open(INFILE, "<$readdir/$file")
or die "$readdir/$file: $!\n";
open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n";
while (my $line = <INFILE>) {
$line =~ s/([\s(])__user\s/$1/g;
$line =~ s/([\s(])__force\s/$1/g;
$line =~ s/([\s(])__iomem\s/$1/g;
$line =~ s/\s__attribute_const__\s/ /g;
$line =~ s/\s__attribute_const__$//g;
$line =~ s/^#include <linux\/compiler.h>//;
$line =~ s/(^|\s)(inline)\b/$1__$2__/g;
$line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
$line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
printf OUTFILE "%s", $line;
}
close OUTFILE;
close INFILE;
system $unifdef . " $tmpfile > $installdir/$file";
unlink $tmpfile;
}
exit 0;
Line 31 would be this line:
Code:
open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n";
I am not sure what that error means let alone how to fix it.
Can you help me?
I work specifically in C and C++ but NOT in Perl. :-/