Created attachment 161865 [details] boost iostreams patch It has been a long time that I'm struggling with this issue: https://forums.freebsd.org/threads/boost-iostreams-from-ports-with-zlib-support.40944/ http://www.boost.org/doc/libs/1_55_0/libs/iostreams/doc/installation.html I've been writing a cross-platform application and I fortunately I cannot add it to Ports Collections due to the dependency on those filters which won't build on FreeBSD in the current port. I made a patch for devel/boost-libs to add optional support for zlib, gzip and bzip2 filters on FreeBSD. It allows user to choose whether they boost compression filters libs should be built or not. Thank you so much.
We have zlib and bzip2 libraries in base, and the boost-libs build seems to find them OK. [snip] clang-linux.compile.c++.without-pch bin.v2/libs/iostreams/build/clang-linux-3.4.1/release/threading-multi/gzip.o clang-linux.compile.c++.without-pch bin.v2/libs/iostreams/build/clang-linux-3.4.1/release/threading-multi/bzip2.o [snip] clang-linux.compile.c++.without-pch bin.v2/libs/iostreams/build/clang-linux-3.4.1/release/threading-multi/zlib.o [snip] The resulting iostreams library links to the appropriate libraries in base: %ldd /usr/local/lib/libboost_iostreams.so /usr/local/lib/libboost_iostreams.so: libz.so.6 => /lib/libz.so.6 (0x80161a000) libbz2.so.4 => /usr/lib/libbz2.so.4 (0x801830000) libc++.so.1 => /usr/lib/libc++.so.1 (0x801a42000) libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d01000) libm.so.5 => /lib/libm.so.5 (0x801f1d000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x802146000) libthr.so.3 => /lib/libthr.so.3 (0x802354000) libc.so.7 => /lib/libc.so.7 (0x800821000) And the appropriate header files seem to be getting installed: %ls -l /usr/local/include/boost/iostreams/filter total 112 -rw-r--r-- 1 root wheel 5310 Oct 1 18:10 aggregate.hpp -rw-r--r-- 1 root wheel 13364 Oct 1 18:10 bzip2.hpp -rw-r--r-- 1 root wheel 2446 Oct 1 18:10 counter.hpp -rw-r--r-- 1 root wheel 3595 Oct 1 18:10 grep.hpp -rw-r--r-- 1 root wheel 24718 Oct 1 18:10 gzip.hpp -rw-r--r-- 1 root wheel 7275 Oct 1 18:10 line.hpp -rw-r--r-- 1 root wheel 12266 Oct 1 18:10 newline.hpp -rw-r--r-- 1 root wheel 4134 Oct 1 18:10 regex.hpp -rw-r--r-- 1 root wheel 3254 Oct 1 18:10 stdio.hpp -rw-r--r-- 1 root wheel 10786 Oct 1 18:10 symmetric.hpp -rw-r--r-- 1 root wheel 10707 Oct 1 18:10 test.hpp -rw-r--r-- 1 root wheel 14782 Oct 1 18:10 zlib.hpp I think the only reason that libboost_zlib.so would ever be needed is if we didn't already libz.so anywhere on the system, in which case the boost build would build it from source, install it as libboost_zlib.so (so that it would not collide if libz was installed sometime in the future), and it would link to that instead of the system libz.so. Can you show me a simple way of reproducing the problem that you are having?
After looking more closely at the forum posting, I think thinks should work if you just remove zlib from the COMPONENTS list.
Sorry for my tardy response. Thanks for the explanation, I will test it and report back as soon as possible.
Thank you so much. It works perfectly fine. Sorry it was my lack of knowledge. I thought if boost supports zlib/bzip2 it should create the library files libboost_zlib.so, ..... since I developed the original code on Windows and there were no bzip2/zlib binaries there by default, so I always built it from source and never noticed that. That was a very n00b mistake. In my estimation, this resolves this thread as invalid. Thank you for your time.