Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

boost_zlib is missing from Windows build? #65

Closed
seanyen opened this issue Oct 26, 2019 · 10 comments
Closed

boost_zlib is missing from Windows build? #65

seanyen opened this issue Oct 26, 2019 · 10 comments

Comments

@seanyen
Copy link

seanyen commented Oct 26, 2019

I tried to bring up another project on conda-forge but I came into a linkage problem as below:

[ 16%] Linking CXX shared library gazebo_common.dll
LINK: command "C:\PROGRA~2\MICROS~1\2017\ENTERP~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\gazebo_common.dir\objects1.rsp /out:gazebo_common.dll /implib:gazebo_common.lib /pdb:%SRC_DIR%\build\gazebo\common\gazebo_common.pdb /dll /version:9.11 /machine:x64 /INCREMENTAL:NO -LIBPATH:%SRC_DIR%\build\test -LIBPATH:%PREFIX%\Library\lib %PREFIX%\Library\lib\dl.lib %PREFIX%\Library\lib\boost_thread.lib %PREFIX%\Library\lib\boost_system.lib %PREFIX%\Library\lib\boost_filesystem.lib %PREFIX%\Library\lib\boost_program_options.lib %PREFIX%\Library\lib\boost_regex.lib %PREFIX%\Library\lib\boost_iostreams.lib %PREFIX%\Library\lib\boost_date_time.lib %PREFIX%\Library\lib\boost_chrono.lib %PREFIX%\Library\lib\boost_atomic.lib %PREFIX%\Library\lib\FreeImage.lib tinyxml_internal.lib %PREFIX%\Library\lib\libcurl.lib %PREFIX%\Library\lib\sdformat.lib %PREFIX%\Library\lib\ignition-math4.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:gazebo_common.dll.manifest" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'boost_zlib.lib'

And even if I tried to use add_definitions(-DBOOST_ALL_NO_LIB=1) to hack the CMakeLists.txt, which still gave me the similar result.

[ 16%] Linking CXX shared library gazebo_common.dll
LINK: command "C:\PROGRA~2\MICROS~1\2017\ENTERP~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\gazebo_common.dir\objects1.rsp /out:gazebo_common.dll /implib:gazebo_common.lib /pdb:%SRC_DIR%\build\gazebo\common\gazebo_common.pdb /dll /version:9.11 /machine:x64 /INCREMENTAL:NO -LIBPATH:%SRC_DIR%\build\test -LIBPATH:%PREFIX%\Library\lib %PREFIX%\Library\lib\dl.lib %PREFIX%\Library\lib\boost_thread.lib %PREFIX%\Library\lib\boost_system.lib %PREFIX%\Library\lib\boost_filesystem.lib %PREFIX%\Library\lib\boost_program_options.lib %PREFIX%\Library\lib\boost_regex.lib %PREFIX%\Library\lib\boost_iostreams.lib %PREFIX%\Library\lib\boost_date_time.lib %PREFIX%\Library\lib\boost_chrono.lib %PREFIX%\Library\lib\boost_atomic.lib %PREFIX%\Library\lib\FreeImage.lib tinyxml_internal.lib %PREFIX%\Library\lib\libcurl.lib %PREFIX%\Library\lib\sdformat.lib %PREFIX%\Library\lib\ignition-math4.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:gazebo_common.dll.manifest" failed (exit code 1120) with the following output:
   Creating library gazebo_common.lib and object gazebo_common.exp
