Edit report at https://bugs.php.net/bug.php?id=68114&edit=1
ID: 68114
Comment by: keyur@php.net
Reported by: php-bugs-2014 at ryandesign dot com
Summary: Build fails with gcc: Undefined symbols:
___extendsddf ___extendsfsd
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 will take a look at this today.
Previous Comments:
------------------------------------------------------------------------
[2014-10-01 12:39:26] johannes@php.net
I can verify on this machine:
$ uname -a
Darwin foo 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:57:13 PST 2010;
root:xnu-1504.3.12~1/RELEASE_X86_64 x86_64
$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Running configure I see
checking whether whether compiler supports Decimal32/64/128 types... yes
This is unexpected as manually trying the configure-test fails:
$ cat test.c
#include <stdio.h>
int main(int argc, char **argv) {
typedef float dec32 __attribute__((mode(SD)));
dec32 k = 99.49f;
double d2 = (double)k;
return 0;
}
$ gcc test.c
Undefined symbols:
"___extendsddf", referenced from:
_main in ccAnM5bQ.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
If I change the test in config9.m4 in another way that it should compile, but fail to link (add a
line "does_not_exist();") the test fails as expected.
Observation so far: The code fails when building stand-alone and when building as part of the PHP
build, whoever it seems to work in configure's context.
For a test I also changed from AC_TRY_RUN to AC_TRY_LINK. With AC_TRY_LINK this test fails on the
Mac machine, but also on a Linux+gcc box where it used to work with AC_TRY_RUN.
So I am confussed.
------------------------------------------------------------------------
[2014-09-30 10:32:58] mail_commercial at yahoo dot fr
Hello,
I'm the initiator of this request to the PHP maintainer in MacPorts.
I've applied the workaround you've proposed.
When removing the definition of HAVE_DECIMAL_FP_SUPPORT at the end of ext/mysqlnd/config9.m4 and
cleaning the build terminates without any error.
I'm reaching the limit of my skills. I don't know the use of the this constant. In my
mind, even my 32 bits powerbook G4 has a decimal floating point support.
my config :
- hardware: mac G4, not intel
- OS: mac os X leopard
- compiler: gcc4.2
Hoping this information are useful.
------------------------------------------------------------------------
[2014-09-29 07:33:08] leigh@php.net
Looks related to #67839, possibly HAVE_DECIMAL_FP_SUPPORT incorrectly being set under OSX in
ext/mysqlnd/config9.m4
The missing symbols are from libdfp (decimal floating point)
I don't have OSX available to me right now, so it would be helpful if you could test this. You
can simply delete the last few lines in config9.m4 to prevent the define being set.
If this turns out to be the case, hopefully someone with more OSX specific knowledge can fix the
configure script.
------------------------------------------------------------------------
[2014-09-29 02:32:09] php-bugs-2014 at ryandesign dot com
Description:
------------
Hello, I'm the maintainer of PHP in MacPorts.
The latest versions of PHP 5.5 (5.5.17) and 5.4 (5.4.33) do not build in MacPorts with gcc (e.g. gcc
4.2.1 as provided by Xcode on Mac OS X 10.6):
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
They build fine in MacPorts with clang (as provided by Xcode on OS X 10.7 and up).
This problem was reported to the MacPorts project here:
https://trac.macports.org/ticket/45197
This problem does not occur with the latest versions of PHP 5.3 (5.3.29) or 5.6 (5.6.0), nor did it
happen with the previous versions of PHP 5.4 (5.4.32) or 5.5 (5.5.16).
In case it is relevant, we are configuring with PHP_MYSQLND_ENABLED=yes.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68114&edit=1