cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.34k stars 943 forks source link

shared library build fails with Cinder-shipped boost-filesystem library #1968

Open drlight-code opened 6 years ago

drlight-code commented 6 years ago

Related to #1915, building Cinder as shared library fails because the (static) boost-filesystem version that is shipped along Cinder has been built without PIC. Passing -DCINDER_BOOST_USE_SYSTEM=1 resolves the issue for me.

One option would be to rebuild the shipped boost accordingly. However my personal stance on the question of shipping 3rd party libraries alongside a software package or using the system-supplied version is strongly in favor of using system libraries, if there is not a very strong reason to include a specific (or modified) version of that library. For boost-filesystem, I really don't see a reason why Cinder should not rely on a system-wide deployed version.

One reason is that things will get awry when users start to link their application to other libraries which in turn link against the system-wide version of boost-filesystem transitively. That kind of dependency mess and potential symbol/ABI collisions is something I try to avoid at all cost. If Cinder aspires to be included with major Linux distributions I think this is something which needs to be taken care of. Since you propose in #1915 to make the system library the default in the next release, I would even argue to drop shipping a prebuilt version of boost altogether.

Apart from this issue I can report that Cinder builds just fine on current Debian stable (stretch).

andrewfb commented 6 years ago

I think we're leaning toward making this the default now. Just a forward-thinking comment, we're quite close to removing the Boost dependencies other than Filesystem. I wonder if we could get away with requiring only libboost-filesystem-dev

This seems to exist for Ubuntu 14.04+ and Raspbian Jessie.