Bug 180074 - net/samba36: samba-3.6.16 link failure winbind_krb5_locator
Summary: net/samba36: samba-3.6.16 link failure winbind_krb5_locator
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Timur I. Bakeyev
Depends on:
Reported: 2013-06-29 01:40 UTC by dewayne
Modified: 2013-07-01 03:50 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2013-06-29 01:40:00 UTC
From the compilation log; during the link phase, of samba-3.6.16, the linker is is looking for 
the correct location is 

 Compiling ../nsswitch/wins_freebsd.c
Linking ../nsswitch/nss_wins.so
Compiling ../nsswitch/pam_winbind.c
Linking shared library bin/pam_winbind.so
Compiling ../nsswitch/winbind_krb5_locator.c
Linking bin/winbind_krb5_locator.so
cc: ^?ELF^A^A^A: No such file or directory
gmake: *** [bin/winbind_krb5_locator.so] Error 1
*** [do-build] Error code 1
Stop in /usr/ports/net/samba36.
=== === ===
Naively changing source3/Makefile from
EXTRA_ALL_TARGETS =  bin/winbind_krb5_locator.so
EXTRA_ALL_TARGETS =  nsswitch/winbind_krb5_locator.so

But this only creates a problem further down the build process.  Next failure is reproduced by
cd /var/ports/usr/ports/net/samba36/work/samba-3.6.16/source3 && gmake clean && gmake 
Compiling ../nsswitch/pam_winbind.c
Linking shared library bin/pam_winbind.so
gmake: *** No rule to make target `nsswitch/winbind_krb5_locator.so', needed by `all'.  Stop.

The build "stops" occur on both i386 and amd64 machines.



A naive look at the problem suggests to change EXTRA_ALL_TARGETS source3/Makefile to
EXTRA_ALL_TARGETS =  nsswitch/winbind_krb5_locator.so
however this is contrary to successful builds on a samba-4.0.6 machine that has WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT"
in the configure.in file.
How-To-Repeat: cd /usr/ports/net/samba36 && make clean && make 
cd /var/ports/usr/ports/net/samba36/work/samba-3.6.16/source3 && gmake clean && gmake

For reference, make showconfig
===> The following configuration options are available for samba36-3.6.16:
     ACL_SUPPORT=on: ACL support
     ADS=on: Active Directory support
     AIO_SUPPORT=on: Asyncronous IO support
     AVAHI=off: Zeroconf support via Avahi
     CUPS=on: CUPS printing system support
     DNSUPDATE=off: Dynamic DNS update(require ADS)
     EXP_MODULES=off: Experimental modules
     FAM_SUPPORT=off: File Alteration Monitor
     IPV6=off: IPv6 protocol support
     LDAP=on: LDAP support
     MAX_DEBUG=off: Maximum debugging
     PAM_SMBPASS=off: PAM authentication vs passdb backends
     POPT=on: System-wide POPT library
     PTHREADPOOL=on: Pthread pool
     QUOTAS=on: Disk quota support
     SMBTORTURE=off: smbtorture
     SWAT=off: SWAT WebGUI
     SYSLOG=off: Syslog support
     UTMP=off: UTMP accounting support
     WINBIND=on: WinBIND support
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-06-29 06:22:34 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

ports PR.
Comment 2 Edwin Groothuis freebsd_committer 2013-06-29 06:23:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->timur

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 Mark Linimon 2013-06-30 01:31:35 UTC
----- Forwarded message from avv <a.v.volobuev@gmail.com> -----

Date: Sat, 29 Jun 2013 16:41:42 -0700 (PDT)
From: avv <a.v.volobuev@gmail.com>
To: freebsd-bugs@freebsd.org
Subject: Re: misc/180074: samba-3.6.16 link failure winbind_krb5_locator

As far as I understanding, a problem in incorrect generation of the file:

bin/winbind_krb5_locator.so: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ)
    @echo "Linking $@"
        $(LIBREPLACE_LIBS) -Wl,-soname,`basename $@`
Line superfluous: 

View this message in context: http://freebsd.1045724.n5.nabble.com/misc-180074-samba-3-6-16-link-failure-winbind-krb5-locator-tp5824367p5824586.html
Sent from the freebsd-bugs mailing list archive at Nabble.com.
freebsd-bugs@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"

