libraries: satart / stop daemons

Steve Langasek vorlon at netexpress.net
Thu Jan 20 05:45:06 GMT 2000


On Thu, 20 Jan 2000, Luke Kenneth Casson Leighton wrote:

> hi,

> i start / stop samba_tng daemons like this:

> killall smbd nmbd lsarpcd samrd netlogond etc

> bin/smbd
> bin/nmbd
> bin/lsarpcd
> bin/samrd

> gets boring after a while, but i don't notice the library load problem
> because Makefile.in has defined that libsmb.so is GOING to be in
> bin/libsmb..so.

> if i do cd bin
> ,/smbd
> /nmbd
> /lsarpcd

> nothing loads!

> any suggestions anyone?

Instead of linking all of the daemons with the line

 @$(CC) $(FLAGS) -o $@ $(SAMBA_LIBS) $(SMBD_OBJ) \
        $(LDFLAGS) $(LIBS) 

, you should remove $(SAMBA_LIBS) and instead stick in linker options, like
this:

	 @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) \
	 -L./bin -lmsrpc -lsamba -lsmb -lnmb $(LDFLAGS) $(LIBS)

Or something like that.

This could probably be turned into a variable somewhere near the top of the
Makefile, of course.

Note that once you've made this change, you'll have to specify the library
path, e.g.,
   $ export LD_LIBRARY_PATH=.
   $ ./smbd

Using libtool will address this problem as well, iirc.

-Steve Langasek
postmodern programmer



More information about the samba-technical mailing list