Bundling?!

Petr Machata pmachata at redhat.com
Sun Feb 19 21:26:20 UTC 2012


Alec Leamas <leamas.alec at gmail.com> writes:

> I've tried to package Adobe Source Libraries, (BZ:790628). Once again,
> I'm running into bundling issues.. The situation is basically that ASL
> build system expects a boost source tree to be available. This is not
> just to include and link, it's for the complete build process. I've
> dealt with it by having having the source tree available during build,
> and thus in the source. As a  last step; I've relinked the resulting
> library against system boost libraries.

Please don't do this.

The main reason being that header code from bundled boost is in general
not binary compatible with the native code from system boost.  It might
maybe happen to work, but is likely to fail in obscure and hard to debug
ways if the version of bundled boost differs from system boost.

Secondarily, much of boost functionality is in the headers.  Relinking
against system boost libraries after you compiled against bundled
version will only take from the system that part of boost functionality
that's not inlined from the headers.

The former point is really the killer here.  Using headers that don't
exactly match DSOs, with the project as volatile as boost, is not
recommended.

> Although I presently don't, I could easily use system include files as
> well during build. Basically, this means that there are no
> dependencies between the built lib and and the private boost copy.
>
> The alternative is to  patch the boost-based build system in
> ASL. However, this means diverging quite a lot from upstream build
> system, and is less attractive from that point of view.

You could perhaps just copy the system headers in your build tree, if
it's unreasonably complicated to tweak the build system.  Would that
work?

Thank you,
PM


More information about the devel mailing list