Bug #71343 [NEW]: Build system tries to link with Xcode libs and link fails

From: Date: Tue, 12 Jan 2016 01:11:08 +0000
Subject: Bug #71343 [NEW]: Build system tries to link with Xcode libs and link fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198590@lists.php.net to get a copy of this message
From:             yohgaki
Operating system: OSX
PHP version:      5.6Git-2016-01-12 (Git)
Package:          Compile Failure
Bug Type:         Bug
Bug description:Build system tries to link with Xcode libs and link fails

Description:
------------
Xcode libs should have lowest precedence, but build system tries to link
with Xcode libs and link fails.

It seems not only -L flag, but also -I flag (and others) have the same
issue.

All supported/dev branches have this problem.



Test script:
---------------
$ YACC=/usr/local/opt/bison27/bin/bison ./configure
--with-iconv=/usr/local/opt/libiconv && make -j 4

You'll need brew's bison27 and libiconv.

Expected result:
----------------
Link should succeed. 

Actual result:
--------------
cc -I/usr/local/opt/libiconv/include -g -O2 -fvisibility=hidden  
-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib
-L/usr/local/opt/libiconv/lib 
-Wl,-rpath,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib
-Wl,-rpath,/usr/local/opt/libiconv/lib ext/date/php_date.o
ext/date/lib/astro.o ext/date/lib/dow.o ext/date/lib/parse_date.o
ext/date/lib/parse_tz.o 
***SNIP***
main/fastcgi.o sapi/cgi/cgi_main.o  -lresolv -liconv -liconv -lm -lxml2
-lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm
-lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore
-lm  -o sapi/cgi/php-cgi
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      _zif_iconv_substr in iconv.o
      _zif_iconv_mime_encode in iconv.o
      _php_iconv_string in iconv.o
      __php_iconv_strlen in iconv.o
      __php_iconv_strpos in iconv.o
      __php_iconv_appendl in iconv.o
      _php_iconv_stream_filter_append_bucket in iconv.o
      ...
***SNIP***

-- 
Edit bug report at https://bugs.php.net/bug.php?id=71343&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71343&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71343&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71343&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71343&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71343&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71343&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71343&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71343&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71343&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71343&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71343&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71343&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71343&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71343&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71343&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71343&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71343&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71343&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71343&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71343&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#198590) next »