Re: Making a private lib for linking



On Mon, 2003-07-28 at 21:01, James Henstridge wrote:
> >I think it is a bug in Medusa's configure.in.  
> >
> >Pango is a bad example, it never uses 'LDFLAGS = -static', to build
> >Nautilus and Medusa jhbuild pulled a lot of modules, but only 
> >
> >./ORBit2/test/everything/Makefile.am
> >./medusa/medusa-idled/Makefile.am
> >
> >contain this command.
> >
> Setting LDFLAGS like that is evil.  Maybe the reason you are having 
> problems is because you are doing that?  If you tell automake to build a 
> "noinst" library, it will be a static lib suitable for linking against 
> another shared library or application.  You shouldn't need any weird flags.

Well I think that settles it, Medusa was compiling more by accident than
by design. ;->

> If it is a library you want to install and have used by other 
> applications, why do you need it to be static?

We don't install it.  medusa-idled is a separate app that attaches to
the screen, (and thinks it can tell when your not around).  libmedusa is
linked to the medusa-idle-client static lib when it is built.  The
indexer starts medusa-idled, calls master-db (libmedusa) to make the DB,
and master-db calls the three client methods to bind to the idled
sockets.  When the master-db gets the word from idled that the machine
isn't being used, it will index at full speed.

I really think the problem is solved by following ORBit2's example.

> >>The AM_DISABLE_STATIC macro does exactly the same thing as 
> >>AC_DISABLE_STATIC (in fact it just calls the AC_ version).  These macros 
> >>just make --disable-static the default (rather than --enable-static).  
> >>So this is not very likely to be the problem.
> >>    
> >>
> >Is there a preference for AC_, the newer, versus, AM_ the older?
> >
> The original automake-1.4 would only work if it saw "AM_PATH_LIBTOOL" in 
> your configure.in.  However, any of the automake-1.4-pX series will 
> accept either form, and so will automake >= 1.5.
> 
> The libtool docs say that the AM_* names are deprecated, so you may as 
> well use the new names.

I'm trying to do the right thing so I'll go with AC. :-)

> >>One other thing to try is building from a clean source tree -- 
> >>libtool-1.5 handles .lo files in a different way to 1.4.x, so if you 
> >>have any .lo files left over from a previous build, they could be 
> >>causing problems.
> >>    
> >>
> >
> >I did.  New checkout, And I tried it as a new user too.  That clued me
> >in that this problem was not related to jhbuild.  Unless someone can
> >give good reason, I don't think I should restore AM_DISABLE_STATIC to
> >configure.in.  The idle daemon in an anachronism from Medusa's days as a
> >system app anyway.  It'll be reworked/phased out in time.
> >  
> >
> It would be helpful if you could explain (a) what this library needs to 
> do, (b) why it needs to be static, and (c) whether it needs to be 
> compiled as PIC (position independent code; suitable for linking in 
> shared libraries).

I want to remove idled, and thus remove the need for the static lib. 
The screen saver code it uses is very dodg,y and very architecture
dependent.  Firstly the indexer should be doing any idle detection, and
secondly, the indexer should be incremental so there is little need to
worry about being intrusive.  I think the static lib was intended for
applications other than Medusa that would want to extend the DB and
control when it indexes.

Thanks for your help.  Two manuals and a bound book really couldn't show
me the correct way of getting this to build.

-- 
__C U R T I S  C.  H O V E Y____________________
sinzui cox net
Guilty of stealing everything I am.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]