Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 80408 - c-client + php + ssl problem
Summary: c-client + php + ssl problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 All
: Normal major (vote)
Assignee: Marcus D. Hanwell (RETIRED)
URL: http://bugs.php.net/bug.php?id=31524
Whiteboard:
Keywords:
Depends on: 70133
Blocks:
  Show dependency tree
 
Reported: 2005-02-01 18:03 UTC by Francesco R. (RETIRED)
Modified: 2005-02-03 14:56 UTC (History)
3 users (show)

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


Attachments
mod_php-5.0.3.diff patch (mod_php-5.0.3.diff,657 bytes, patch)
2005-02-01 21:33 UTC, Tuan Van (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco R. (RETIRED) gentoo-dev 2005-02-01 18:03:51 UTC
Solution first:
on amd64 net-libs/c-client-2004a-r1 *must* be compiled with USE="ssl"
if there are no other bug keyword mod_php ~amd64

long, dirty, tired explanation:
Trying to transport a webmail server on amd64 based on horde.
At the point to use imap it show that the extension is not loaded, looking at the output of phpinfo() in fact show that --imap --imap-ssl are used but no imap extension exist. [snipped comments]

2nd try compile mod_php with USE="-shared", ok this time the build fail 

/bin/sh /var/tmp/portage/mod_php-5.0.3-r1/work/php-5.0.3/libtool --silent [snip 10000 chars] -lcrypt -lc-client -lssl -lcrypto [other 5000 here] -lcrypt  -o sapi/cli/php
ext/imap/php_imap.lo(.text+0x471): In function `zm_startup_imap':
: undefined reference to `ssl_onceonlyinit'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
make: *** Waiting for unfinished jobs....

!!! ERROR: dev-php/mod_php-5.0.3-r1 failed.


rebuild again with +shared 

/bin/sh /var/tmp/portage/mod_php-5.0.3-r1/work/php-5.0.3/libtool [snipsnip] -lc-client -lssl [snipsnip] -o sapi/cli/php

*** Warning: linker path does not have real file for library -lc-client.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libc-client and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/lib/c-client.a
ext/imap/php_imap.lo(.text+0x471): In function `zm_startup_imap':
: undefined reference to `ssl_onceonlyinit'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp5.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
make: *** Waiting for unfinished jobs....

!!! ERROR: dev-php/mod_php-5.0.3-r1 failed.

ahhhhhh ok 
the other virtual for c-client uw-imap-2004c wont work too, so start to google around and found php bug 31524 (good reporter, very good reporter).

exactly c-client *NEED* don't obey to the configure request about ssl. (mysql does similar stuff but this is another story)

so what do you think about to force the ssl flag on c-client library ?
Test *running* (compile is ok) c-client on other arch should be interesting too
Comment 1 Francesco R. (RETIRED) gentoo-dev 2005-02-01 18:05:58 UTC
don't follow the link to gentoo bug 31524, its a php one!
Comment 2 Mike Doty (RETIRED) gentoo-dev 2005-02-01 21:19:09 UTC
this sounds related to some work we did recently
Comment 3 Tuan Van (RETIRED) gentoo-dev 2005-02-01 21:33:51 UTC
Created attachment 50193 [details, diff]
mod_php-5.0.3.diff patch

no, this is because the "ssl" USE flag is "un-sync" (looking for the term)
between mod_php and c-client. The wording in the patch isn't very clear, feel
free to change it.
Comment 4 Francesco R. (RETIRED) gentoo-dev 2005-02-02 02:48:00 UTC
confirmed:
USE="-ssl" c-client mod_php 
work, >:-( not thinked at that
Comment 5 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-02-03 01:42:41 UTC
Can anyone confirm whether this problem is exclusive to amd64? It sounds like a problem that would affect all architectures to me. If so then the PHP herd should decide how they would prefer to deal with it - Tuan's patch looks good to me (apart from the un-sync ;) ).
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-03 04:02:26 UTC
hmm, this was an old php4 bug, come back to haunt us.
I've fixed it in the php5 eclass now.
Comment 7 Marcus D. Hanwell (RETIRED) gentoo-dev 2005-02-03 14:56:51 UTC
I was just going to say that the conditional appears to be the wrong way around, and fails for my c-client compiled with ssl - but it appears you spotted it and fixed it already ;) Thanks.