net/samba35 build fails with samba34-libsmbclient installed

Andriy Gapon avg at FreeBSD.org
Wed Aug 10 12:22:00 UTC 2011


net/samba35 build fails with samba34-libsmbclient installed.
This happens because of the following lines in source3/Makefile:
LIBNETAPI=bin/libnetapi.a
LIBNETAPI_LIBS= -lnetapi
...
bin/net: $(BINARY_PREREQS) $(NET_OBJ)  $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
$(LIBNETAPI)
        @echo Linking $@
        $(CC) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
                $(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
                $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
$(LIBNETAPI_LIBS) \
                $(ZLIB_LIBS)

Plus the fact that there is -L/usr/local/lib flag passed to linker.
Because of that the build picks up libnetapi.so installed by samba34-libsmbclient
instead of bin/libnetapi.a compiled by net/samba35 itself.

Couple of potential workarounds:
- substitute LIBNETAPI_LIBS with LIBNETAPI in the linking recipes
- change value of LIBNETAPI_LIBS to be the same as LIBNETAPI

The above can probably be done in Makefile.in or in configure.in, although not sure.

P.S. BTW, so libsmbclient can not be built from samba35 sources?

-- 
Andriy Gapon


More information about the freebsd-ports mailing list