----- End forwarded message -----
Comment 4 Dewayne 2013-06-30 11:31:54 UTC
Thank-you AVV, for the solution.  

I've created this file patch-source3__Makefile.in-winbind-krb5-locator 
to be added to /usr/ports/net/samba36/files/.

--- ./source3/Makefile.in.bak   2013-06-30 12:48:31.000000000 +1000
+++ ./source3/Makefile.in       2013-06-30 12:54:07.000000000 +1000
@@ -1688,6 +1688,9 @@
        @echo Compiling $*.h

+       @echo Compiling $*.h
 PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch

 # this adds support for precompiled headers. To use it, install a snapshot
@@ -2862,7 +2865,7 @@

        @echo "Linking $@"
                $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`

The name is important to ensure that it is applied after the usual Makefile.in patches.
This is a stop-gap for those that are stuck, until Timur has the opportunity to patch correctly.

Please note, this patch enables compilation/linking, functional testing is a few hours away but is not expected to be problematic.

Regards, Dewayne.
Sydney, Australia (GMT +10 hours)
Comment 5 dfilter service freebsd_committer 2013-07-01 03:41:40 UTC
Author: timur
Date: Mon Jul  1 02:41:31 2013
New Revision: 322112
URL: http://svnweb.freebsd.org/changeset/ports/322112

  Fixed typo in the patch that broke winbind_krb5_locator linking. Add external
  dependency on tevent library.
  PR:		180074, 180053


Modified: head/net/samba36/Makefile
--- head/net/samba36/Makefile	Mon Jul  1 02:36:07 2013	(r322111)
+++ head/net/samba36/Makefile	Mon Jul  1 02:41:31 2013	(r322112)
@@ -2,7 +2,7 @@
 MASTER_SITE_SUBDIR=	samba samba/stable samba/pre
@@ -90,6 +90,10 @@ CONFIGURE_ARGS+=	--without-libtdb --enab
 BUILD_DEPENDS+=		talloc>=2.0.1:${PORTSDIR}/devel/talloc
 RUN_DEPENDS+=		talloc>=2.0.1:${PORTSDIR}/devel/talloc
 CONFIGURE_ARGS+=	--without-libtalloc --enable-external-libtalloc
+# tevent
+BUILD_DEPENDS+=		tevent>=0.9.11:${PORTSDIR}/devel/tevent
+RUN_DEPENDS+=		tevent>=0.9.11:${PORTSDIR}/devel/tevent
+CONFIGURE_ARGS+=	--without-libtevent --enable-external-libtevent
 # These options are common for all (sub)ports
 CONFIGURE_ARGS+=	--with-libiconv="${LOCALBASE}" \

Modified: head/net/samba36/files/patch-source3__Makefile.in
--- head/net/samba36/files/patch-source3__Makefile.in	Mon Jul  1 02:36:07 2013	(r322111)
+++ head/net/samba36/files/patch-source3__Makefile.in	Mon Jul  1 02:41:31 2013	(r322112)
@@ -1,5 +1,5 @@
 --- ./source3/Makefile.in.orig	2013-06-19 07:35:24.000000000 +0000
-+++ ./source3/Makefile.in	2013-06-27 02:34:58.169873859 +0000
++++ ./source3/Makefile.in	2013-06-30 04:26:08.399888796 +0000
 @@ -151,7 +151,7 @@
  # These can be overridden by command line switches (see smbd(8))
  # or in smb.conf (see smb.conf(5))
@@ -38,19 +38,19 @@
  PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
  # this adds support for precompiled headers. To use it, install a snapshot
-@@ -2856,9 +2860,10 @@
+@@ -2856,9 +2860,9 @@
  	@echo "Linking $@"
  		$(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
-@@ -3215,7 +3220,8 @@
+@@ -3215,7 +3219,8 @@
  	@echo "Linking shared library $@"
svn-ports-all@freebsd.org mailing list
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Timur I. Bakeyev freebsd_committer 2013-07-01 03:42:41 UTC
State Changed
From-To: open->closed

Committed. Thanks!