php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33321 Unknown '-export-symbols' flag passed to ld
Submitted: 2005-06-13 12:28 UTC Modified: 2005-06-13 13:00 UTC
From: marcus at synchromedia dot co dot uk Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.0.4 OS: MacOS X 10.4.1
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: marcus at synchromedia dot co dot uk
New email:
PHP Version: OS:

 

 [2005-06-13 12:28 UTC] marcus at synchromedia dot co dot uk
Description:
------------
Configure goes OK, make gets nearly all the way through then 
fails near the end with this error:

/usr/bin/ld: unknown flag: -export-symbols
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

I checked in the docs for OS X's ld and there doesn't seem 
to be an -export-symbols option defined. This option is in 
the original configure script, and ends up in the generated 
Makefile. Is there some alternative? Is ld broken on OS X?

I have tried this on a clean OS install with a fresh copy of 
PHP source. The only mildly odd thing in my setup is that 
I'm linking to some libraries from fink (apache2, JPEG, PNG 
etc). I have tried building with a simpler configuration but 
still get the same result.

Reproduce code:
---------------
Here's my configure:

CFLAGS='-I/sw/include' \
CXXFLAGS='-I/sw/include' \
CPPFLAGS='-I/sw/include' \
LDFLAGS='-L/sw/lib' \
'./configure' \
'--disable-overload' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-exif' \
'--enable-ftp' \
'--enable-gd-imgstrttf' \
'--enable-gd-native-ttf' \
'--enable-inline-optimization' \
'--enable-mcal' \
'--enable-memory-limit' \
'--enable-pcntl' \
'--enable-pic' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-track-vars' \
'--enable-trans-sid' \
'--enable-versioning' \
'--enable-wddx' \
'--enable-yp' \
'--sysconfdir=/etc' \
'--with-apxs2=/sw/sbin/apxs' \
'--with-bz2' \
'--with-config-file-path=/etc' \
'--with-config-file-scan-dir=/etc/php.d' \
'--with-curl' \
'--with-dom=/usr' \
'--with-freetype2-dir=/sw' \
'--with-gd' \
'--with-gettext=/sw' \
'--with-iconv' \
'--with-imap-ssl=/sw' \
'--with-jpeg-dir=/sw' \
'--with-png-dir=/sw' \
'--with-ldap' \
'--with-mcrypt=/sw' \
'--with-mhash=/sw' \
'--with-mysql=/usr/local/mysql' \
'--with-openssl' \
'--with-pcre' \
'--with-pear' \
'--with-png' \
'--with-regex=system' \
'--with-ttf' \
'--with-xml' \
'--with-xsl' \
'--with-zlib' \
'--without-oci8'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-13 13:00 UTC] marcus at synchromedia dot co dot uk
I don't know if the original problem of -export-symbols 
appearing is still a bug, but I checked through the docs 
from ./configure --help and removed a few apparently 
obsolete options and now it compiles and runs ok. My working 
config is now:

'./configure' \
'--disable-overload' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-dba' \
'--enable-exif' \
'--enable-ftp' \
'--enable-gd-imgstrttf' \
'--enable-gd-native-ttf' \
'--enable-mcal' \
'--enable-memory-limit' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-track-vars' \
'--enable-wddx' \
'--sysconfdir=/etc' \
'--with-apxs2=/sw/sbin/apxs' \
'--with-bz2' \
'--with-config-file-path=/etc' \
'--with-config-file-scan-dir=/etc/php.d' \
'--with-curl' \
'--with-dom=/usr' \
'--with-freetype2-dir=/sw' \
'--with-gd' \
'--with-gdbm=/sw' \
'--with-gettext=/sw' \
'--with-iconv' \
'--with-imap-ssl=/sw' \
'--with-jpeg-dir=/sw' \
'--with-png-dir=/sw' \
'--with-ldap' \
'--with-mcrypt=/sw' \
'--with-mhash=/sw' \
'--with-mysql=/usr/local/mysql' \
'--with-openssl' \
'--with-pcre' \
'--with-pear' \
'--with-png' \
'--with-ttf' \
'--with-xml' \
'--with-xsl' \
'--with-zlib' \
'--without-oci8'

Apologies for any inconvenience, but I suspect this report 
may still be useful to anyone else running into similar 
problems.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 14:01:31 2025 UTC