e: Problem to use VFS modules

REYNAUD Jean-Samuel reynaud at nantes.inra.fr
Mon May 7 09:31:18 GMT 2001


Le 07 May 2001 08:17:42 +1000, Tim Potter a écrit :
> REYNAUD Jean-Samuel writes:
> 
> > On samba 2.2.0 (latest stable),Linux 2.4.4 (debian).
> > Problem to use VFS modules:
> 
> > I have recompiled smbd with the "-rdynamic" option (at link time).
> > Now it's working.
> > 
> > Is the problem come from my ./configure parameters ?
> 
> No.  The real solution is for the Makefile to use libtool or
> something like that to compile the vfs modules as it knows about
> the various options such as -rdynamic that need to be passed to
> the C compiler to build shared objects.
> 
> 
> Tim.
> 
> > 
> > -- 
> > 
> > REYNAUD Jean-Samuel
> > 
> > 
> 
> 

Ok. But the ld documentation say :
"
       `--export-dynamic'
          [..]
          If you use `dlopen' to load  a  dynamic  object  which
          needs to refer back to the symbols defined by the pro­      
          gram, rather than some other dynamic object, then  you
          will probably need to use this option when linking the
          program itself.
"
So (I'm not sure but) I thing that smbd must be linked with the
-rdynamic (for gcc or --export-dynamic for ld).
In fact, the Makefile.in may be modified as :
diff -u Makefile.in Makefile.in.dynamic 

--- Makefile.in	Mon Apr 16 03:26:21 2001
+++ Makefile.in.dynamic	Mon May  7 11:28:52 2001
@@ -437,9 +437,9 @@
 	  dir=bin $(MAKEDIR); fi
 	@: >> $@ || : > $@ # what a fancy emoticon!
 
-bin/smbd: $(SMBD_OBJ) bin/.dummy
+bin/smbd: $(SMBD_OBJ) bin/.dummy # with dynamic
 	@echo Linking $@
-	@$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
+	@$(CC) $(FLAGS) -rdynamic -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
 
 bin/nmbd: $(NMBD_OBJ) bin/.dummy
 	@echo Linking $@



-- 
REYNAUD Jean-Samuel





More information about the samba-technical mailing list