php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63756 static libs
Submitted: 2012-12-13 08:22 UTC Modified: 2020-11-26 16:21 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (66.7%)
From: pwinkler at get-the-blues dot de Assigned: cmb (profile)
Status: Duplicate Package: intl (PECL)
PHP Version: 5.4.9 OS: linux 32 bit 2.6.32.46
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pwinkler at get-the-blues dot de
New email:
PHP Version: OS:

 

 [2012-12-13 08:22 UTC] pwinkler at get-the-blues dot de
Description:
------------
I compiled icu with CPPFLAGS="-DU_STATIC_IMPLEMENTATION" for static libs and get errors with PHP5.4.9 

/kunden/250107_86637/php-module/appl/icu/lib/libicui18n.a(umsg.ao): In function `icu_49::MessageFormatAdapter::getArgTypeList(icu_49::MessageFormat const&, int&)':
umsg.cpp:(.text._ZN6icu_4920MessageFormatAdapter14getArgTypeListERKNS_13MessageFormatERi+0x0): multiple definition of `icu_49::MessageFormatAdapter::getArgTypeList(icu_49::MessageFormat const&, int&)'
ext/intl/msgformat/.libs/msgformat_helpers.o:/kunden/250107_86637/php-module/source/php-5.4.9/ext/intl/msgformat/msgformat_helpers.cpp:46: first defined here
/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
collect2: ld returned 1 exit status

I comment in /kunden/250107_86637/php-module/source/php-5.4.9/ext/intl/msgformat/msgformat_helpers.cpp line 44 to 48 the modul gets compiled

ldd modules/intl.so
        linux-gate.so.1 =>  (0xa93fe000)
        libdl.so.2 => /lib/libdl.so.2 (0xa7cf4000)
        libm.so.6 => /lib/libm.so.6 (0xa7cce000)
        libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc_s.so.1 (0xa7cb0000)
        libc.so.6 => /lib/libc.so.6 (0xa7b54000)
        /lib/ld-linux.so.2 (0xa93ff000)

but at loading theres a failure

PHP Warning:  PHP Startup: Unable to load dynamic library './intl.so' - ./intl.so: undefined symbol: __dynamic_cast in Unknown on line 0


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-13 11:19 UTC] falko at foscom dot de
I can reproduce the problem in that way. I use the configure string for icu:
CPPFLAGS="-DU_STATIC_IMPLEMENTATION" ./configure --prefix=/XXXX/XXXXX/intl/appl/ 
--enable-static --disable-shared

After configure i use make:
CPPFLAGS="-DU_STATIC_IMPLEMENTATION" make -j10 && make -j10 install

My PHP configue string is this one:
./configure --with-icu-dir=/XXXXX/XXXXX/intl/appl --enable-intl=shared --
disable-all

After that i changed the Makefile:
--- Makefile.orig       2012-12-13 11:21:30.000000000 +0100
+++ Makefile    2012-12-13 12:16:46.000000000 +0100
@@ -24,7 +24,7 @@ PHP_CGI_OBJS = sapi/cgi/cgi_main.lo sapi
 SAPI_CGI_PATH = sapi/cgi/php-cgi
 BUILD_CGI = $(LIBTOOL) --mode=link $(CC) -export-dynamic $(CFLAGS_CLEAN) 
$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS_PROGRAM) $(LDFLAGS) $(PHP_RPATHS) 
$(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_CGI_OBJS) $(EXTRA_LIBS) 
$(ZEND_EXTRA_LIBS) -o $(SAPI_CGI_PATH)
 PROG_SENDMAIL = /usr/sbin/sendmail
-INTL_SHARED_LIBADD = -Wl,-rpath,/kunden/154807_04177/intl/appl/lib -
L/kunden/154807_04177/intl/appl/lib -ldl -lm -licui18n -licuuc -licudata -ldl -
lm -licuio
+INTL_SHARED_LIBADD = -Wl,--rpath -Wl,/kunden/154807_04177/intl/appl/lib -
L/kunden/154807_04177/intl/appl/lib -ldl -lm -licui18n -licuuc -licudata -ldl -
lm -licuio
 shared_objects_intl = ext/intl/php_intl.lo ext/intl/intl_error.lo 
