Subject: [Boost-bugs] [Boost C++ Libraries] #12570: b2 ignores Iconv and disabled boost-locale lib, even though has_iconv.cpp passed
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-10-31 13:59:58
#12570: b2 ignores Iconv and disabled boost-locale lib, even though has_iconv.cpp
passed
----------------------------+------------------------------
Reporter: hbadger@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: Building Boost | Version: Boost 1.62.0
Severity: Showstopper | Keywords: icu iconv
----------------------------+------------------------------
Building boost from sources git tag 1.62.0
(4f2bdeb93a4be13ba0dc5e9f44920a2bf67191fc)
I want to crossbuild it, on linux (ubuntu) host, for Mac OS X target.
Goal:
crossbuild the lib boost, with boost-locale
Result: boost says that locale needs either ICU or iconv, and it does not
build library for locale.
Expected result: it would build the library for boost locale.
Error messages:
...
- iconv (libc) : no
- iconv (separate) : no
...
- Boost.Locale needs either iconv or ICU library to be built.
...
ls stage/lib/
libboost_atomic-mt-s.a libboost_filesystem-mt-s.a
libboost_program_options-mt-s.a libboost_system-mt-s.a
libboost_thread-mt-s.a
libboost_atomic-mt-sd.a libboost_filesystem-mt-sd.a
libboost_program_options-mt-sd.a libboost_system-mt-sd.a
libboost_thread-mt-sd.a
Environment:
Crosscompiler and it's toolchain is built in
/home/ubuntu/build/osxcross/target/bin/ and is proven to work (builds
Mach-O executables, they work when copied ontop real Mac OS X).
Mac SDK is available in /home/ubuntu/build/macsdk/MacOSX10.11.sdk/
And it provides the iconv.h file ('''though I do not see any .a''' or
other file for it - is that ok?)
find /home/ubuntu/build/macsdk/MacOSX10.11.sdk/usr/include | grep iconv
/home/ubuntu/build/macsdk/MacOSX10.11.sdk/usr/include/iconv.h
Executed command (in place where I downloaded boost, with needed
submodules)
export WITH_ICONV="/home/ubuntu/build/macsdk/MacOSX10.11.sdk/usr/" && git
clean -xdf ; git submodule foreach git clean -xdf; ./bootstrap.sh --with-
icu && ./b2 headers && export OSX_CPU_ARCH="core2" && export
OSX_VERSION_MIN="10.8" && time ./b2 --toolset=clang --build-
type=complete --with-filesystem --with-system --with-program_options
--with-thread --with-locale cxxflags=-mmacosx-version-
min=${OSX_VERSION_MIN} cxxflags=-march=${OSX_CPU_ARCH} target-os=darwin
architecture=x86 address-model=64 --layout=tagged link=static runtime-
link=static -sNO_BZIP2=1 --sNO_ZLIB=1
--prefix=/home/ubuntu/build/boost/build-osx/ threading=multi
boost.locale.icu=off boost.locale.std=off boost.locale.iconv=on
-sICONV_PATH="$WITH_ICONV"
Running strace debug (strace b2), I can confirm that Boost does try to
build the has_ionv.cpp program, and it seems to work fine. All invocations
I seen return with 0 exit code.
E.g:
[pid 22980] execve("/home/ubuntu/build/osxcross/target/bin/x86_64-apple-
darwin15-clang++", ["/home/ubuntu/build/osxcross/target/bin/x86_64-apple-
darwin15-clang++", "-c", "-x", "c++", "-march=core2", "-mmacosx-version-
min=10.8", "-O0", "-g", "-fno-inline", "-Wall", "-g", "-fPIC", "-m64",
"-march=core2", "-mmacosx-version-min=10.8", "-DBOOST_ALL_NO_LIB=1",
"-I.", "-I/home/ubuntu/build/macsdk/MacOSX10.11.sdk/usr/include", "-o",
"bin.v2/libs/locale/build/clang-linux-3.8.0/debug/target-os-
darwin/has_iconv_libc_ext.o", "libs/locale/src/../build/has_iconv.cpp"],
[/* 22 vars */]) = 0
Repeating this test manually also works, creates the .o file, and it is
indeed in Mach-O format.
No idea why then it still tells me that iconv was not enabled, and as
result does not build locale.
This bug disallows me from at all using Boost until fixed.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12570> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC