Bug 1474 - Compile fails with ./configure --with-expsam=xml,mysql and static libs
Summary: Compile fails with ./configure --with-expsam=xml,mysql and static libs
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.6
Hardware: Sparc Solaris
: P3 normal
Target Milestone: none
Assignee: Jelmer Vernooij
QA Contact: Samba QA Contact
: 1641 (view as bug list)
Depends on:
Reported: 2004-06-23 03:42 UTC by Maximilian Kolmhuber
Modified: 2008-10-27 19:01 UTC (History)
0 users

See Also:

Suggested patch (1.60 KB, patch)
2004-06-23 03:46 UTC, Maximilian Kolmhuber
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Kolmhuber 2004-06-23 03:42:51 UTC
./configure --with-expsam=xml,mysql failes on my Solaris (8) box when linking
against *static* libraries (rpcclient link suffers from unresolved symbols).

Suggested patch for source/Makefile.in follows.
Comment 1 Maximilian Kolmhuber 2004-06-23 03:46:01 UTC
Created attachment 547 [details]
Suggested patch
Comment 2 Gerald (Jerry) Carter (dead mail address) 2004-08-17 06:51:33 UTC
jelmer, please look at this patch and apply if you think it is ok.
we need to close out some of the long standing issues.  Thanks.
Comment 3 Jelmer Vernooij 2004-08-17 09:57:38 UTC
Patch applied. Thanks for your feedback! (and thanks to Jerry for noticing me of this bugzilla entry) 
Comment 4 Guenther Deschner 2004-08-24 06:06:02 UTC
Jelmer, I had to revert the fix because too many dependencies are created
(noticed while rpm-packaging). 

This way rpcclient (and thus samba3-client.rpm) always requires too many libs
(mysql, postgres, libxml) as soon as once decides to build the pdb-modules as well.
Comment 5 Maximilian Kolmhuber 2004-08-25 03:35:16 UTC

the Makefile.in fix is OK, but @XML_LIBS@, @MYSQL_LIBS@ and @PGSQL_LIBS@ must
not be defined unless you intend to link against these libraries.

It is not possible to handle that in Makefile.in, it requires some additional
configuration work in configure (don't define @*_LIB@ if it is not required).

Linking statically against something means that all symbols used must be
resolvable - without exceptions. If you live in a pure shared library
environment, unresolved symbols don't necessarily become visible.

There is a couple of places in Samba (see bug #1641, for example) where this
under certain (rather rare) circumstances becomes a problem.

My personal experience is: If static linking works, dynamic linking will also
work. If dynamic linking works, static linking will not necessarily work.

I understand that there is a whole lot of different configurations and OS
flavors and that satisfying the respective requirements results in a whole lot
of work and extensive testing. I really do appreciate the fact that there are
people out there who voluntarily do this without direct economic interests!

Comment 6 Jelmer Vernooij 2004-10-05 15:32:32 UTC
*** Bug 1641 has been marked as a duplicate of this bug. ***
Comment 7 Jelmer Vernooij 2004-12-07 14:29:33 UTC
Exactly what errors do you get when linking rpcclient?
Comment 8 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:51:09 UTC
no feedback in over a month.
Comment 9 Jelmer Vernooij 2008-10-27 18:57:44 UTC
expsam is no longer part of the samba code base
Comment 10 Jelmer Vernooij 2008-10-27 19:01:24 UTC
Comment 11 Jelmer Vernooij 2008-10-27 19:01:44 UTC
expsam is no longer part of the samba code base