简体   繁体   中英

Building boost without-icu

I would like to build boost regex on Solaris 10 without using the icu libraries.

After building boost regex without icu support

./bootstrap.sh --without-icu
./b2 --disable-icu

The resulting lib still requires icu, when I check with ldd:

ldd libboost_regex.so.1.56.0
    libicui18n.so.52 =>      /opt/csw/lib/64/libicui18n.so.52
    libicudata.so.52 =>      /opt/csw/lib/64/libicudata.so.52
    libicuuc.so.52 =>        /opt/csw/lib/64/libicuuc.so.52
    libstdc++.so.6 =>        /opt/csw/lib/64/libstdc++.so.6
    libm.so.2 =>     /lib/64/libm.so.2
    librt.so.1 =>    /lib/64/librt.so.1
    libgcc_s.so.1 =>         /opt/csw/lib/64/libgcc_s.so.1
    libpthread.so.1 =>       /lib/64/libpthread.so.1
    libc.so.1 =>     /lib/64/libc.so.1
    libCrun.so.1 =>  /usr/lib/64/libCrun.so.1
    libCstd.so.1 =>  /usr/lib/64/libCstd.so.1
    libaio.so.1 =>   /lib/64/libaio.so.1
    libmd.so.1 =>    /lib/64/libmd.so.1
    /platform/SUNW,SPARC-Enterprise-T5220/lib/sparcv9/libc_psr.so.1
    /platform/SUNW,SPARC-Enterprise-T5220/lib/sparcv9/libmd_psr.so.1

Question : how can I prevent boost linking the icu libs?

My response is late, but this may help

I encountered the same issue and found that deleting the file in bin.v2/libs was also required and deleting the bin.v2/project-cache.jam file.

Because I had multiple toolsets from previous compiles the options to disable icu were not resetting the icu flags for my current toolset .

I had a similar issue with ICU in Linux. I fixed this problem by cleaning up the source folder before rebuilding Boost. Below are my build commands

./bootstrap.sh --prefix=$BOOST_PREFIX --without-icu
./b2 clean
./b2 headers
./b2 -j7 --disable-icu --ignore-site-config variant=release threading=multi install

And the output of ldd command

% ldd boost/lib/libboost_regex.so.1.61.0
    linux-vdso.so.1 =>  (0x00007fffc28be000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6a31a48000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6a31741000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6a314be000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6a312a8000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6a3108c000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6a30d00000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f6a31f7f000)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM