dev-libs/icu-3.6-r1 provided icu-config reports CFLAGS, CXXFLAGS, LDFLAGS and so on used while compiling icu, not what is necessary to compile stuff against icu or link icu. This is typically caused by such custom *-config scripts getting their CFLAGS and LDFLAGS (that they are going to report for that installation) from configure's CFLAGS and LDFLAGS and co. This is a no-no - it should store any necessary for build (that it probably adds to LDFLAGS and co inside configure.in) flags inside AM_CFLAGS, AM_LDFLAGS or such, and in Makefile.{in,am}'s use those variables together with CFLAGS/LDFLAGS (I believe this is automatic with autotools) and the *-config tool should only start reporting AM_CFLAGS and co, and NOT CFLAGS/LDFLAGS. Otherwise icu-config is reporting things mostly out of /etc/make.conf, overriding what is asked for the compilation of an application that happens to use icu. The most unpleasant side-effect is that --as-needed LDFLAGS can't be succesfully filtered out by applications/libraries that break with it, because icu-config forces it onto them regardless of any strip-ldflags in the ebuild. In summary again, such *-config --cflags and *-config --ldflags should never report what was passed as CFLAGS, LDFLAGS and so on by the user (portage in our case), but only what is found necessary by the configure script. I'd be happy to explain this further if necessary, here or preferably over IRC (leio).
Considering we apply exactly *zero* patches to this, if you can reproduce it w/ 3.8 [1] then send this upstream please. [1] http://overlays.gentoo.org/svn/proj/php/testing/migration/dev-libs/icu/
Still broken in 3.8.1. A quick fix is in the overlay and will get to the tree whenever Bug 200010 is fixed. Also, THREADSCPPFLAGS="-D_REENTRANT" is apparently never reported with --cppflags as it's definited in a wrong place, I really don't care enough ATM. # for i in cflags{,-dynamic} cxxflags{,-dynamic} cppflags{,-dynamic,-searchpath} ldflags{,-layout,-libsonly,-searchpath,-system,-icuio,-obsolete} ; do echo ${i}: $(icu-config --${i}) ; done cflags: cflags-dynamic: -fPIC cxxflags: cxxflags-dynamic: -fPIC cppflags: -I/usr/include cppflags-dynamic: -DPIC cppflags-searchpath: -I/usr/include ldflags: -lpthread -lm -L/usr/lib -licui18n -licuuc -licudata -lpthread -lm ldflags-layout: -licule -liculx ldflags-libsonly: -licui18n -licuuc -licudata ldflags-searchpath: -L/usr/lib ldflags-system: -lpthread -lm ldflags-icuio: -licuio ldflags-obsolete: -licuobsolete Whatever, please report this stuff upstream: http://bugs.icu-project.org/trac/
Fixed in dev-libs/icu-3.8.1
(In reply to Jakub Moc (RETIRED) from comment #3) > Fixed in dev-libs/icu-3.8.1 sorry that I missed this. Please use the pkg-config and NOT the icu-config files. If you must use icu-config , just use --cppflags and not any other options.