Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70133 - php-5.0.2 and mod_php-5.0.2 builds and works on amd64
Summary: php-5.0.2 and mod_php-5.0.2 builds and works on amd64
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords: InVCS
: 65233 71927 76520 (view as bug list)
Depends on:
Blocks: 80408
  Show dependency tree
 
Reported: 2004-11-04 22:37 UTC by Marius
Modified: 2005-02-07 21:50 UTC (History)
6 users (show)

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


Attachments
requested output (php modules) (output.txt,803 bytes, text/plain)
2005-01-05 22:44 UTC, Marius
Details
c-client-2004a.diff (c-client-2004a.diff,1.37 KB, patch)
2005-01-29 15:41 UTC, Marcus D. Hanwell (RETIRED)
Details | Diff
files/c-client-2004a-amd64-so-fix.patch (c-client-2004a-amd64-so-fix.patch,811 bytes, patch)
2005-01-29 15:42 UTC, Marcus D. Hanwell (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marius 2004-11-04 22:37:35 UTC
After adding ~amd64 keyword to php-5.0.2 and mod_php-5.0.2 ebuild files I was able to build these on my amd64 using ACCEPT_KEYWORDS="~amd64" without any problems. And it even seems to work! I think it's time to add ~amd64 keyword to these.

Reproducible: Always
Steps to Reproduce:
1. add ~amd64 keyword to php-5.0.2 and mod_php-5.0.2 ebuild files
2. set env-var ACCEPT_KEYWORDS="~amd64"
3. emerge mod_php (and php)

Actual Results:  
PHP works without any noticeable problems.
Comment 1 Marcus D. Hanwell (RETIRED) gentoo-dev 2004-11-06 06:42:55 UTC
I would like to add that I have done this myself and I am using several PHP scripts coded by myself and from other projects with no noticeable problems. I think they should be ~amd64 keyworded.
Comment 2 Marcus D. Hanwell (RETIRED) gentoo-dev 2004-11-06 06:46:03 UTC
Just noticed that this is a duplicate of bug 65819, although this bug has better keywords in title enabling me to find it :)
Comment 3 Max 2004-11-21 01:38:40 UTC
Odd, then, that it doesn't build here. I get this after building php-5.0.2 more or less succesfully:

[...]
 -lfam -ldb-4.1 -lgdbm -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lcurl -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt  -o sapi/cli/php
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../lib/libc-client.a(osdep.o)(.text+0x99b5): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

>>> Test phase [not enabled]: dev-php/php-5.0.2-r1

