← Back to team overview

unity-dev team mailing list archive

Re: Unity build system

 

On 18/06/12 09:20, Michal Hruby wrote:
> Hi everyone,
> 
> I'm sure that many of you have noticed issues with unity's build system,
> the one that is bugging me most is the way compilation of unityshell.so
> doesn't pick proper libraries - you've surely noticed that having
> unity-core installed in your $(prefix) will cause unityshell.so to link
> with it, instead of the one that got compiled moments ago inside unity's
> build dir - therefore we grew accustomed to (completely manual) wiping
> our $(prefix)/lib/libunity-core* prior to compilation. Other than that
> there's just utter brokenness with the way unityshell is linked - a
> couple of days ago I added a new build dep to UnityCore and even though
> I made sure that the library is used only internally in UnityCore and
> none of the public interfaces expose it, unityshell.so still wanted to
> link with this library (even though I did no changes to its CMakeLists),
> and this failed cause it didn't use the linker flags that were needed to
> find the lib (but why did it try to link with it in the first place?).
> 
> Could someone with sufficient knowledge of cmake take a look at this?
> Since unityshell uses compiz_plugin macro, I'm going to assume the issue
> is in there...
> 
> Thanks,
> Michal
> 
> PS. Sorry for the bitter tone, but I already wasted a couple of hours
> trying to nail this down.
> 

Me and mhr3 did some digging this morning, seems to us that cmake is
just poor at deciding what libraries to link and what to not link.
specifically when adding libraries generated inside your build tree.

I think barring some sort of genius intervention we'll just make
unity-core staticly compile in to unity and remove the complication.


-- 
Gordon Allott
Canonical Ltd.
27 Floor, Millbank Tower
London SW1P 4QP
www.canonical.com


References