LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2017, 03:44 PM   #1
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Rep: Reputation: Disabled
LFS Perl-5.24.1 Make Error 2


Hello all,

I've tried making an LFS system before and have made it further this time than any other, but I've hit a snag at making Perl.

opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o -lm /tools/lib/libcrypt.a
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
./miniperl -Ilib -f write_buildcustomize.pl
Invalid \0 character in pathname for require: strict.pm\0 at write_buildcustomize.pl line 3.
Can't locate strict.pm: No such file or directory at write_buildcustomize.pl line 3.
BEGIN failed--compilation aborted at write_buildcustomize.pl line 3.
make: *** [makefile:385: lib/buildcustomize.pl] Error 2

Does anyone have any ideas to fix this?

Thanks.
 
Old 06-21-2017, 08:01 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Afaik, Error 2 just means the build aborted. Try editing the make file compiler switches to turn all errors into warnings, and remove compiler optimizations. You also might be missing certain c++ headers.

This also might help: https://rt.perl.org/Public/Bug/Display.html?id=131415

Last edited by AwesomeMachine; 06-21-2017 at 08:04 PM.
 
Old 06-21-2017, 08:21 PM   #3
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Which switch would that be?
 
Old 06-21-2017, 11:26 PM   #4
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
So I prepared for the build of perl as the book says, using make -w instead and got the same result.
 
Old 06-22-2017, 12:08 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,818

Rep: Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083
The usual answer is that you have missed something, however, as the error is very specific, have you checked write_buildcustomize.pl to search for strict.pm and see if there are any invalid characters?
Could be the file was not downloaded correctly and somehow this file has truncated data??
 
Old 06-22-2017, 03:54 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Gcc and g++

Quote:
Originally Posted by 1993istheend View Post
Which switch would that be?
The Linux compilers have many options. But if you're building your own brew you have to learn the common ones.

I don't know which are in the makefile you have. But you should have a look at the man page for gcc. It also could be that the error message states the actual cause of the error, in which case you can do as grail wrote above.
 
Old 06-22-2017, 04:32 PM   #7
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Here is the output for the first part of write_buildcustomize.pl:

#!./miniperl -w

use strict;

my $osname = $^O;
my $file = 'lib/buildcustomize.pl';

if ( @ARGV % 2 ) {
my $dir = shift;
chdir $dir or die "Can't chdir '$dir': $!";
unshift @INC, 'lib';
}

if ( @ARGV ) {
# Used during cross-compilation.
$osname = $ARGV[1];
}


The error says something is missing in line 3, but I'm not sure what.

EDIT: I figured I'd look for strict.pm but it's not in my source for perl-5.24.1, although I do have it on the host machine.

Last edited by 1993istheend; 06-22-2017 at 04:53 PM. Reason: new info
 
Old 06-22-2017, 05:33 PM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
I think this is what its complaining about:
Code:
$^O
 
Old 06-22-2017, 05:37 PM   #9
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Should I comment that line out?
 
Old 06-23-2017, 01:13 AM   #10
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,818

Rep: Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083Reputation: 3083
You would probably need to check where $osname is being used. I would add that at the point you are in the build it WILL still be using the host systems copy of perl to support the 'use' call.
So strict.pm will be the one from your host system.
 
Old 06-24-2017, 10:10 AM   #11
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
"^O" gets the name of the current operating system inside a Perl script. The fact that it is complaining of an invalid character coming from ^O may mean that Unicode is getting in there. I would try:

Code:
(Assuming you're in chapter 5.)
LC_CTYPE=en_US.UTF-8 sh Configure -des -Dprefix=/tools -Dlibs=-lm
LC_CTYPE=en_US.UTF-8 make
Replacing "en_US" with your actual locale, and see if that works.
 
Old 06-26-2017, 03:40 PM   #12
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Luridis View Post
"^O" gets the name of the current operating system inside a Perl script. The fact that it is complaining of an invalid character coming from ^O may mean that Unicode is getting in there. I would try:

Code:
(Assuming you're in chapter 5.)
LC_CTYPE=en_US.UTF-8 sh Configure -des -Dprefix=/tools -Dlibs=-lm
LC_CTYPE=en_US.UTF-8 make
Replacing "en_US" with your actual locale, and see if that works.
This would be before the make command in the perl section of chapter 5?

EDIT: I saw that these commands were similar to the ones in the book, I ran them and ended up with the same error. I may just start over.

Last edited by 1993istheend; 06-26-2017 at 03:55 PM. Reason: new info
 
Old 06-26-2017, 04:01 PM   #13
1993istheend
LQ Newbie
 
Registered: Jun 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
I did seem to see more errors this time though:

cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o -lm /tools/lib/libcrypt.a
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
Invalid \0 character in pathname for open: /dev/null\0.
Can't open /dev/null: No such file or directory
Failed to build miniperl. Please run make minitest
make: *** [makefile:384: lib/buildcustomize.pl] Error 1
lfs@tcc-AOD255E:/mnt/lfs/sources/perl-5.24.1$ make minitest
cc -fstack-protector-strong -L/usr/local/lib -o miniperl \
opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o miniperlmain.o -lm /tools/lib/libcrypt.a
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
./miniperl -Ilib -f write_buildcustomize.pl
Invalid \0 character in pathname for require: strict.pm\0 at write_buildcustomize.pl line 3.
Can't locate strict.pm: No such file or directory at write_buildcustomize.pl line 3.
BEGIN failed--compilation aborted at write_buildcustomize.pl line 3.
make: *** [makefile:385: lib/buildcustomize.pl] Error 2
 
Old 06-26-2017, 07:27 PM   #14
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
LC_CTYPE=<your locale> (commands)

Indicates you want to run (commands) with the CTYPE of a different locale than you're using. The strict.pm\0 is an indication that you're system isn't reading the line with the correct character set. There are numbers there it doesn't understand the purpose of and that's what's getting translated into "\0" by the system library.

Are you using ssh? A non-us locale or keyboard? Was your LC_ALL set to POSIX in chapter 5?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] error with perl 6.41.1 error on make lfs 7.9 sfzombie13 Linux From Scratch 6 09-03-2016 02:17 PM
[SOLVED] LFS 7.9 Which source and build directories to retain? +Perl make fail Chapter:5 Tim Abracadabra Linux From Scratch 11 04-14-2016 06:05 AM
[SOLVED] perl make test error lfs 6.5 aahiqmir Linux From Scratch 2 04-07-2010 07:22 AM
LFS 4.1: Stalled at Perl, "missing seperator" error from "make" SparceMatrix Linux From Scratch 1 06-07-2003 03:31 PM
Error compiling Perl (making LFS system 3.3)... MatMan5959 Linux - Software 0 06-02-2002 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration