linker error boost with 1.69 and 1.70

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

linker error boost with 1.69 and 1.70

Boost - Users mailing list

So I have been using boost for awhile.  I compile boost the same way for all the versions and have been since 1.48.  My platforms are CentOS 6 & 7 and Windows 10 vs2017.  My code has compiled on all 3 platforms with Boost without a problem.    My current version is 1.66 and I wanted to upgrade to 1.69.  Under Windows, I build 1.69 with ZLIB & BZIP and my applications have no problems.  I use zlib & bzip in the IOstreams library to read & write compressed files. So I built 1.69 under Linux the same way as I always have but I am now getting a linker error that I don't understand and I am stuck.

The error starts with:
API_utiltyFunctions.cpp:(.text+0x154): undefined reference to `boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)'
API_utiltyFunctions.cpp:(.text+0x15b): undefined reference to `boost::iostreams::zlib::sync_flush'
API_utiltyFunctions.cpp:(.text+0x165): undefined reference to `boost::iostreams::detail::zlib_base::xinflate(int)'
API_utiltyFunctions.cpp:(.text+0x177): undefined reference to `boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)'
API_utiltyFunctions.cpp:(.text+0x17e): undefined reference to `boost::iostreams::zlib_error::check(int)'
API_utiltyFunctions.cpp:(.text+0x185): undefined reference to `boost::iostreams::zlib::stream_end'

The boost portion of my linker line is:
        -L[ path to boost 1.69] \
        -lboost_random-1_69 \
        -lboost_program_options-1_69 \
        -lboost_date_time-1_69 \
        -lboost_chrono-1_69 \
        -lboost_regex-1_69 \
        -lboost_thread-1_69 \
        -lboost_exception-1_69 \
        -lboost_filesystem-1_69 \
        -lboost_system-1_69 \
        -lboost_iostreams-1_69 -lrt -lbz2 -lz -lm

Any help would be appreciate.  Weirdly if I revert back to boost 1.66, I don't have a problem.

I also tested this compilation against boost 1.70 and I get the same problem.

I do compile boost statically with shared runtime libraries and threads.

Respectfully,
Danny K 










_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: linker error boost with 1.69 and 1.70

Boost - Users mailing list

I figured out my problem so please disregard my question.  My problem was that zlib and bzip2 support was not being included.  I developed a perl script that builds everything for me for Windows & Linux and somehow when the Linux script builds 1.69 or 1.70, it turns off zlib and bzip2 support.  Not sure the cause but taking the command my perl script executes and running it the shell outside of perl, boost builds with the proper support for zlib/bzip2 in iostreams.  Not sure what the change would be but I have a workaround.

wr,
Danny

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users