>>> Install php-5.0.2-r1 into /var/tmp/portage/php-5.0.2-r1/image/ category dev-php
Installing PHP SAPI module:       embed
cp: cannot stat `libs/libphp5.so': No such file or directory
make: *** [install-sapi] Error 1

!!! ERROR: dev-php/php-5.0.2-r1 failed.
!!! Function php5-sapi_src_install, Line 439, Exitcode 2
!!! install failed
[...]

Sounds like an ebuild bug, but I can't seem to figure out which and where...
Comment 4 Mike Doty (RETIRED) gentoo-dev 2004-11-21 09:20:33 UTC
*** Bug 71927 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Korinek 2004-11-21 09:42:43 UTC
I get the same build error, switching to -O2 doesn't help at all
Comment 6 Mike Doty (RETIRED) gentoo-dev 2004-11-21 11:11:58 UTC
after hours of testing from myself, lares, kumkuat, and neclimdul(all amd64), we've determined that php-5.0.2-r1 will fail if USE has imap in it.  imap depends on net-libs/c-client.  +imap also causes configure to fail on libc-client.a.  the work around is to add -imap to /etc/portage/package.use
Comment 7 Andreas Korinek 2004-11-21 11:52:27 UTC
removing imap from the use flags works for me, too :-)
Comment 8 Marcus D. Hanwell (RETIRED) gentoo-dev 2004-11-21 12:02:21 UTC
I never had imap in my USE flags for php or mod_php. I have just recompiled using
GCC 3.4.3 and both recompiled without incident - although still -imap. As I said
I have been using this version of mod_php for quite a while now without problems.

Adding USE="imap" did then cause the emerge to fail, so I can also confirm this.
Comment 9 Marius 2004-11-29 01:58:18 UTC
I've found comment about PHP-5 (USE="imap") working with newer portage/gcc BUG: 61392
Comment 10 Simon Stelling (RETIRED) gentoo-dev 2004-11-29 02:32:43 UTC
*** Bug 65233 has been marked as a duplicate of this bug. ***
Comment 11 Julien Biezemans 2004-12-05 09:12:59 UTC
Confirmation. php-5.0.2-r1 & mod_php-5.0.2 both compile with modified ebuilds including ~amd64 in portage overlay. +imap is still problematic though.

please add ~amd64 to the ebuilds.
Comment 12 Mike Doty (RETIRED) gentoo-dev 2004-12-05 10:39:48 UTC
~amd64 was removed because of the +imap issues.  It won't be readded until imap support is resolved.  If anyone can get it to compile with +imap, please let us know how you did it.
Comment 13 Simon Stelling (RETIRED) gentoo-dev 2005-01-03 12:52:05 UTC
*** Bug 76520 has been marked as a duplicate of this bug. ***
Comment 14 Rodolphe Rocca 2005-01-04 01:21:53 UTC
Done !
I've just compiled php-5.0.3 with imap support. It will fail if i do not add the shared use flag. My use flags follow. If someone else could test it and quickly report the result so that it can be marked ~amd64... Notice that it works the same for mod_php.

[ebuild   R   ] dev-php/php-5.0.3  (-adabas) -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 -kerberos +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
Comment 15 Andreas Korinek 2005-01-04 04:33:11 UTC
adding shared to use flags works for me, tested on php and php-cgi. I noticed that in phpinfo() there is the compile flag --with-imap, but there is no further imap status message. Can anyone confirm that imap is really working?
Comment 16 Marius 2005-01-04 08:56:33 UTC
Compiles for me too, doesn't seem to work though. I get "Call to undefined function imap_open()" when i try tu use it (or at least i think i'm trying to use _that_ imap :).
Comment 17 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-05 20:12:46 UTC
Uhm... what is the 'shared' use flag all about?  Shouldn't we ALWAYS be shared unless USE=static (in which some ebuilds install static only and others use it to install both)?  I don't recall seeing that USE flag discussed before being added...
Comment 18 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-05 21:22:44 UTC
eradicator: PHP's shared use flag controls if you get a monolithic or modularized PHP build.

If a modularized one, we put lines to load all build modules in the php.ini (the user can then selectively disable some of them if they want, and load at runtime instead).
Comment 19 Marius 2005-01-05 22:32:21 UTC
then why there's no extension=imap.so line in my php.ini after installing with USE='imap shared'?
Comment 20 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-05 22:36:41 UTC
That's a very good question. 
Did you do etc-update of your mod_php php.ini after installing mod_php, and put in the new config file with 'extension=imap.so' ?

please attach the output from:
f=$(/usr/bin/php-config --extension-dir)
echo $f
ls -lR $f
Comment 21 Marius 2005-01-05 22:44:56 UTC
Created attachment 47749 [details]
requested output (php modules)

imap module seems like static to me...
Comment 22 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-05 23:37:54 UTC
hmm
try adding extension=imap.a to your php.ini and see if things work (I doubt it).

I'm not sure why it's building an imap.a instead of imap.so for you (I get the imap.so on x86, no amd64 box to test on).
Comment 23 Marius 2005-01-06 00:01:52 UTC
it complains (imap.a: invalid ELF header) as was expected. what else could i do?.. (not that i need the imap thing, it's just that the resolution of this thing is sooo slow... i just want to have an untweaked php5 on my box:)
Comment 24 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-06 00:20:06 UTC
Would you mind doing:
ebuild /usr/portage/dev-php/mod_php/mod_php-5.0.3 package
then tarring up the entire working directory (/var/tmp/portage/mod_php-5.0.3/) and putting it somewhere?
then please email me a link to it (it may contain private information so I advise against posting it here).
Comment 25 Francesco R. (RETIRED) gentoo-dev 2005-01-13 10:15:08 UTC
5.0.3 work for me on dual opteron after manually emerging libxml2
Comment 26 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-01-29 15:39:07 UTC
I have been working on the IMAP issues on amd64. I have come up with what I believe to be the best solution - building a shared c-client library for PHP to link against. This solution works well for me, and allows PHP to build and successfully utilise the IMAP functionality.

Robin - if this looks OK to you I can commit it. I am attaching the patch and the updated c-client ebuild. This also fixes the error of the c-client.a symlink not being properly created on amd64 systems.
Comment 27 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-01-29 15:41:36 UTC
Created attachment 49887 [details, diff]
c-client-2004a.diff

Diff of c-client-2004a.ebuild.
Comment 28 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-01-29 15:42:44 UTC
Created attachment 49888 [details, diff]
files/c-client-2004a-amd64-so-fix.patch

Makefile patch to build the shared library.
Comment 29 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-29 16:03:28 UTC
cryos: your patch will need to apply to:
net-lib/c-client
net-mail/uw-imap
net-mail/vimap

as all of those provide a c-client.
Comment 30 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-02-01 10:01:18 UTC
I have now added patched ebuilds that make the required shared library - net-mail/uw-imap-2004c-r1 and net-libs/c-client-2004a-r1. These allow mod_php-5.0.3-r1 to build successfully with IMAP support, and also use said IMAP support.

I will take a look at vimap at some point, but it is not keyworded on amd64 yet and so is not urgent. Robin - I think the sedding to fix the various Makefiles in uw-imap, and then to apply -fPIC to c-client should be applied for all architectures, but have left it inside the condtional block for amd64 in case of issues I was unaware of on other architectures.

Comment 31 Marius 2005-02-07 21:50:54 UTC
Seems to me like working. Tried to compile mod_php and php with USE="imap -shared" - no problems. IMAP seems to work (doesn't show "function undefined" errors), although i don't have any host to test it on :).