[PATCH 00/12] Fixes allowing build with --disable-shared option

Andrzej Hajda andrzej.hajda at wp.pl
Wed Oct 10 04:01:34 MDT 2012

On 09.10.2012 23:47, Andrew Bartlett wrote:
> On Wed, 2012-10-10 at 08:10 +1100, Andrew Bartlett wrote:
>> On Tue, 2012-10-09 at 22:59 +0200, Andrzej Hajda wrote:
>>> This set of patches fixes issues preventing build samba with
>>> --disable-shared option, at least on Ubuntu 12.04.
>>> Patches contains:
>>> - dependency fixes,
>>> - remove/rename duplicated functions,
>>> - wscript for samba3 fix.
>>> Patches can be applied separately.
>>> Sorry for re-posting - newsgroup membership issue.
>> While most of these fixes look quite reasonable, I'm interested what
>> brought this up?  Particularly on Ubuntu 12.04, how does
>> --disable-shared help?
> I'm particularly curious about this because our use of rpath means we
> can install safely and easily in a prefix without interfering with a
> system lib, gaining many of the advantages of a static build, without
> the binary size!

I am working on utility which uses samba libraries (winexe), it is a 
single executable without configuration files.
The ultimate goal is to separate winexe from samba (now it is a dirty 
patch on top of samba sources).
Other goal is to make an option to compile it statically, or at least to 
significantly decrease number of shared libraries it uses.

As samba do not provides static libs I have started to experimenting 
different ways to achieve this goal.

This patcheset is a side effect of such experiments.

Btw. I know the option "--nonshared-binary" (as I remember in my it 
requires only patch 01 from this patchset).

>> I'll comment on these patches individually.
> In summary,
> Any changes you make here must, in developer waf and developer autoconf
> build:
>   - not introduce any more warnings (implicit declaration of function in
> particular) into either the developer waf and developer autoconf build.
>   - must pass a full make test in both of these
> It should also in the waf build disable functionality that clearly
> requires shared objects, including 'make test', and I'm not really a fan
> of creating deliberately un-testable build combinations.
> Finally, I'm not sure if we even want this result - to really, really
> operate without shared libraries we would have to operate without
> python, and this is something the top level (waf) build requires pretty
> strongly these days.
> That is, I would be very hesitant to restore --disable-shared as a
> supported mode of operation if it only serves to restrict our
> development options (such as using python more) or makes it even harder
> for us to test that Samba always works in all supported combinations.

I was not aware that "--disable-shared" is not supported, presence of it 
in waf suggests otherwise :)
But as I wrote earlier I really do not need it.

> Thanks,
> Andrew Bartlett

More information about the samba-technical mailing list