Bug 2047 - [patch] Build fails with --disable-shared
Summary: [patch] Build fails with --disable-shared
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.8
Hardware: All All
: P3 major
Target Milestone: none
Assignee: Björn Jacke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-17 09:27 UTC by Andrea Cocito
Modified: 2011-05-05 07:54 UTC (History)
1 user (show)

See Also:


Attachments
Proposed patch (8.75 KB, patch)
2004-11-17 09:33 UTC, Andrea Cocito
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Cocito 2004-11-17 09:27:35 UTC
Verified on OSX-10.3.6 (darwin 7.6.0) and FreeBSD-5.3 but I believe that the problem is platform 
independent:

tar xpzf samba-3.0.8.tar.gz
cd samba-3.0.8/source
./configure --disable-shared
<... snip>
make
<... snip>
Compiling libsmb/clifile.c
libsmb/clifile.c: In function `cli_unix_stat':
libsmb/clifile.c:216: error: `STAT_ST_BLOCKSIZE' undeclared (first use in this function)
libsmb/clifile.c:216: error: (Each undeclared identifier is reported only once
libsmb/clifile.c:216: error: for each function it appears in.)
make: *** [libsmb/clifile.o] Error 1

I see that in configure.in all the definitions for the macro STAT_ST_BLOCKSIZE (and other definitions/
checks possibly needed for various platforms, like BROKEN_GETGRNAM for netbsd etc) are in a case 
statment under the following if:

if test "$enable_shared" = "yes"; then
....
  case "$host_os" in
...
                     *darwin*)   AC_DEFINE(DARWINOS,1,[Whether the host os is Darwin/MacOSX])
                        BLDSHARED="true"
                        LDSHFLAGS="-bundle -flat_namespace -undefined suppress"
                        SHLIBEXT="dylib"
                        AC_DEFINE(STAT_ST_BLOCKSIZE,512)
                        ;;

This obviously fails to set STAT_ST_BLOCKSIZE and other various macros when building --disable-
shared

If it can help I have splitted the things and done a cleaned up configure.in, patch available by email if 
requested (I can't see in the bug report form a place to submit a patch).

Regards,

A.
Comment 1 Andrea Cocito 2004-11-17 09:33:05 UTC
Created attachment 779 [details]
Proposed patch
Comment 2 bossman (mail address dead) 2011-02-27 09:38:57 UTC
aa
Comment 3 Björn Jacke 2011-05-05 07:54:40 UTC
the problem is already fixed since a long time. Thanks for reporting!