Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6071 - Perl 5.6.1 r5 ebuild failing
Summary: Perl 5.6.1 r5 ebuild failing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michael Cummings (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 15006
Blocks:
  Show dependency tree
 
Reported: 2002-08-05 22:36 UTC by Andrew Joyce
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build log from perl 5.6.1 r5 update (perl-5.6.1-r5.ebuild.out,21.19 KB, text/plain)
2002-08-05 22:37 UTC, Andrew Joyce
Details
possible fix (perl-5.6.1-r6.ebuild,5.62 KB, text/plain)
2002-08-27 20:21 UTC, Michael Cummings (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Joyce 2002-08-05 22:36:03 UTC
The perl 5.6.1-r5 ebuild fails when trying to build.  I get the following final
failure message.  The full build log is attached to the bug report.

----------------------------------------------------------------------------

sed: -e expression #1, char 54: Unknown option to `s'
sh ./makedepend.SH
Extracting makedepend (with variable substitutions)
sh ./makedepend MAKE=make
test -s perlmain.c && touch perlmain.c
cd x2p; make depend
make[1]: Entering directory `/var/tmp/portage/perl-5.6.1-r5/work/perl-5.6.1/x2p'
sh ../makedepend MAKE=make
make[1]: Leaving directory `/var/tmp/portage/perl-5.6.1-r5/work/perl-5.6.1/x2p'
`sh  cflags libperl.so perl.o` -fPIC perl.c
          CCCMD =   -DPERL_CORE -c   
/bin/sh: -c: command not found
make: *** [perl.o] Error 127

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_compile, Line 42, Exitcode 2
!!! (no error message)

!!! emerge aborting on  /usr/portage/sys-devel/perl/perl-5.6.1-r5.ebuild
Comment 1 Andrew Joyce 2002-08-05 22:37:11 UTC
Created attachment 2852 [details]
build log from perl 5.6.1 r5 update
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2002-08-06 06:11:28 UTC
Andrew,

     Just wanted to let you know that I've received your bug and will be 
working on it this week. Just to be safe, can you send me a copy of your USE 
and FLAGS from make.conf? Thanks!

Michael
Comment 3 Andrew Joyce 2002-08-06 07:15:42 UTC
Hey Michael,

Thanks for the quick reponse.  Here is is the info from the make.conf file.

USE="pda dvd "
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -O3 -pipe"
CXXFLAGS="-march=i586 -O3 -pipe"

Andrew
Comment 4 Michael Cummings (RETIRED) gentoo-dev 2002-08-27 10:06:19 UTC
Believe it or not, I've been mulling this one over, then realized that the 
answer was at the tail end of your attachment (duh, I'm sure). First question: 
Do you have a good/recent copy of sed? If so, I can give you a different 
version of the troubling sed line to see if it helps you. Really sorry for the 
delay on this,

Mike
Comment 5 Andrew Joyce 2002-08-27 19:58:47 UTC
Hi Mike,

I have...
GNU sed version 3.02.80

I don't know what you would consider a 'good/recent copy of sed' so hopefully
this fits your bill.

I also have the perl-5.6.1-r6 ebuild trying to build now and it is failing in
exactly the same manner.  I would be very grateful to try out any ideas you have.

Andrew
Comment 6 Michael Cummings (RETIRED) gentoo-dev 2002-08-27 20:21:04 UTC
Created attachment 3484 [details]
possible fix

I have to admit, your bug is somewhat unique. It appears from your transaction
log that it is failing to sed a line in the config file properly. The sed is
supposed to replace the empty flags with your CFFLAGS - and since the sed is
failing, the flags are empty, which is confusing the rest of the make (the
empty -c error). Why it is failing for you and not others is the more troubling
part (hence the question about your sed version). I've attached a redo of the
-r6 ebuild (r6 had some corrections that I would recommend over the r5) that
escapes the part that sed appears to be having difficulty reading. Please let
me know if it works for you, and if not, we can go from there. Thanks!

Mike
Comment 7 Michael Cummings (RETIRED) gentoo-dev 2002-09-05 22:12:19 UTC
Andrew,

    Sorry for the hiatus. The problem is that when configure is run, it isn'
populating your cflags correctly in the perl make directory. A typical
conclusion to the line in your output that reads -c is -c -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -02 (pulled from a couple of places,
based on what is given back to the sh scripts that grab this information). If
you still have a /var/tmp/portage/perl-5.6.1-r5/work directory (possibly left
over because the build didn't complete, those these are usually wiped after a
successful build), there is a file named cflags which runs at the start of the
make process and grabs your env flags and runs them against the various .c flags
as a precompile test. In fact, you can manually run that file (./cflags) and
should see output along the lines of FILENAME.c  cc -c -DPERL_CORE
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -mcpu=i686 -O3
-pipe 
(FILENAME being, well, some filenames :)

BTW, I was on the right track with sed, but was blaming our ebuilds. There is a
sed call in the cflags script where it does its grab. Right idea at least :)

One thing that might be worth trying, though I admit I'm only guessing here (not
an expert on how cc flags are populated, though I'm trying to get more
information) is to clear the perl tar ball out of /usr/portage/distfiles (which
if you want to confirm, should have a cksum of 2264947059 5983695
/usr/portage/distfiles/perl-5.6.1.tar.gz - if it doesn't, definitely remove it,
otherwise, your call), remove the /usr/portage/perl-5.6.1-r?/work dir to be sure
there are any left over items, then attempt a fresh re-emerge.

I'm going to see if I can get a hold of any of our gcc guys to see if they know
anything about how the cflags are populated, but that might be a little while.

Thanks for your patience! If you would like, I have a 585 that I can do a
buildpkg on for perl and make it available for local install (same make.conf
flags you are using).
Comment 8 Andrew Joyce 2002-09-05 22:19:34 UTC
Well, problem solved.  (Finally, and sort of embarrasingly)

I finally found the sed call in the build scripts that was causing the error,
put in an echo statement with it just before the call so I could see it and
found that it was adding -I/usr/include/X11 into the line.  The / was not
escaped so sed was crapping out.  I couldn't figure out where it was getting
this from so I grepped my make.conf and found that I had the build variables
defined twice, the second time with the -I/... in it, so... I dropped those out
and low and behold it worked.

I sincerely apologize for wasting your time on my incompetence...

Thanks for your patience.
Comment 9 Michael Cummings (RETIRED) gentoo-dev 2002-09-05 22:23:47 UTC
I would like to officially whimper now. Andrew, before you close the book on
this portion of our time together completely (sleep makes a chap talk funny,
don't mind me), which you mind so much emailing me or posting in here a snippet
of the offending line? I actually had a second user today report the same
problem(!). Thank you so much,

Michael
Comment 10 Andrew Joyce 2002-09-05 22:33:27 UTC
# Pentium/Pentium MMX+ exclusive (requires a Pentium Classic or K6 or beyond) 
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -O3 -pipe"
CXXFLAGS="-march=i586 -O3 -pipe"

### SKIP TO THE END OF MY make.conf FILE

CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -O3 -pipe -I/usr/X11R6/include
-I/usr/X11R6/include/X11/extensions"
CXXFLAGS="-march=i586 -O3 -pipe -I/usr/X11R6/include
-I/usr/X11R6/include/X11/extensions"

------------------------------------
I added these in when a program was having troubles finding the the X11 include
files and I guess I forgot about them.  So obviously sed was getting a little
upset over the extra /s.

Again, I apologize for wasting your time.  I would like to say I learned a lot
about how the Gentoo build process works through this though and I'm sure that
will serve me well in the future.

Good luck with the other similar build error.  You guys are doing a hell of a job.