Edit report at https://bugs.php.net/bug.php?id=68114&edit=1
ID: 68114
User updated by: php-bugs-2014 at ryandesign dot com
Reported by: php-bugs-2014 at ryandesign dot com
Summary: Build fails with gcc: Undefined symbols:
___extendsddf ___extendsfsd
Status: Closed
Type: Bug
Package: MySQL related
Operating System: OS X
PHP Version: 5.5.17
Assigned To: mysql
Block user comment: N
Private report: N
New Comment:
The problem seems to be that OS X does not support decimal floating point, but the configure script
thinks it does. You could override the problematic test by appending
ac_cv_decimal_fp_supported=no
to your configure arguments. For example, run:
./configure ac_cv_decimal_fp_supported=no
However, I would like some assurance that it is indeed expected that OS X does not support decimal
floating point regardless of OS X version or compiler, because that is what it seems like to me so
far.
Previous Comments:
------------------------------------------------------------------------
[2014-10-09 08:15:45] php at deguest dot asia
Hello,
I was reading with great interest the comment on this bug as of 8 October. I experienced the exact
same issue while trying to compile php 5.6.1 with Apache 2.4.10.
The flags I used were:
LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/local/lib:/Developer/SDKs/MacOSX10.6.sdk/usr/lib:/opt/gnome/lib:/usr/lib:/usr/local/pgsql/lib:/usr/local/BerkeleyDB/lib:/sw/lib
LDFLAGS=-L/usr/local/BerkeleyDB/lib -L/sw/lib
and the configure arguments were:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-mod-charset
--with-config-file-path=/usr/local/php/etc --with-openssl --with-libxml-dir=/sw
--with-pcre-regex=/usr/local/pcre --with-zlib=/usr --with-bz2 --enable-calendar --with-curl
--enable-exif --with-gd --with-jpeg-dir=/sw --with-png-dir=/sw --with-xpm-dir=/usr/X11
--with-freetype-dir=/usr/X11 --with-t1lib=/sw --enable-gd-native-ttf --enable-gd-jis-conv
--with-gettext --with-gmp=/sw --with-mhash --with-imap --with-kerberos --with-imap-ssl --with-ldap
--enable-mbstring --with-mcrypt=/sw --with-mysql --with-pgsql --enable-cli --with-readline=/sw
--enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-xsl
--with-zlib --with-libexpat-dir=/usr --with-libxml-dir=/sw --with-xmlrpc --with-libzip=/sw
--with-pear --enable-bcmath --enable-intl --with-icu-dir=/sw --with-iconv-dir=/usr
The error is:
Undefined symbols:
"___extendsddf", referenced from:
_ps_fetch_float in mysqlnd_ps_codec.o
"___extendsfsd", referenced from:
_ps_fetch_float in mysqlnd_ps_codec.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
I am clueless as to how to solve this problem and would appreciate any assistance to help resolve
this.
Regards,
Jacques
------------------------------------------------------------------------
[2014-10-08 11:42:35] dwickander at tenenz dot com
This ticket shows it is closed, but I am still having the same issue that ryandesign is having.
------------------------------------------------------------------------
[2014-10-08 05:08:34] php-bugs-2014 at ryandesign dot com
I've at least figured out what the difference is between compiling the test script on the
command line and having the configure script compile it: the configure script uses the CFLAGS,
CXXFLAGS, CPPFLAGS, LDFLAGS and LIBS it's given, which in MacPorts' case includes
optimization flags. When using any optimization level above 0, the test script (either the old
version or the new version) compiles with no error:
$ gcc-apple-4.2 test.c -o test -O0; echo $?
Undefined symbols:
"___extendsddf", referenced from:
_main in cc22Pp30.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
1
$ gcc-apple-4.2 test.c -o test -O1; echo $?
0
------------------------------------------------------------------------
[2014-10-08 04:02:12] php-bugs-2014 at ryandesign dot com
Oh. On OS X 10.10, the test *is* failing, as it apparently should:
checking whether whether compiler supports Decimal32/64/128 types... no
Out of curiosity, on which systems or compilers is this support supposed to be available?
------------------------------------------------------------------------
[2014-10-08 04:00:29] php-bugs-2014 at ryandesign dot com
Thanks, but this is not fixing the problem for me. The configure script still detects that
Decimal32/64/128 types are supported, and the build on OS X 10.6 and earlier still fails at the end
with undefined symbols.
The just released PHP 5.6.1 is also affected now, in addition to the previously affected 5.5.17 and
5.4.33.
What's written in the commit message isn't right either. All parts of the configure and
build should be using the same compiler; in MacPorts they certainly are, since we set the CC
environment variable to point to the path to gcc 4.2.1. Additionally, cc may be a symlink to
llvm-gcc-4.2 on Xcode 4, but it is not usual to use Xcode 4 on OS X 10.6 because obtaining it
requires a paid Apple developer membership; the last free version of Xcode for OS X 10.6 is 3.2.6 in
which gcc and cc are both the same gcc 4.2.1. The problem is also reproduced on OS X 10.4 using the
MacPorts-provided version of Apple gcc 4.2.1.
The MacPorts ticket links to a forum post ( https://forums.freebsd.org/viewtopic.php?f=5&t=48084
) which claims that adding the include path to the mysqlnd extension directory to CFLAGS fixed the
problem. That didn't work for me either.
Note that this decimal-types configure test should possibly be failing on all versions of OS X.
Here's what I see on OS X 10.10:
$ clang test.c
test.c:4:40: error: type of machine mode does not match type of base type
typedef float dec32 __attribute__((mode(SD)));
^
test.c:4:40: error: unknown machine mode 'SD'
2 errors generated.
$ clang --version
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=68114
--
Edit this bug report at https://bugs.php.net/bug.php?id=68114&edit=1