Bug 5757 - v3-devel fails to compile on FreeBSD 6.1 using --without-libnetapi configure option
Summary: v3-devel fails to compile on FreeBSD 6.1 using --without-libnetapi configure ...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Build environment (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: P3 normal
Target Milestone: ---
Assignee: Michael Adam
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-12 19:49 UTC by Steven Danneman
Modified: 2019-06-19 04:23 UTC (History)
2 users (show)

See Also:


Attachments
FreeBSD make build log (70.31 KB, text/x-log)
2008-09-12 19:51 UTC, Steven Danneman
no flags Details
gmake build log (73.96 KB, text/plain)
2008-09-12 19:51 UTC, Steven Danneman
no flags Details
Makefile (97.44 KB, text/plain)
2008-09-12 19:51 UTC, Steven Danneman
no flags Details
Build script with configure arguments (789 bytes, text/plain)
2008-09-12 19:52 UTC, Steven Danneman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Danneman 2008-09-12 19:49:41 UTC
As Michael and I discussed today at great length on IRC (http://samba.sernet.de/irclog/2008/09/20080912-Fri.log) there is a problem in the build ordering of libnetapi on FreeBSD.

When building v3-devel with the following relevant library options:

  --enable-static=no 
  --enable-shared=yes 
  --enable-shared-libs 
  --without-libtalloc 
  --without-libnetapi 
  --without-libaddns 
  --without-libsmbclient 

The build fails with:

Compiling iniparser_build/iniparser.c
Compiling iniparser_build/dictionary.c
Compiling iniparser_build/strlib.c
Linking bin/net
gcc: lib/netapi/netapi.o: No such file or directory
gcc: lib/netapi/cm.o: No such file or directory
gcc: librpc/gen_ndr/ndr_libnetapi.o: No such file or directory
gcc: lib/netapi/libnetapi.o: No such file or directory
gcc: lib/netapi/joindomain.o: No such file or directory
gcc: lib/netapi/serverinfo.o: No such file or directory
gcc: lib/netapi/getdc.o: No such file or directory
gcc: lib/netapi/user.o: No such file or directory
gcc: lib/netapi/group.o: No such file or directory
gcc: lib/netapi/localgroup.o: No such file or directory
gcc: lib/netapi/samr.o: No such file or directory
gcc: lib/netapi/sid.o: No such file or directory
gcc: lib/netapi/share.o: No such file or directory
*** Error code 1

This only happens on FreeBSD (6.1) and works fine on Ubuntu 7.10.  

My current theory, is that the problem is a difference in the way FreeBSD make and GNU make handle the :: rule operator.  All library files should be compiled at the beginning of the make process because the rule:

all:: SHOWFLAGS libs $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
        $(MODULES) $(NSS_MODULES) $(PAM_MODULES)  bin/winbind_krb5_locator.so

However, the dependency for libs is specified on several different lines, one for each library.  Under FreeBSD make, the invocation of the libs dependency in all:: seems to only build the first libs:: rule, libtalloc.  Whereas, using gmake, all libs are built at the beginning of the compilation.

I'll attach two separate build logs, the first using FreeBSD make, the second using gmake on the same machine.  These show the difference in compilation order with the same Makefile.
Comment 1 Steven Danneman 2008-09-12 19:51:03 UTC
Created attachment 3574 [details]
FreeBSD make build log
Comment 2 Steven Danneman 2008-09-12 19:51:20 UTC
Created attachment 3575 [details]
gmake build log
Comment 3 Steven Danneman 2008-09-12 19:51:50 UTC
Created attachment 3576 [details]
Makefile
Comment 4 Steven Danneman 2008-09-12 19:52:29 UTC
Created attachment 3577 [details]
Build script with configure arguments
Comment 5 Michael Adam 2008-09-14 17:07:22 UTC
Steven, thanks for the summary. Michael
Comment 6 Timur Bakeyev 2008-12-16 12:18:27 UTC
(In reply to comment #5)
> Steven, thanks for the summary. Michael

gmake should be used on FreeBSD, not the stock make.

Comment 7 Andrew Bartlett 2019-06-19 04:23:42 UTC
The autoconf build system was removed, along with this option, in Samba 4.1