[CM] sndlib compilation problem

rm@fabula.de rm@fabula.de
Mon, 26 Apr 2004 14:11:10 +0200


On Mon, Apr 26, 2004 at 11:36:07AM +0000, alin weiller  wrote:
> guile-config link gives me :
> -lguile -lguile-ltdl -lqthreads -lpthread -lcrypt -lm

So, libpthread is requested by guile-config.

> So, I found where libpthread.so is : /usr/lib
> but this directory is still in LIBS variable of the makefile : LIBS =-L/usr/lib -lm

Hmm, '/usr/lib' should be in ld's search patch anyway. I doubt that this is the problem.
What happens if you move '-lpthread' in front of -lguile  -lguile-ltdl' ?
(Load order -does_ matter for 'ld').

> 
> by the way, I don't know what -lm means.

It instructs the linker to add 'libmath' to the created object.

> 
> But it still does not work.
> 
> when I write "ld -lpthread" in the console I get :
> ld: warning: cannot find entry symbol_start; not setting start address

To be expected. You ask 'ld' to create a plain-ol' binary application. Hence
it tries to link the (elf) startup/finishing  code to the object (usually from
libc.a). The startup code will call _start (that's what 'main(...)' is comiled
to). Since non of the objects you hand to 'ld' provides a 'main(...)' the
linker will complain. For such tests you can either try:

 $ ld -r  -lpthread

or:

 $ ld -shared  -lpthread
 
> 
> Any idea is welcome.

See above 

  HTH Ralf Mattes

> Thank you
> 
> A-LIN
> 
> ------- Message
> original ------- 
> De: Bill
> Schottstaedt
> <bil@ccrma.Stanford.EDU> 
> Date: Mon, 26 Apr
> 2004 03:51:53 -0700 
> Sujet: Re: [CM]
> sndlib compilation
> problem 
> 
>  > ld: cannot find
> -lpthread
> 
> I think it is the
> guile-config program
> that is adding
> -lpthread --
> try:
> 
> guile-config link
> 
> to see if it's the
> culprit -- if it is,
> it's a guile
> problem.
> You might be able to
> fix it by hand --
> find libpthreads.so
> and add its
> directory to the
> LIBS variable (via
> -L).
> 
> Incroyable ! des SMS offerts avec CaraMail Premium - http://www.caramailmax.com
>