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

boost-cpp 1.70.0 cmake config files give the static libs, not shared #61

Closed
microe opened this issue Sep 12, 2019 · 10 comments
Closed

boost-cpp 1.70.0 cmake config files give the static libs, not shared #61

microe opened this issue Sep 12, 2019 · 10 comments

Comments

@microe
Copy link

microe commented Sep 12, 2019

Issue: When building software with cmake that depends on boost-cpp 1.70.0, the cmake configs in $CONDA_PREFIX/lib/cmake give the static version of the boost libraries instead of the shared libraries.

This will likely break the build for various reasons, for example libboost_filesystem.a has hidden symbols in it. As soon as you try to link with a shared object file, the build will error out because hidden objects/symbols cannot be used in shared object builds.

Setting the cmake variable Boost_USE_STATIC_LIBS to "OFF" causes cmake to error out because it can't find libboost_system.so.

If you instead move the cmake config files away, then FindBoost.cmake can conclude and works properly.

For example:

$ mkdir /tmp/hold-cmake-config
$ mv $CONDA_PREFIX/lib/cmake/?oost* /tmp/hold-cmake-config/

Now cmake and FindBoost.cmake can do their thing and the build finishes.

@isuruf
Copy link
Member

isuruf commented Oct 22, 2019

Can you send a PR to rename the cmake file folder to something like $CONDA_PREFIX/lib/cmake-bak/ ?

@jschueller
Copy link
Contributor

Cant we just disable static libs ?

@microe
Copy link
Author

microe commented Oct 22, 2019

Is it OK to just move the boost files? The $PREFIX/lib/cmake directory might have other

@microe microe closed this as completed Oct 22, 2019
@jakirkham
Copy link
Member

Did you mean to close this @microe?

@microe
Copy link
Author

microe commented Oct 22, 2019

No, miss hit in my browser. Sorry.

@microe microe reopened this Oct 22, 2019
@microe microe mentioned this issue Oct 22, 2019
5 tasks
@microe
Copy link
Author

microe commented Oct 22, 2019

Hopefully the submitted PR works out. If it doesn't, I'll try just moving the boost cmake config files instead of the whole directory.

@timsnyder
Copy link

The logic in the 1.70 boost cmake files is defintely busted. I danced around it in my project by doing this

@bretttully
Copy link

@timsnyder Thanks!

@jschueller
Copy link
Contributor

we just removed static libs

@microe
Copy link
Author

microe commented Jul 9, 2020

Yay!

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

6 participants