ext/intl/intl_convert.lo ext/intl/collator/collator.lo 
ext/intl/collator/collator_class.lo ext/intl/collator/collator_sort.lo 
ext/intl/collator/collator_convert.lo ext/intl/collator/collator_locale.lo 
ext/intl/collator/collator_compare.lo ext/intl/collator/collator_attr.lo 
ext/intl/collator/collator_create.lo ext/intl/collator/collator_is_numeric.lo 
ext/intl/collator/collator_error.lo ext/intl/common/common_error.lo 
ext/intl/formatter/formatter.lo ext/intl/formatter/formatter_main.lo 
ext/intl/formatter/formatter_class.lo ext/intl/formatter/formatter_attr.lo 
ext/intl/formatter/formatter_data.lo ext/intl/formatter/formatter_format.lo 
ext/intl/formatter/formatter_parse.lo ext/intl/normalizer/normalizer.lo 
ext/intl/normalizer/normalizer_class.lo 
ext/intl/normalizer/normalizer_normalize.lo ext/intl/locale/locale.lo 
ext/intl/locale/locale_class.lo ext/intl/locale/locale_methods.lo 
ext/intl/dateformat/dateformat.lo ext/intl/dateformat/dateformat_class.lo 
ext/intl/dateformat/dateformat_attr.lo ext/intl/dateformat/dateformat_data.lo 
ext/intl/dateformat/dateformat_format.lo ext/intl/dateformat/dateformat_parse.lo 
ext/intl/msgformat/msgformat.lo ext/intl/msgformat/msgformat_attr.lo 
ext/intl/msgformat/msgformat_class.lo ext/intl/msgformat/msgformat_data.lo 
ext/intl/msgformat/msgformat_format.lo ext/intl/msgformat/msgformat_helpers.lo 
ext/intl/msgformat/msgformat_parse.lo ext/intl/grapheme/grapheme_string.lo 
ext/intl/grapheme/grapheme_util.lo ext/intl/resourcebundle/resourcebundle.lo 
ext/intl/resourcebundle/resourcebundle_class.lo 
ext/intl/resourcebundle/resourcebundle_iterator.lo 
ext/intl/transliterator/transliterator.lo 
ext/intl/transliterator/transliterator_class.lo 
ext/intl/transliterator/transliterator_methods.lo ext/intl/idn/idn.lo 
ext/intl/spoofchecker/spoofchecker_class.lo 
ext/intl/spoofchecker/spoofchecker.lo 
ext/intl/spoofchecker/spoofchecker_create.lo 
ext/intl/spoofchecker/spoofchecker_main.lo
 PHP_INSTALLED_SAPIS = cli cgi
 PHP_EXECUTABLE = $(top_builddir)/$(SAPI_CLI_PATH)
 [2019-10-09 08:20 UTC] chrono dot radion at gmail dot com
I'm having the same problem with php 7.3.10 while trying to use static icu.

/home/tc/Build/lighttpd/deps/usr/local/lib/libicui18n.a(umsg.ao): In function `icu_65::MessageFormatAdapter::getArgTypeList(icu_65::MessageFormat const&, int&)':
umsg.cpp:(.text._ZN6icu_6520MessageFormatAdapter14getArgTypeListERKNS_13MessageFormatERi+0x0): multiple definition of `icu_65::MessageFormatAdapter::getArgTypeList(icu_65::MessageFormat const&, int&)'
ext/intl/msgformat/.libs/msgformat_helpers.o:/home/tc/Build/lighttpd/src/php-7.3.10/ext/intl/msgformat/msgformat_helpers.cpp:69: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:270: sapi/cgi/php-cgi] Error 1

Is it simply impossible to compile using static icu?
 [2020-11-26 14:52 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2020-11-26 14:52 UTC] cmb@php.net
Closing as duplicate of bug #80425, because the other ticket has a patch attached.
 [2020-11-26 16:21 UTC] pwinkler at get-the-blues dot de
this is not a complaint, but it took 8 years and a patch which does exactly the same as i commented back then, for someone to take a look?!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 21:01:28 2024 UTC