Open sav-ix opened 6 years ago
I too am struggling with this. I use this line:
-sICU_LINK="-lsicuio -lsicuin -lsicuuc -lsicudt"
Then, the test runs like this:
"x86_64-w64-mingw32-g++" -Wl,-rpath -Wl,"/home/brannon/Workspace/e/bitcoin/depends/x86_64-w64-mingw32/bin" -o "bin.v2/libs/locale/build/gcc-7.3/debug/target-os-windows/visibility-hidden/has_icu.exe" -Wl,--start-group "bin.v2/libs/locale/build/gcc-7.3/debug/target-os-windows/visibility-hidden/has_icu_obj.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -m64 -g -fvisibility=hidden -fvisibility-inlines-hidden -L/home/brannon/Workspace/e/bitcoin/depends/x86_64-w64-mingw32/lib -lsicudt -lsicuin -lsicuio -lsicuuc
/home/brannon/Workspace/e/bitcoin/depends/x86_64-w64-mingw32/lib/libsicuuc.a(udata.ao):udata.cpp:(.rdata$.refptr.icudt62_dat[.refptr.icudt62_dat]+0x0): undefined reference to `icudt62_dat'
Who said the thing could re-order my libs? It appears that there must be code to remove duplicate libs, as I tried repeating a library but it got culled before the test. It's this code to remove duplicates that is probably losing the original ordering of the libs.
I had to work around this by using LDFLAGS instead of ICU_LINK.
AMDG
On 2/27/19 1:25 PM, Brannon King wrote:
I too am struggling with this. I use this line:
-sICU_LINK="-lsicuio -lsicuin -lsicuuc -lsicudt"
Then, the test runs like this:
"x86_64-w64-mingw32-g++" -Wl,-rpath -Wl,"/home/brannon/Workspace/e/bitcoin/depends/x86_64-w64-mingw32/bin" -o "bin.v2/libs/locale/build/gcc-7.3/debug/target-os-windows/visibility-hidden/has_icu.exe" -Wl,--start-group "bin.v2/libs/locale/build/gcc-7.3/debug/target-os-windows/visibility-hidden/has_icu_obj.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -m64 -g -fvisibility=hidden -fvisibility-inlines-hidden -L/home/brannon/Workspace/e/bitcoin/depends/x86_64-w64-mingw32/lib -lsicudt -lsicuin -lsicuio -lsicuuc /home/brannon/Workspace/e/bitcoin/depends/x86_64-w64-mingw32/lib/libsicuuc.a(udata.ao):udata.cpp:(.rdata$.refptr.icudt62_dat[.refptr.icudt62_dat]+0x0): undefined reference to `icudt62_dat'
Who said the thing could re-order my libs? It appears that there must be code to remove duplicate libs, as I tried repeating a library but it got culled before the test. It's this code to remove duplicates that is probably losing the original ordering of the libs.
This is happening because of a combination of several factors:
a) Jam splits -s arguments at spaces, thus ICU_LINK becomes
a list with each library as a separate element.
b) Because ICU_LINK is a list,
Thank you for your contributions. Main development of B2 has moved to https://github.com/bfgroup/b2 This issue has been automatically marked as "transition" to indicate the potential for needing transition to the new B2 development project.
Hello everyone,
For builds using mingw-w64 got errors:
during
libs\regex\build\has_icu_test.cpp
andlibs\locale\build\has_icu_test.cpp
build.Reproduced for:
not reproduced for:
Environment:
A source of error is improper library order in the linker command:
while expected to be:
as in
libs\locale\build\Jamfile.v2:121:14
oras used during ICU tools and test-suite build. ICU libraries order was set correctly in Boost configuration command (see above), but was changed by Boost build system (all
-l*
flags were set in alphabetical order). This have no effect for builds with shared ICU binaries but result to errors in case static binaries use. MSVC linker is also sensitive to the libraries order in build command, but for some reason has no such errors in this case.P.S. also drawing your attention, that
libs\regex\build\Jamfile.v2
andlibs\locale\build\Jamfile.v2
significantly differs, while relate to the same area (ICU support); presumably because 1st one wasn't covered with a commit like https://github.com/boostorg/locale/commit/1d7179612f4db1d27836577f690efe859e68a491 by @artyom-beilis.Best,
Alexander