Bug #80425 [Opn]: MessageFormatAdapter::getArgTypeList redefined

From: Date: Thu, 26 Nov 2020 14:49:28 +0000
Subject: Bug #80425 [Opn]: MessageFormatAdapter::getArgTypeList redefined
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230648@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80425&edit=1 ID: 80425 Updated by: nikic@php.net Reported by: bjornar dot ness at gmail dot com Summary: MessageFormatAdapter::getArgTypeList redefined Status: Open Type: Bug Package: Compile Failure Operating System: Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Huh, that's a nifty hack. I think it would be better to rename these methods on the PHP side (give them a php prefix or so), so we're not at the mercy of these (entirely internal) methods being defined in icu or not. Previous Comments: ------------------------------------------------------------------------ [2020-11-26 14:22:05] bjornar dot ness at gmail dot com The following patch has been added/updated: Patch Name: remove-duplicate-definition.patch Revision: 1606400525 URL: https://bugs.php.net/patch-display.php?bug=80425&patch=remove-duplicate-definition.patch&revision=1606400525 ------------------------------------------------------------------------ [2020-11-26 14:18:28] bjornar dot ness at gmail dot com Description: ------------ libicui18n.a(umsg.ao): In function `icu_68::MessageFormatAdapter::getArgTypeList(icu_68::MessageFormat const&, int&)': umsg.cpp:(.text+0x20): multiple definition of `icu_68::MessageFormatAdapter::getArgTypeList(icu_68::MessageFormat const&, int&)' ext/intl/msgformat/msgformat_helpers.o:/usr/src/php-build/install/icu-release-68-1/include/unicode/msgfmt.h:1076: first defined here collect2: error: ld returned 1 exit status Makefile:288: recipe for target 'sapi/cli/php' failed make: *** [sapi/cli/php] Error 1 MessageFormatAdapter::getArgTypeList(icu_68::MessageFormat const&, int&) is defined in: https://github.com/unicode-org/icu/blob/3d706fac426fe4b4ac5e84b21a8f3bcb4eb5953e/icu4c/source/i18n/umsg.cpp#L51 and https://github.com/unicode-org/icu/blob/3d706fac426fe4b4ac5e84b21a8f3bcb4eb5953e/icu4c/source/i18n/unicode/msgfmt.h#L1075 (unless compiled with -DUCONFIG_NO_FORMATTING, which makes php not compile against it) php-src for some reason redefines this function in: https://github.com/php/php-src/blob/08006e8337ceb9e8d3e6294aa65fb3b4b42d4776/ext/intl/msgformat/msgformat_helpers.cpp#L58 This redefinition is mostly unnoticed unless linked against a static libicu ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80425&edit=1

« previous php.bugs (#230648) next »