#1977 closed defect (fixed)
Perl compile fails at autosplit phase
Reported by: | Paul Lowman | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Book | Version: | 6.2 |
Severity: | normal | Keywords: | preplibrary autosplit |
Cc: |
Description
Perl-5.8.8 compile fails with Make [preplibrary] Error 1. This is due to failure of miniperl to execute autosplit. The fix is to create lib/auto manually after the configure phase.
Attachments (3)
Change History (26)
comment:1 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 18 years ago
Milestone: | 6.2 → 6.3 |
---|
comment:3 by , 18 years ago
I am using a build from CoreLinux - now no longer active. I am now using jhalfs with the lfs live CD and it appears to be all ok ..
comment:4 by , 18 years ago
I had a hunch that it was because of the host's /bin/sh since I'd noticed some problems with that in a different context, but you should be using bash at that point if /tools/bin is at the front of your path.
I'd appreciate if you could help debug this since I can't reproduce it and there's another person with the same problem. Could you run this command before the build and log the output?
sed -i 's/^\([[:space:]]*\)@/\1/' Makefile.SH
That will cause make not to suppress the output from some commands. Hopefully the sed from CoreLinux can handle that, but I can't see why it shouldn't.
comment:7 by , 18 years ago
Looks like it fails silently. Thanks, perl! In the future, you can redirect one of the streams onto the other so that it comes out in a single stream. Here's one way:
do something > logfile 2>&1
Next question. After it fails, what happens if you just try to run the command on your own? What about if you remove the lib/auto directory first?
sh ./makedir lib/auto echo $?
comment:8 by , 18 years ago
the command returns an error of 1
the following works ...
mkdir lib/auto
also makedir works when root ...
the permissions of $LFS/sources/perl-5.8.8 all seem to be OK.
comment:9 by , 18 years ago
Right, something in their shell script makedir is failing. In the end, the workaround might just be to mkdir -p lib/auto before make, but I'd like to know what the issue is. In the same circumstances as before, what happens when you turn on tracing in the shell?
sh -x ./makedir lib/auto echo $?
If you could attach the output from the 'sh -x' call, that would be great.
Also, did you mean that just running ./makedir worked, or that calling mkdir worked?
by , 18 years ago
Attachment: | shell.trace added |
---|
comment:11 by , 18 years ago
Interesting. For some reason, the for loop at the end of ./makedir doesn't work correctly. It ends up running mkdir with no arguments and failing.
When you are the lfs user, you have /tools/bin at the beginning of your path, right? What do you get when running "which sh"?
comment:13 by , 18 years ago
OK. I think there's something wrong with the bash that you built. Try this test case.
$ cat > test.sh << "EOF" set ./lib ./lib/auto for dir do echo $dir done EOF $ /tools/bin/sh -x ./test.sh
It should echo ./lib and ./lib/auto on separate lines with some tracing output.
comment:14 by , 18 years ago
Could you also execute the test script as "/tools/bin/bash -x ./test.sh"?
comment:15 by , 18 years ago
[~]# /tools/bin/sh -x ./test.sh + set ./lib ./lib/auto + for dir in '""' + echo
comment:16 by , 18 years ago
Now that is peculiar and it's a bug in bash. My next guess is, what version of bison does your host have? From my look at the bash sources, the parser that defines this behavior is created by bison. You can get this by running "bison --version" from the host.
comment:18 by , 18 years ago
On the support list, we were able to confirm that this is a bison issue. He also had bison-1.75, and updating his host to bison-2.2 solved the issue. I still have track down what the minimum required version is. I suspect 2.0.
http://linuxfromscratch.org/pipermail/lfs-support/2007-April/032888.html
http://linuxfromscratch.org/pipermail/lfs-support/2007-April/032909.html
The development book needs to have the host reqs page adjusted, and stable needs an errata entry (a more accurate one, anyway).
comment:20 by , 18 years ago
Thanks, Manuel. I confirm that bash is broken with bison-1.75, but works with bison-1.875 and bison-2.0.
Can anyone remind me the story of bison 1.875a vs. 1.875? Is it acceptable to list 1.875 as the minimum version?
comment:21 by , 18 years ago
The story is that Bison 1.875 could not generate valid C++ parsers. This was first discovered when building OpenOffice.org, the BLFS book even contained a note that the reader must downgrade Bison to 1.75 to avoid the error.
Paul, what distro are you installing from?