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
+Status: Assigned
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:
I've learned that clang does not support decimal floating point types at all:
http://clang.llvm.org/docs/UsersManual.html#gcc-extensions-not-implemented-yet
"clang does not support decimal floating point types (_Decimal32 and friends) or fixed-point
types (_Fract and friends); nobody has expressed interest in these features yet, so itâs hard
to say when they will be implemented."
And gcc only enables support for decimal floating point types by default on Linux, not OS X:
https://gcc.gnu.org/install/configure.html
"This is enabled by default only on PowerPC, i386, and x86_64 GNU/Linux systems. Other systems
may also support it, but require the user to specifically enable it."
The Apple build of gcc 4.2.1 in Xcode doesn't use the --enable-decimal-float flag, according to
"gcc -v", and neither do the newer gcc versions available in MacPorts. I don't know
whether that's due to oversight or ignorance, or whether it was tried and found not to work.
But I think this answers my question: yes it is expected that decimal floating point is not
available on OS X, so using ac_cv_decimal_fp_supported=no is a reasonable workaround for now.
As for fixing the configure script to detect this, perhaps "-O0" can be appended to the
CFLAGS for the duration of this test.
Previous Comments:
------------------------------------------------------------------------
[2014-10-09 12:26:50] php at deguest dot asia
Thank you, the solution of using this argument worked.
I am just a bit puzzled that Mac would not recognise decimal floating point. Seems a bit weird.
Jacques
------------------------------------------------------------------------
[2014-10-09 09:04:06] php-bugs-2014 at ryandesign dot com
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.
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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