Bug #68114 [Asn]: Build fails with gcc: Undefined symbols: ___extendsddf ___extendsfsd

From: Date: Thu, 11 Dec 2014 18:34:14 +0000
Subject: Bug #68114 [Asn]: Build fails with gcc: Undefined symbols: ___extendsddf ___extendsfsd
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189020@lists.php.net to get a copy of this message
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: Assigned Type: Bug Package: MySQL related Operating System: OS X PHP Version: 5.5.17 Assigned To: keyur Block user comment: N Private report: N New Comment: @cbrugh, a workaround you can use immediately is described in my comment above from 2014-10-09 09:04 UTC. The fix I propose is described in my comment above from 2014-11-03 21:37 UTC. Previous Comments: ------------------------------------------------------------------------ [2014-12-11 14:55:17] cbrugh at gmail dot com Hello, I am trying to compile 5.6.3 on FreeBSD and get the following.. I applied the attached patch and still get the same error... any advice? /home/b/php-5.6.3/ext/mysqlnd/mysqlnd_ps_codec.c:233: undefined reference to `__extendsfsd' /home/b/php-5.6.3/ext/mysqlnd/mysqlnd_ps_codec.c:233: undefined reference to `__extendsddf' Thanks! ------------------------------------------------------------------------ [2014-11-14 09:40:56] php-bugs-2014 at ryandesign dot com Certainly; here is the compiled program: http://ryandesign.com/tmp/php-bug-68114/snippet ------------------------------------------------------------------------ [2014-11-04 17:33:21] keyur@php.net One last request: could you put the -O1 binary somewhere I could download from? ------------------------------------------------------------------------ [2014-11-04 05:58:26] php-bugs-2014 at ryandesign dot com My assumption is that the fact that the configure test compiles and links is an error. Disabling optimizations for the duration of the configure test works around that error and allows the configure test to properly detect the absence of decimal fp support. Yes, this is papering over a bug in the compiler and/or linker but that's the best we can hope for since Apple is not going to be releasing any updated versions of the developer tools for the affected OS X versions because they are several major versions old by now. Inspecting the value of __APPLE_CC__ doesn't seem likely to help identify the broken compilers in this situation. With an affected version of gcc from OS X 10.6 ("gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)"), the value of __APPLE_CC__ is "5666". However that OS X version also includes the llvm-gcc compiler ("gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)") which is not affected by the problem and its __APPLE_CC__ value is "5658". An early version of clang is also included ("Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)"); it is not affected by the bug and its __APPLE_CC__ value is "5621". The version of gcc-4.2 on OS X 10.5 ("gcc version 4.2.1 (Apple Inc. build 5577)") is affected; its __APPLE_CC__ value is 5577. It doesn't seem necessary to identify the affected compilers in any way; just disable optimizations for this configure test. This should not have any adverse effects on the test's ability to detect the feature on other platforms nor would it have any effect on the final executable's performance. You previously asked me to compile and run a snippet. Here's the result on OS X 10.5: $ gcc-4.2 snippet.c Undefined symbols: "___extendsddf", referenced from: _main in ccODpbxz.o ld: symbol(s) not found collect2: ld returned 1 exit status $ gcc-4.2 -O1 snippet.c $ ./a.out Expected: 99.49, Actual: 99.490000 $ echo $? 0 $ ------------------------------------------------------------------------ [2014-11-04 03:56:50] keyur@php.net The config.log for the (default) -O2 case shows the test compiles *and* links *and* runs *and* exits with 0. So the same should happen for the main PHP executable...I don't understand why that linking fails. I am a bit hesitant to change the optimizer level since that seems just paper over the bug in the compiler/linker. I'd rather add a check for #if defined(__APPLE__CC__) && __APPLE_CC__ > N Can you tell me what the value of that macro is on your system? ------------------------------------------------------------------------ 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

« previous php.bugs (#189020) next »