ModelDatabase.cc.obj : error LNK2019: unresolved external symbol "int const boost::iostreams::zlib::default_compression" (?default_compression@zlib@iostreams@boost@@3HB) referenced in function "private: static struct boost::iostreams::gzip_params __cdecl boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::make_params(int)" (?make_params@?$basic_gzip_decompressor@V?$allocator@D@std@@@iostreams@boost@@CA?AUgzip_params@23@H@Z)
ModelDatabase.cc.obj : error LNK2019: unresolved external symbol "int const boost::iostreams::zlib::deflated" (?deflated@zlib@iostreams@boost@@3HB) referenced in function "private: static struct boost::iostreams::gzip_params __cdecl boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::make_params(int)" (?make_params@?$basic_gzip_decompressor@V?$allocator@D@std@@@iostreams@boost@@CA?AUgzip_params@23@H@Z)
ModelDatabase.cc.obj : error LNK2019: unresolved external symbol "int const boost::iostreams::zlib::default_strategy" (?default_strategy@zlib@iostreams@boost@@3HB) referenced in function "private: static struct boost::iostreams::gzip_params __cdecl boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::make_params(int)" (?make_params@?$basic_gzip_decompressor@V?$allocator@D@std@@@iostreams@boost@@CA?AUgzip_params@23@H@Z)
ModelDatabase.cc.obj : error LNK2019: unresolved external symbol "int const boost::iostreams::zlib::okay" (?okay@zlib@iostreams@boost@@3HB) referenced in function "public: __cdecl boost::iostreams::gzip_error::gzip_error(int)" (??0gzip_error@iostreams@boost@@QEAA@H@Z)
ModelDatabase.cc.obj : error LNK2019: unresolved external symbol "int const boost::iostreams::zlib::stream_end" (?stream_end@zlib@iostreams@boost@@3HB) referenced in function "public: void __cdecl boost::iostreams::symmetric_filter<class boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >,class std::allocator<char> >::close<struct boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::peekable_source<class boost::iostreams::detail::linked_streambuf<char,struct std::char_traits<char> > > >(struct boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::peekable_source<class boost::iostreams::detail::linked_streambuf<char,struct std::char_traits<char> > > &,int)" (??$close@U?$peekable_source@V?$linked_streambuf@DU?$char_traits@D@std@@@detail@iostreams@boost@@@?$basic_gzip_decompressor@V?$allocator@D@std@@@iostreams@boost@@@?$symmetric_filter@V?$zlib_decompressor_impl@V?$allocator@D@std@@@detail@iostreams@boost@@V?$allocator@D@std@@@iostreams@boost@@QEAAXAEAU?$peekable_source@V?$linked_streambuf@DU?$char_traits@D@std@@@detail@iostreams@boost@@@?$basic_gzip_decompressor@V?$allocator@D@std@@@12@H@Z)
ModelDatabase.cc.obj : error LNK2019: unresolved external symbol "int const boost::iostreams::zlib::sync_flush" (?sync_flush@zlib@iostreams@boost@@3HB) referenced in function "public: void __cdecl boost::iostreams::symmetric_filter<class boost::iostreams::detail::zlib_decompressor_impl<class std::allocator<char> >,class std::allocator<char> >::close<struct boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::peekable_source<class boost::iostreams::detail::linked_streambuf<char,struct std::char_traits<char> > > >(struct boost::iostreams::basic_gzip_decompressor<class std::allocator<char> >::peekable_source<class boost::iostreams::detail::linked_streambuf<char,struct std::char_traits<char> > > &,int)" (??$close@U?$peekable_source@V?$linked_streambuf@DU?$char_traits@D@std@@@detail@iostreams@boost@@@?$basic_gzip_decompressor@V?$allocator@D@std@@@iostreams@boost@@@?$symmetric_filter@V?$zlib_decompressor_impl@V?$allocator@D@std@@@detail@iostreams@boost@@V?$allocator@D@std@@@iostreams@boost@@QEAAXAEAU?$peekable_source@V?$linked_streambuf@DU?$char_traits@D@std@@@detail@iostreams@boost@@@?$basic_gzip_decompressor@V?$allocator@D@std@@@12@H@Z)
@seanyen
Copy link
Author

seanyen commented Oct 26, 2019

@conda-forge/boost-cpp If currently zlib is not enabled with the boost build on Windows, let me know what I can help!

@Tobias-Fischer
Copy link

Is there any update on this? @wolfv and I are running into the same issue.

@Tobias-Fischer
Copy link

See 75848b6#diff-d04c86b6bb20341f5f7c53165501a393 .. not sure why it doesn't work

@xhochy
Copy link
Member

xhochy commented Sep 28, 2020

@Tobias-Fischer Do you have a PR where it is failing? According to the log, boost::iostreams zlib support was built on master.

@wolfv
Copy link
Member

wolfv commented Sep 28, 2020

@xhochy we're still on boost 1.72, but this here is failing:

https://dev.azure.com/roboforge/ros_pipelines/_build/results?buildId=263&view=logs&j=284cef23-b460-5624-3f8e-b0801ab722ca&t=4ddf55a3-d586-5f14-4b0d-1a48c61d3792&l=812

Note we have some new pipelines to build out the ROS packages on Azure.

@xhochy
Copy link
Member

xhochy commented Oct 14, 2020

Was this maybe a boost library that was only available in older boost versions? I don't really see it anymore in the current sources / command line options.

@jaimergp
Copy link
Member

jaimergp commented Jan 26, 2021

I am also seeing this on a new recipe I am submitting for Windows.

I do see some mentions to boost_zlib in boost/iostreams.

@benmwebb
Copy link
Contributor

benmwebb commented Feb 6, 2022

If this helps anybody, I'm pretty sure this is a bug in the Boost autolinking support on Windows (not a conda issue per se). When Boost sees that you want to use boost::iostreams, it adds boost_zlib to the library dependencies, because iostreams was built with zlib support. This sometimes works, in some configurations where boost bundles its own copy of zlib, but conda (sensibly) uses the system zlib, so there is no boost_zlib to link against and you get the failure above.

The workaround I use is to add /DBOOST_ZLIB_BINARY=kernel32 to the cl command line.

@jakirkham
Copy link
Member

In that case should we close? It's not clear there's anything we should be doing with the package build (though please correct me if I've missed something)

@benmwebb
Copy link
Contributor

benmwebb commented Apr 9, 2022

In that case should we close? It's not clear there's anything we should be doing with the package build (though please correct me if I've missed something)

I think so. The package build looks fine to me right now - it does include zlib support (my own recipes depend on this and are currently working). zlib did go missing for a while (see #114) but should have been fixed by #115 (which includes an explicit test for the zlib support).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants