Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 69860 - emerging mod_php-5.0.2 fails when compiling mod_mm.lo
Summary: emerging mod_php-5.0.2 fails when compiling mod_mm.lo
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
: 69919 (view as bug list)
Depends on:
Reported: 2004-11-02 10:59 UTC by Charlie Gehlin
Modified: 2005-05-22 03:47 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Gehlin 2004-11-02 10:59:06 UTC
Have tried to disable the 'threads' USE-flag and edited the ebuild to say '--without-tsrm-pthreads' at the 'myconf='-statement@line 90.

Reproducible: Always
Steps to Reproduce:
1.USE="-mysqli -threads" emerge -Dv mod_php

Actual Results:  
/bin/sh /var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/libtool --silent --
preserve-dup-deps --mode=compile /var/tmp/portage/mod_php-5.0.2/work/php-
5.0.2/meta_ccld  -Iext/shmop/ -I/var/tmp/portage/mod_php-5.0.2/work/php-
5.0.2/ext/shmop/ -DPHP_ATOM_INC -I/var/tmp/portage/mod_php-5.0.2/work/php-
5.0.2/include -I/var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/main -
I/var/tmp/portage/mod_php-5.0.2/work/php-5.0.2 -I/var/tmp/portage/mod_php-
5.0.2/work/php-5.0.2/Zend -I/usr/include/libxml2 -I/usr/include/imap -
I/var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/ext/mbstring/oniguruma -
I/var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/ext/mbstring/libmbfl -
I/var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/ext/mbstring/libmbfl/mbfl -
I/usr/include/mysql  -D_REENTRANT -I/var/tmp/portage/mod_php-5.0.2/work/php-
5.0.2/TSRM -DTHREAD=1  -O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -mno-
sse3 -mno-3dnow -funroll-loops -pipe -pthread -DZTS  -prefer-pic -
c /var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/ext/shmop/shmop.c -o 
/var/tmp/portage/mod_php-5.0.2/work/php-5.0.2/ext/session/mod_mm.c:37:3: #error 
mm is not thread-safe
make: *** [ext/session/mod_mm.lo] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: dev-php/mod_php-5.0.2 failed.
!!! Function php5-sapi_src_compile, Line 432, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.

Expected Results:  
mod_php to compile :)

# emerge info
Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.4.2, glibc-, 
2.6.8-gentoo-r6 i686)
System uname: 2.6.8-gentoo-r6 i686 Intel(R) Xeon(TM) CPU 3.06GHz
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r5
CFLAGS="-O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -mno-sse3 -mno-
3dnow -funroll-loops -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
hare/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/env
CXXFLAGS="-O3 -march=pentium4 -mfpmath=sse -mmmx -msse -msse2 -mno-sse3 -mno-
3dnow -funroll-loops -pipe"
FEATURES="autoaddcvs buildpkg ccache distlocks sandbox"
USE="X X509 acpi afs apache2 avi bcmath berkdb bitmap-fonts bzlib cdr cpdflib 
crypt cups curl curlwrappers dba dio encode esd exif f77 foomaticdb ftp gd gd-
external gdbm gif gmp gnome gnutls gtk gtk2 imagemagick imap imlib ipv6 
ithreads java javascript jpeg kde kerberos krb4 ldap libg++ libwww lm_sensors 
lzw-tiff mad mailwrapper md5sum mikmod mime mmap mmx mng motif mozilla mpeg 
mysql mysqli nas ncurses nis nls nocardbus oggvorbis pam pcre pdflib perl php 
plotutils png pnp python qt readline samba sasl sdl session shared sharedmem 
slang snmp sockets sse ssl szip tcltk tcpd threads tiff truetype unicode usb 
vhosts vim-with-x wmf x86 xml2 zlib"
Comment 1 Charlie Gehlin 2004-11-02 22:53:06 UTC
*** Bug 69919 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Skwar 2004-11-15 05:27:05 UTC
Same here.

What does "mod_mm" do? What would I need to disable to have this module not be compiled? I'm trying to compile php with the following use flags:

14:14:08 askwar@alturo:/Portage/tree/app-misc/mc $ sudo emerge -vat dev-php/mod_php

These are the packages that I would merge, in reverse order:

Calculating dependencies ...done!
[ebuild  N    ] dev-php/mod_php-5.0.2  -adabas +apache2 +bcmath +berkdb -birdstep +bzlib +calendar -cdb -cpdflib +crypt -ctype +curl +curlwrappers -db2 +dba -dbase -dbm -dbmaker -dbx -debug -dio -empress -empress-bcs -esoob +exif +fam -fdftk -filepro -flatfile -frontbase +ftp +gd -gd-external +gdbm +gmp -hyperwave-api +iconv -imap -informix -ingres +inifile -interbase -iodbc +jpeg +ldap -libedit -mcve -memlimit +mhash +mime +ming -mnogosearch -msession -msql -mssql +mysql -mysqli +ncurses -nis +nls -oci8 -odbc -oracle7 -ovrimos +pcntl +pcre -pfpro +png +posix +postgres -qdbm +readline -recode -sapdb +sasl +session +shared +sharedmem -simplexml -snmp +soap +sockets -solid +spell -spl -sqlite +ssl -sybase -sybase-ct +sysvipc +tidy +tiff -tokenizer +truetype -wddx +xml2 +xmlrpc -xpm +xsl +zlib 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] n

14:18:22 askwar@alturo:/Portage/tree/app-misc/mc $ emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3, glibc-, i686)
System uname: i686 Intel(R) Celeron(R) CPU 2.00GHz
Gentoo Base System version 1.6.6
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  sys-kernel/linux26-headers-
Libtools: sys-devel/libtool-1.5.2-r7
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-fomit-frame-pointer -pipe -O2 -march=pentium4"
FEATURES="autoaddcvs ccache collision-protect distlocks sandbox sfperms"
USE="acl apache2 apm arts async avi bzlib crypt cscope cups curl curlwrappers diet djbfft encode exif fam flash foomaticdb ftp fwdzone gd gdbm gif hal hardened iconv imagemagick imap imlib immqt-bc ithreads javascript jpeg ldap libedit libg++ libwww lzo lzw lzw-tiff mad maildir mailwrapper mbox mmap mmx mng mpeg mysql ncurses nls no-old-linux noantlr nobcel nobeanutils nobsh nocommonslogging nocommonsnet nojdepend nojsch nojython nolog4j nooro noregexp norhino noxalan noxerces nptl offensive oggvorbis opengl oss pam parse-clocks pcntl pcre pdflib perl pic pie png posix postgres pwdb python qt quicktime readline recode sasl sdl shared slang sockets spell sse ssl sysvipc tcpd tiff truetype unicode vhosts x86 xfs xml2 xmms xv zlib linguas_de"
Comment 3 Alexander Skwar 2004-11-15 05:51:21 UTC
When I compile with USE=-session, the emerge works fine.

However, I don't like that solution. I'd really like to have session support.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-15 11:42:04 UTC
dragonheart: please file PHP bugs to php-bugs and NOT directly to me.

PHP doesn't support the threaded apache2 MPMs (it crashes very often). you must have Apache2 without USE=threads.
Comment 5 Alexander Skwar 2004-11-15 11:49:04 UTC
Sorry, I disagree. That's not an invalid bug.

If Gentoo says that PHP doesn't work with Apache with threads, it should not even try to compile with threads. Just like there are *numerous* checks already in PHP, there should be one more check which bombs if Apache is compiled with Threads and inform the user about this.
Comment 7 Alexander Skwar 2004-11-15 12:45:07 UTC
Fine :) It would still be better if the ebuild had that sort of extension.
Comment 8 Charlie Gehlin 2004-11-16 05:49:49 UTC
Robin, this bug is not INVALID, please change to more appropriate CANTFIX or WONTFIX as the bug really exist if you compile apache with threads and the ebuild/configure-script/or whatever for mod_php doesn't detect it and die(). The bug is furthermore far from resolved, so please change status to CLOSED. Anyone else with the same problem can consider 
'USE="-threads" emerge apache php mod_php'
as a very temporary and non-threaded solution (works for me).
If not - you have to make all ebuilds that depend on USE="session" masked (if apache is threaded) like squirrelmail among many, or portage is to be considered as broken and mod_php as a blocker from my point of view.
Comment 9 Alexander Mieland 2005-02-15 01:05:27 UTC
some more details about this "bug":

Compile apache2 without threads, then you'll be able to use sessions in php.
Comment 10 Charlie Gehlin 2005-02-15 01:21:01 UTC
I realize that...
But shouldn't the ebuilds for apache and/or (mod_)php have:
*)protection from compiling apache with USE="threads" IF you have USE="session"
*) protection from compiling (mod_)php with USE="session" IF you have USE="threads"

thanks /Charlie
Comment 11 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-05 22:28:50 UTC
The statement

  "Compile apache2 without threads,
  then you'll be able to use sessions in php."

is not correct as mod_mm.lo is only one of the two session save handlers that are distributed with PHP and it is not even the default one (which is mod_files).

A better solution would be to not build the mm session save handler when PHP is built for an Apache 2 with a threading MPM.
Comment 12 Charlie Gehlin 2005-05-08 01:06:46 UTC
Well, works for me :)
Comment 13 Stuart Herbert (RETIRED) gentoo-dev 2005-05-22 03:47:30 UTC
If you're willing to try out the Apache Refresh packages, I hope that
mod_php-5.0.4 solves this for you.  Please give it a go, and let me know what

Best regards,