ID:               42374
 User updated by:  galtgendo at o2 dot pl
 Reported By:      galtgendo at o2 dot pl
 Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: Gentoo
 PHP Version:      5.2CVS-2007-08-23
 Assigned To:      jani
 New Comment:

Please disregard most of my last comment, I misunderstood something.
I thought that --as-needed prevents linking with unused libraries, but
it only marks them as unused, so above listings of ldd -u mean that it
actually works, not the opposite. Anyway, what was exactly the problem
that --preserve-dup-defs works around, cause the note in configure.in
says only that there was a problem with older libtool, not what was it ?


Previous Comments:
------------------------------------------------------------------------

[2007-11-05 22:49:15] galtgendo at o2 dot pl

There's a funny thing, though.
Command that built in example tidy.so was :
/bin/sh
/var/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p2007091
4/libtool --silent --preserve-dup-deps --mode=link
/var/tmp/portage/dev-lang/php
-5.2.4_p20070914-r2/work/php-5.2.4_p20070914/meta_ccld -DPHP_ATOM_INC
-I/var/tmp
/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p20070914/include
-I/var
/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p20070914/main
-I/va
r/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p20070914
-I/usr/in
clude/libxml2
-I/var/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_
p20070914/ext/date/lib -I/usr/include/freetype2 -I/usr/include/imap
-I/var/tmp/p
ortage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p20070914/ext/mbstring/oni
guruma
-I/var/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p200709
14/ext/mbstring/libmbfl
-I/var/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/
php-5.2.4_p20070914/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql
-I/usr/includ
e/postgresql/libpq-4 -I/usr/include/pspell
-I/var/tmp/portage/dev-lang/php-5.2.4
_p20070914-r2/work/php-5.2.4_p20070914/TSRM
-I/var/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p20070914/Zend
 -D_REENTRANT  -I/usr/include -O2 -march=athlon -mtune=athlon -pipe
-pthread -DZTS  -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,relro
-o ext/tidy/tidy.la -export-dynamic -avoid-version -prefer-pic -module
-rpath
/var/tmp/portage/dev-lang/php-5.2.4_p20070914-r2/work/php-5.2.4_p20070914/modules
-avoid-version -module ext/tidy/tidy.lo -ltidy -lcrypt -lcrypt -lsqlite
-lhistory -lreadline -lncurses -lresolv -lm -ldl -lnsl -lxml2 -lz -lm
-lgssapi -lkrb5 -lcom_err -lssl -lcrypto -ldl -lxml2 -lz -lm -lxml2 -lz
-lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt

so theoretically it should not have those dependencies, unless  
--preserve-dup-deps messes that up. I think I'll test this theory.

Of course, this is a completely separate issue to the one this bug is
about.

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

[2007-11-05 21:39:39] galtgendo at o2 dot pl

This may seem like nagging, but I wonder how are things comming along.
And to add my 2c:
ldd -u /usr/lib/php5/lib/php/extensions/no-debug-zts-20060613/tidy.so
Unused direct dependencies:
        
        /usr/lib/libtidy-0.99.so.0
        /lib/libcrypt.so.1
        /usr/lib/libsqlite.so.0
        /lib/libhistory.so.5
        /lib/libreadline.so.5
        /lib/libncurses.so.5
        /lib/libresolv.so.2
        /lib/libm.so.6
        /lib/libdl.so.2
        /lib/libnsl.so.1
        /lib/libz.so.1
        libgssapi.so.1
        /usr/lib/libkrb5.so.22
        /lib/libcom_err.so.2
        /usr/lib/libssl.so.0.9.8
        /usr/lib/libcrypto.so.0.9.8
        /usr/lib/libxml2.so.2
        /lib/libpthread.so.0
ldd -u /usr/lib/php5/lib/php/extensions/no-debug-zts-20060613/zlib.so
Unused direct dependencies:
        
        /lib/libz.so.1
        /lib/libcrypt.so.1
        /usr/lib/libsqlite.so.0
        /lib/libhistory.so.5
        /lib/libreadline.so.5
        /lib/libncurses.so.5
        /lib/libresolv.so.2
        /lib/libm.so.6
        /lib/libdl.so.2
        /lib/libnsl.so.1
        libgssapi.so.1
        /usr/lib/libkrb5.so.22
        /lib/libcom_err.so.2
        /usr/lib/libssl.so.0.9.8
        /usr/lib/libcrypto.so.0.9.8
        /usr/lib/libxml2.so.2
        /lib/libpthread.so.0
And for comparison:
ldd -u /usr/lib/php5/lib/php/extensions/no-debug-zts-20060613/gd.so
Unused direct dependencies:
        
        /usr/lib/libfreetype.so.6
        /lib/libcrypt.so.1
        /usr/lib/libsqlite.so.0
        /lib/libhistory.so.5
        /lib/libreadline.so.5
        /lib/libncurses.so.5
        /lib/libresolv.so.2
        /lib/libm.so.6
        /lib/libdl.so.2
        /lib/libnsl.so.1
        /lib/libz.so.1
        libgssapi.so.1
        /usr/lib/libkrb5.so.22
        /lib/libcom_err.so.2
        /usr/lib/libssl.so.0.9.8
        /usr/lib/libcrypto.so.0.9.8
        /usr/lib/libxml2.so.2
        /lib/libpthread.so.0
ldd -u /usr/bin/php
Unused direct dependencies:
        
        /lib/libcrypt.so.1
        /usr/lib/libsqlite.so.0
        /lib/libhistory.so.5
        /lib/libm.so.6
        /lib/libdl.so.2
        /usr/lib/libroken.so.18
        /lib/libresolv.so.2
        /lib/libpthread.so.0
        /usr/lib/libssl.so.0.9.8

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

[2007-08-24 07:44:54] [EMAIL PROTECTED]

And we're not trying to fix the faulty 3rd party libraries here, are
we? :)

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

[2007-08-24 03:11:40] crrodriguez at suse dot de

>a) it seems to be experimental

yes, but it usually work.

>b) might cause problems in dynamic loading such as our shared
>extensions, f.e. php -> pdo -> pdo driver (haven't tested yet :)

I have tested it with some extensions and seem to work fine, except
that the IMAP extension does not compile because configure checks fail
for the same reason the reporter is showing here.

>d) PHP build system does not link with anything else than what is
>actually needed anyway (AFAIK)

ldd -u -r /usr/bin/php
Unused direct dependencies:

        /lib/libnsl.so.1
        /lib/libz.so.1

ldd -u -r xmlreader.so

/lib/libz.so.1
/lib/libm.so.6

dom.so
Unused direct dependencies:

        /lib/libz.so.1
        /lib/libm.so.6

gd.so
Unused direct dependencies:

        /usr/lib/libX11.so.6


although in most cases the guilty stuff is "foobar_config" scripts or
pkgconfig scripts that inject "uneeded" dependencies (uneeded at least 
on linux)

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

[2007-08-23 23:01:01] [EMAIL PROTECTED]

After some investigation to this flag I'm leaning towards simply
filtering it out totally if someone tries to use it. Reasons being:

a) it seems to be experimental
b) might cause problems in dynamic loading such as our shared
extensions, f.e. php -> pdo -> pdo driver (haven't tested yet :)
c) requires that pretty much everything in the system has to be
compiled using it
d) PHP build system does not link with anything else than what is
actually needed anyway (AFAIK)


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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/42374

-- 
Edit this bug report at http://bugs.php.net/?id=42374&edit=1

Reply via email to