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

From: Date: Tue, 04 Nov 2014 02:18:57 +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-188433@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:

Here is the config.log for php-5.6.3RC1 on OS X 10.6.8:

https://gist.github.com/ryandesign/4c4721cf740c014129e4

Here is the config.log after applying the patch I just attached, which fixes the problem as I
suggested earlier:

https://gist.github.com/ryandesign/4b2d1a5e082f3cb90994


Previous Comments:
------------------------------------------------------------------------
[2014-11-03 21:59:12] keyur@php.net

I don't have a Mac OS box, so I'm having the commands run by a friend. Here's the
config it works on: 
$ uname -a
Darwin 2414 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014;
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

I see it is Clang. If you're available on IRC somewhere, let me know. We can work through this
faster.

------------------------------------------------------------------------
[2014-11-03 21:50:05] keyur@php.net

Can you paste the config.log of a failed build for me to look at on pastebin?

------------------------------------------------------------------------
[2014-11-03 21:37:55] php-bugs-2014 at ryandesign dot com

You can revert that change; it doesn't help, as I said above on 2014-10-08. It is not possible
that you tested that fix on Mac OS X 10.9 with gcc 4.2.1 from XCode because the versions of Xcode
for Mac OS X 10.7 and later do not include any version of gcc. (Xcode 4 for those OS X versions
include llvm-gcc42 which is different. Xcode 5 and later provide only clang.) The fix I propose is
to modify the configure script so that "-O0" is added to the CFLAGS for this test, as
apparently old gcc optimizes the test away somehow, as I said above on 2014-10-10.

------------------------------------------------------------------------
[2014-11-03 21:22:50] keyur@php.net

Yes I did read the comments and the patch I made specifically checks the compiled output to make
sure it matches what's expected: https://github.com/php/php-src/commit/648673bffe7a7c63ce6223fcbac7c118a114c893

On Mac OS X 10.9 with gcc 4.2.1 from XCode I've had no issues compiling. And same with a
gcc-4.9 from homebrew. I don't have access to OS X 10.6.

Can you pastebin or gist your config.log file with the failure? 

Also can you compile and run this snippet and paste the output?
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv) {
  typedef float dec32 __attribute__((mode(SD)));
  dec32 k = 99.49f;
  double d2 = (double)k;
  const char *check_str = "99.49";
  char print_str[32];
  snprintf(print_str, 32, "%f", d2);
  printf("Expected: %s, Actual: %s\n", check_str, print_str);
  return memcmp(print_str, check_str, 5);
}

------------------------------------------------------------------------
[2014-11-03 00:35:51] php-bugs-2014 at ryandesign dot com

Thanks for making these snapshots available on a different server since snaps.php.net and qa.php.net
are still down.

I tested 5.5.19RC1 and 5.6.3RC1, and there is no change in the issue.

Did you read all my previous messages in which I explained what the problem and solution are?

------------------------------------------------------------------------


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


Thread (40 messages)

« previous php.bugs (#188433) next »