Bug #48795 [Ver->Fbk]: Building intl 64-bit fails on OS X

From: Date: Mon, 09 Apr 2018 22:00:57 +0000
Subject: Bug #48795 [Ver->Fbk]: Building intl 64-bit fails on OS X
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214673@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=48795&edit=1 ID: 48795 Updated by: cmb@php.net Reported by: gwynne@php.net Summary: Building intl 64-bit fails on OS X -Status: Verified +Status: Feedback Type: Bug Package: Compile Failure Operating System: OS X 10.5 & 10.6; Linux PHP Version: 5.3 SVN; 5.4.0RC1 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Is this still an issue with actively supported PHP versions[1]? [1] <http://www.php.net/supported-versions.php> Previous Comments: ------------------------------------------------------------------------ [2015-02-26 01:17:36] kurt dot newman at cpanel dot net This problem is cropping up on CentOS 7 x86_64 with PHP 5.3.29. It looks like the PHP devs resolved this in later versions of PHP by adding PHP_ADD_LIBRARY macros to acinclude.m4 and aclocal.m4. The odd thing is, on CentOS 6.5, the resulting sapi/cli/php binary properly links against libstdc++ even though it isn't passing -lstdc++ to the linker. I'll need to figure out why that's possible at a later date. To resolve this specific issue, I did the following. 1. Patch acinclude.m4 and aclocal.m4 2. re-run ./buildconf This regenerates the configure script and ensures that the -lstdc++ is used to properly link sapi/cli/php. However, it also ensures scripts/php-config is updated with the -lstdc++ library as well. This update ensures all extensions that that are compiled against your PHP version also link against stdc++. The patch: commit 9fc87ffe4384306abb4454ced58b02a79114038e Author: S. Kurt Newman <kurt.newman@cpanel.net> Date: Wed Feb 25 17:45:36 2015 -0600 add stdc++ to acinclude and aclocal for php 5.3.29 diff --git a/acinclude.m4 b/acinclude.m4 index 2681b79..6ad028e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -762,6 +762,7 @@ AC_DEFUN([PHP_REQUIRE_CXX],[ if test -z "$php_cxx_done"; then AC_PROG_CXX AC_PROG_CXXCPP + PHP_ADD_LIBRARY(stdc++) php_cxx_done=yes fi ]) diff --git a/aclocal.m4 b/aclocal.m4 index 07b5e61..f3770e2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -762,6 +762,7 @@ AC_DEFUN([PHP_REQUIRE_CXX],[ if test -z "$php_cxx_done"; then AC_PROG_CXX AC_PROG_CXXCPP + PHP_ADD_LIBRARY(stdc++) php_cxx_done=yes fi ]) ------------------------------------------------------------------------ [2013-06-11 14:10:23] cweiske@php.net Still happens on 5.3.26. cornelius dot howl at gmail dot com's commands do not help here. ------------------------------------------------------------------------ [2013-03-09 10:14:47] cornelius dot howl at gmail dot com For this issue, here is the patch in phpbrew https://github.com/c9s/phpbrew/commit/18ef766d0e013ee87ac7d86e338ebec89fbeb445 ------------------------------------------------------------------------ [2013-03-09 10:12:31] cornelius dot howl at gmail dot com Quick fix for this 5.3.28 should work edit Makefile and found the rule of ext/intl/msgformat/msgformat_helpers.cpp change the $(CC) to $(CXX) then run: sed -i '/EXTRA_LIBS = /s|$| -lstdc++|' Makefile ------------------------------------------------------------------------ [2013-03-08 16:27:05] saltwaterc at gmail dot com sed -i '/EXTRA_LIBS = /s|$| -lstdc++|' Makefile One liner fix for those who still do (scripted) builds on 5.3.x. 5.3.22 still fails on Ubuntu 12.04. ------------------------------------------------------------------------ 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=48795 -- Edit this bug report at https://bugs.php.net/bug.php?id=48795&edit=1

« previous php.bugs (#214673) next »