php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20498 linking fails if -lexpat is added twice to the EXTRA_LIBS
Submitted: 2002-11-19 12:32 UTC Modified: 2002-11-22 09:27 UTC
From: bleek at jobpilot dot de Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.0RC1 OS: SuSE Linux 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bleek at jobpilot dot de
New email:
PHP Version: OS:

 

 [2002-11-19 12:32 UTC] bleek at jobpilot dot de
./configure --with-apxs=/usr/local/bin/apxs \
        --with-mysql=/usr/local \
        --disable-shared \
        --enable-bcmath \
        --enable-ftp \
        --enable-mbstring \
        --enable-wddx \
        --enable-xslt \
        --with-expat-dir=/usr/local \
        --with-gettext=/usr/local \
        --with-openssl=/usr/local \
        --with-imap=/usr/local \
        --with-imap-ssl=/usr/local \
        --with-xslt-sablot=/usr/local \
        --with-zlib \
        --with-zlib-dir=/usr/local \
        --with-gd=/usr/local \
        --with-png-dir=/usr \
        --with-jpeg-dir=/usr \

make fails with lots of 
/home/cbleek/Sources/XML/expat/lib/xmlrole.c(.text+0x15d0): multiple definition of `XmlPrologStateInitExternalEntity'
/usr/local/lib/libexpat.a(xmlrole.o)(.text+0x15d0):/home/cbleek/Sources/XML/expat/lib/xmlrole.c: first defined here

After removing one "-lexpat" from the $EXTRA_LIBS in the
main Makefile, compilation works fine.

This error existed in the 4.2.3 too, There the config_vars.mk (or so) had to be modified.

\carsten

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-21 18:20 UTC] iliaa@php.net
Do you have more then 1 expat library installed on your computer?
 [2002-11-22 03:43 UTC] bleek at jobpilot dot de
Yes, /usr/lib contains the original SuSE expat. But I?ve linked everything (sablotron, apache, php) with a statically
build expat located in usr/local/lib.

Shall I reproduce the problem making sure, that there is only
my expat available?
 [2002-11-22 09:27 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Given that you specify both /usr & /usr/local as the library search paths it is highly likely library confusion occurs. IMO this is not a PHP issue.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Aug 17 18:00:03 2025 UTC