More on the quest to get samba to compile with shared libraries under HP-UX.
This time it's the DYNEXP variable which is set to "-Wl,-E" Those switches are
for cc and make cc instruct ld to add the "-E" switch to the linker commandline.
That switch in turn exports symbols from shared libraries.
Here is where the plot thickens. The only place where DYNEXP is actually used
is on cc commands that are linking binaries like smbd, nmbd, net and so forth.
Apparently that doesnt matter, but I dont see why exporting symbols from
executables is necessary.
All the shared libs included in the package are linked with $SHLD and a very
similar commandline and wotk fine. Only exception is libsmbclient.sl
which adds DYNEXP to the commandline of ld.
Again ld doesnt like the -Wl prefix and fails linking.
--- samba-3_0.orig/source/Makefile.in 2004-09-08 00:38:21.000000000 +0000
+++ samba-3_0/source/Makefile.in 2004-09-08 14:45:31.000000000 +0000
@@ -989,8 +989,8 @@
@echo Linking libsmbclient shared library $@
- @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LDFLAGS) $(DYNEXP)
- $(KRB5LIBS) $(LDAP_LIBS) \
+ @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LIBS) \
+ $(KRB5LIBS) $(LDAP_LIBS) -lc \
Forgot to mention that this bugreport is against the 3.0.7 code in SVN (Rev. 2248)
There's a larger issue of why we are using $(CC) to link instead of $(LD). I
don't think this bug can be fixed without figuring this out. As you mention,
under HPUX $(DYNEXP) is used when calling both $(CC) and $(LD).
Prehaps it's wise to begin with investigating if $(DYNEXP) is even necessary
when linking the executables. If it turns out to be not useful we can continue
to use $(CC) without $(DYNEXP) to link executables and switch Shared library
creation over to use $(LD) with $(DYNEXP)
I'm going to test this idea on the platforms I have access to.
I'm pretty sure this is fixed now. Please re-open if there are still any problems.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.