The Samba-Bugzilla – Bug 5757
v3-devel fails to compile on FreeBSD 6.1 using --without-libnetapi configure option
Last modified: 2008-12-16 12:18:27 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:
The build fails with:
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.
Created attachment 3574 [details]
FreeBSD make build log
Created attachment 3575 [details]
gmake build log
Created attachment 3576 [details]
Created attachment 3577 [details]
Build script with configure arguments
Steven, thanks for the summary. Michael
(In reply to comment #5)
> Steven, thanks for the summary. Michael
gmake should be used on FreeBSD, not the stock make.