Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 33016

Summary: emerge mod_perl shows threaded build for PERL 5.8.0-r12 with -threads
Product: Gentoo Linux Reporter: Jeff Hayes <jeff.hayes>
Component: [OLD] ServerAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: critical CC: chutz+bugs.gentoo.org, perl
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeff Hayes 2003-11-08 10:29:57 UTC
ran into the problem of the mod_perl build dying without a trace and then did
env USE="-ipv6" emerge mod_perl
then it got farther .. but died when it did not find "apxs" installed.  I could 
not find out anything about what apxs is .. but in the build messages I noticed 
that it was complaining that my PERL was build threaded.  This is NOT correct 
as I ensured that i did not have "threads" in my USE var but in the output of 
the build:
 [33;01m*[0m PLEASE NOTE: If you want to compile perl-5.8 with
 [33;01m*[0m threading enabled , you must restart this emerge
 [33;01m*[0m with USE=threads emerge....
.. skip ..
>>> Unpacking perl-5.8.0.tar.gz to /var/tmp/portage/perl-5.8.0-r12/work
>>> Unpacking DB_File-1.806.tar.gz to /var/tmp/portage/perl-5.8.0-r12/work
>>> Unpacking Safe-2.09.tar.gz to /var/tmp/portage/perl-5.8.0-r12/work
 [32;01m*[0m Applying perl-5.8.0-sockatmark-should-__THROW.patch...
.. skip ..
Operating system version? [2.4.20-gentoo-r7]  
Build Perl for SOCKS? [n]  
Use the PerlIO abstraction layer? [y]  
Build a threading Perl? [n]  
Build Perl for multiplicity? [n]  
Use which C compiler? [gcc]  
.. skip ..
What libraries to use?    <<<< ***** note pthreads here
[-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil]  
What optimizer/debugger flag should be used?
[-march=pentium2 -O2 -fomit-frame-pointer -pipe] 
Any additional cc flags? [-fno-strict-aliasing]
.. skip ..
alarm() found.
<pthread.h> found.     <<<***********
<sys/types.h> found.
<sys/select.h> found.
.. skip ..
make[1]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0'
sh writemain lib/auto/DynaLoader/DynaLoader.a  > writemain.tmp
sh mv-if-diff writemain.tmp perlmain.c
.. skip .. all the way to the testing stage
make[2]: Entering directory `/var/tmp/portage/perl-5.8.0-r12/work/perl-5.8.0'
cd t &&   ./perl TEST  </dev/tty
t/base/cond..........................ok
.. skip ..
t/op/flip............................ok
t/op/fork............................FAILED at test 2
t/op/glob............................ok
.. skip ..
lib/ExtUtils/t/basic.................make[3]: warning: jobserver unavailable: 
using -j1.  Add `+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
ok
lib/ExtUtils/t/Command...............ok
lib/ExtUtils/t/Constant..............make[3]: warning: jobserver unavailable: 
using -j1.  Add `+' to parent make rule.
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make 
rule.
ok
lib/ExtUtils/t/Embed.................ok
.. skip ..
lib/File/Temp/t/posix................ok
lib/File/Temp/t/security.............uid=250 topuid=10 $<=0 
path='/var/tmp/portage/perl-5.8.0-r12/temp/' at ../lib/File/Temp.pm line 659
	File::Temp::_is_safe('/var/tmp/portage/perl-5.8.0-r12/temp/','SCALAR
(0x822ec84)') called at ../lib/File/Temp.pm line 424
	File::Temp::_gettemp('/var/tmp/portage/perl-5.8.0-
r12/temp/tmpXXXXX','open',1,'mkdir',0,'unlink_on_close',0,'suffixlen',0,...) 
called at ../lib/File/Temp.pm line 1057
	File::Temp::tempfile('tmpXXXXX','DIR','/var/tmp/portage/perl-5.8.0-
r12/temp','UNLINK',1) called at ../lib/File/Temp/t/security.t line 100
	eval {...} called at ../lib/File/Temp/t/security.t line 100
	main::test_security(0) called at ../lib/File/Temp/t/security.t line 63
uid=250 topuid=10 $<=0 path='/var/tmp/portage/perl-5.8.0-r12/temp/' 
at ../lib/File/Temp.pm line 659
	File::Temp::_is_safe('/var/tmp/portage/perl-5.8.0-r12/temp/','SCALAR
(0x822ed50)') called at ../lib/File/Temp.pm line 719
	File::Temp::_is_verysafe('/var/tmp/portage/perl-5.8.0-r12/temp/','SCALAR
(0x822ed50)') called at ../lib/File/Temp.pm line 430
	File::Temp::_gettemp('/var/tmp/portage/perl-5.8.0-
r12/temp/tmpXXXXX','open',1,'mkdir',0,'unlink_on_close',0,'suffixlen',0,...) 
called at ../lib/File/Temp.pm line 1057
	File::Temp::tempfile('tmpXXXXX','DIR','/var/tmp/portage/perl-5.8.0-
r12/temp','UNLINK',1) called at ../lib/File/Temp/t/security.t line 100
	eval {...} called at ../lib/File/Temp/t/security.t line 100
	main::test_security(0) called at ../lib/File/Temp/t/security.t line 72
ok
lib/File/Temp/t/tempfile.............ok
.. skip ..
 >><<<< *** oh ho! skipping when it should have tested
lib/Test/Simple/t/strays.............skipping test on this platform
lib/Test/Simple/t/threads............skipping test on this platform
lib/Test/Simple/t/todo...............ok
.. skip ..
  /var/tmp/portage/perl-5.8.0-r12/image//usr/share/man/man1/s2p.1
 [32;01m*[0m Removing /var/tmp/portage/perl-5.8.0-r12/image/ 
from /var/tmp/portage/perl-5.8.0-r12/image/usr/lib/perl5/5.8.0/Net/Config.pm...
 [32;01m*[0m Removing /var/tmp/portage/perl-5.8.0-r12/image/ 
from /var/tmp/portage/perl-5.8.0-r12/image/usr/lib/perl5/5.8.0/i686-
linux/Encode/Config.pm...
 [32;01m*[0m Removing /var/tmp/portage/perl-5.8.0-r12/image/ 
from /var/tmp/portage/perl-5.8.0-r12/image/usr/lib/perl5/5.8.0/i686-
linux/Config.pm...
 [32;01m*[0m Removing /var/tmp/portage/perl-5.8.0-r12/image/ 
from /var/tmp/portage/perl-5.8.0-r12/image/usr/lib/perl5/5.8.0/i686-
linux/.packlist...
installhtml: ./lib/IO/Handle.pm: cannot resolve L<fsync(3c)> in paragraph 48.
installhtml: no title for ./lib/Net/FTP/A.pm.
installhtml: no title for ./lib/Net/FTP/E.pm.
installhtml: no title for ./lib/Net/FTP/I.pm.
installhtml: no title for ./lib/Net/FTP/L.pm.
installhtml: no title for ./lib/Net/FTP/dataconn.pm.
installhtml: ./lib/Net/Ping.pm: cannot resolve L<inetd(8)> in paragraph 110.
installhtml: ./lib/Pod/t/basic.pod: cannot resolve L<manpage/section> in 
paragraph 21.
installhtml: ./lib/Pod/t/basic.pod: cannot resolve L<manpage / section> in 
paragraph 22.
installhtml: ./lib/Pod/t/basic.pod: cannot resolve L<manpage/ section> in 
paragraph 23.
.. skip ..

>>> Unpacking source...
>>> Unpacking mod_perl-1.27.tar.gz to /var/tmp/portage/mod_perl-1.27-r4/work
tail -1 fix in apaci/mod_perl.config.sh
tail -1 fix in apaci/libperl.module
>>> Source unpacked.
eutils
which: no apxs in 
(/sbin:/usr/sbin:/usr/lib/portage/bin:/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr
/i686-pc-linux-gnu/gcc-bin/3.2:/usr/X11R6/bin:/opt/blackdown-jdk-
1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin)
************* WARNING *************

  Your Perl is linked with -lpthread, make sure that your httpd is built with 
LIBS=-lpthread
.. skip ..

************* WARNING *************
Will run tests as User: 'nobody' Group: 'root'
Will configure via APXS
PerlDispatchHandler.........enabled
PerlChildInitHandler........enabled
PerlChildExitHandler........enabled
.. skip ..

PerlSSI.....................enabled
./configure:Error: no 'apxs' program found, please provide it's path via --with-
apxs
Checking CGI.pm VERSION..........ok
Checking for LWP::UserAgent......ok
Checking for HTML::HeadParser....ok
Checking if your kit is complete...
Looks good
Writing Makefile for Apache
.. skip ..
Writing Makefile for Apache::Util
Writing Makefile for mod_perl
(cd ./apaci && PERL5LIB=/var/tmp/portage/mod_perl-1.27-r4/work/mod_perl-
1.27/lib: make)
make[1]: Entering directory `/var/tmp/portage/mod_perl-1.27-r4/work/mod_perl-
1.27/apaci'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/var/tmp/portage/mod_perl-1.27-r4/work/mod_perl-
1.27/apaci'
make: *** [apxs_libperl] Error 2
make: *** Waiting for unfinished jobs....
make: *** Waiting for unfinished jobs....
make: *** Waiting for unfinished jobs....
make: *** Waiting for unfinished jobs....
make: *** Waiting for unfinished jobs....

!!! ERROR: dev-perl/mod_perl-1.27-r4 failed.
!!! Function src_compile, Line 48, Exitcode 2
!!! (no error message)

686-linux/I18N
--- !empty dir /usr/lib/perl5/5.8.0/i686-linux/Filter/Util
--- !empty dir /usr/lib/perl5/5.8.0/i686-linux/Filter
--- !empty dir /usr/lib/perl5/5.8.0/i686-linux/File
--- !empty dir /usr/lib/perl5/5.8.0/i686-linux/Encode
.. skip ..

>>> original instance of package unmerged safely.
>>> dev-lang/perl-5.8.0-r12 merged.

>>> clean: No packages selected for removal.

>>> emerge (2 of 2) dev-perl/mod_perl-1.27-r4 to /
>>> md5 src_uri ;-) mod_perl-1.27.tar.gz


and so, after failing to install there is no error message for the user. 

Not good

Reproducible: Always
Steps to Reproduce:
1.install apache2
2.env USE="-ipv6 -threads" emerge perl mod_perl
3.

Actual Results:  
what you saw .. the emerge of PERL succeeded, but only in making a broken PERL, 
and mod_perl did not even try to build


Gentoo Base System version 1.4.3.10
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-
r7)
=================================================================
System uname: 2.4.20-gentoo-r7 i686 Pentium II (Klamath)
distcc 2.9 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium2 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi
g /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/co
nfig/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium2 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="ftp://ftp.gentoo.skynet.be/pub/gentoo/ 
ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ 
ftp://ftp.easynet.nl/mirror/gentoo/ http://gentoo.oregonstate.edu 
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.be.gentoo.org/gentoo-portage"
USE="x86 avi crypt encode foomaticdb gif jpeg libg++ mad mikmod motif mpeg 
ncurses pdflib png sdl spell svga truetype xml2 xmms xv zlib alsa gdbm berkdb 
slang readline tetex tcltk mysql X gpm tcpd pam libwww ssl perl python esd 
imlib oggvorbis gnome gtk opengl mozilla cdr aalib aavm acl acpi acpi4linux amd 
apache2 autofs bonobo bsh cscope curl dga dnd doc fastcgi gnomedb gtkhtml ipv6 
jack java javascript jikes mmx moznocompose moznoirc moznomail mozp3p offensive 
openssh pic rage128 samba stroke tiff usb vim-with-x wmf X509 -oss -apm -arts -
cups -kde -nls -qt -quicktime"
Comment 1 Jeff Hayes 2003-11-08 14:53:16 UTC
umm .. i guess i should mention why this was a problem for me :-/

i want to run apache2 on this machine .. with PERL in its threaded version
I have to build apache for threads also .. which I do not want to do.  and
some of the PERL things that I use break when PERL is threaded anyway.  So
.. how does it happen that PERL is ignoring the USE flag that is supposed
to make it build as I want it to?

at this moment I cannot move my web server to the new machine as i cannot
install mod_perl .. thus the Critical rating on this bug
Comment 2 Michael Cummings (RETIRED) gentoo-dev 2004-02-27 13:43:33 UTC
Posix threads (pthreads) is not the same as threading in perl. Your perl is not built with threading - says so in the output you pasted ;)

That's the first two cents. Looking at the rest.
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2004-04-23 01:35:23 UTC
Another historic bug for the apache team to look at please ;-)
Comment 4 Georgi Georgiev 2004-06-03 20:27:18 UTC
$ perl -V | grep thread
This should show you that your perl is not threaded.

ldd /usr/bin/perl
ldd /usr/sbin/apache*

These both show linking against pthreads, which is just what the mod_perl ebuild warns about.

<quote>
>>> Source unpacked.
Will configure via APXS (apxs=/usr/sbin/apxs)
************* WARNING *************

  Your Perl is linked with -lpthread, make sure that your httpd is built with LIBS=-lpthread


************* WARNING *************
</quote>
Since the bug is related to threaded perl, it should probably be marked as invalid?

apxs is probably the thing mentioned before the warning.
Comment 5 Michael Cummings (RETIRED) gentoo-dev 2004-09-04 05:53:40 UTC
Closing because OP never made comment out after we made the distinction between perl threads and pthreads.