Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 May 2008 11:42:14 +0100
From:      Doug Rabson <dfr@rabson.org>
To:        Michael Proto <mike@jellydonut.org>
Cc:        freebsd-stable@freebsd.org, Greg Byshenk <freebsd@byshenk.net>
Subject:   Re: samba build failure on 6-STABLE
Message-ID:  <4FA0DF7D-EC80-4B2F-B7E5-86442BA23DA3@rabson.org>
In-Reply-To: <4819D621.9090901@jellydonut.org>
References:  <20080501132724.GD840@core.byshenk.net> <4819D621.9090901@jellydonut.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail-93--424099245
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit


On 1 May 2008, at 15:39, Michael Proto wrote:

>
> Greg Byshenk wrote:
>> I'm posting this to freebsd-stable even though it is a problem with  
>> a port,
>> because the port itself has not changed, but a rebuild fails (on a  
>> system
>> and with a configuration that worked before my most recent system  
>> updates).
>>
>> Basically my problem is that the current Samba3 (samba-3.0.28,1)  
>> won't build
>> on a recent 6-STABLE system (I noticed it with sources csup'd 24  
>> April, and
>> it continues with sources csup'd today, 1 May). The strange thing  
>> is that
>> this is a version of samba that has previously built successfully,  
>> on the
>> machine and with the configuration that is now failing.  (I was  
>> attempting
>> to rebuild because I saw some strange library errors.)  This at least
>> suggests to me that the problem is _not_ due to something changing  
>> with Samba,
>> but to some other change that is being reflected in the Samba build.
>>
>>
>> The system in question is built from sources csup'd today (1 May  
>> 2008), with
>> all installed ports current as of today.  The same Samba did build  
>> successfully
>> with a source and ports tree csup'd on 7 March 2008.
>>
>> As a test to see if there is some problem with the ports  
>> dependencies, I've
>> tried a 'portupgrade -fR samba'; all of the dependencies built  
>> fine, but then
>> I got the same error when attempting to build Samba itself. It is not
>> definitive, but this suggests to me that this is not a ports  
>> problem (per se),
>> but a kernel/world problem.
>>
>> This latter is highlighted by the fact that Samba builds without  
>> error on a
>> system with sources csup'd on 17 April.  That is, if I take the  
>> exact same
>> system on which the build fails, revert my world/kernel to a build  
>> from
>> 17 April (leaving everything else exactly the same), then the error
>> disappears and Samba builds successfully.
>>
>>
>> The actual error is below. Any ideas are welcome. I have a machine  
>> that I can
>> play with if someone would like me to try anything.
>>
>> -greg
>>
>>
>> Compiling smbd/oplock_linux.c
>> smbd/oplock_linux.c: In function `signal_handler':
>> smbd/oplock_linux.c:73: error: structure has no member named `si_fd'
>> The following command failed:
>> cc -I. -I/usr/ports/net/samba3/work/samba-3.0.28/source  -O2 -fno- 
>> strict-aliasing -pipe -D_SAMBA_BUILD_=3 -I/usr/local/include  -I/ 
>> usr/ports/net/samba3/work/samba-3.0.28/source/iniparser/src - 
>> Iinclude -I./include  -I. -I. -I./lib/replace -I./lib/talloc -I./ 
>> tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H  -I/usr/local/ 
>> include -DLDAP_DEPRECATED    -I/usr/ports/net/samba3/work/ 
>> samba-3.0.28/source/lib -D_SAMBA_BUILD_=3 -fPIC -DPIC -c smbd/ 
>> oplock_linux.c -o smbd/oplock_linux.o
>> *** Error code 1
>>
>> Stop in /usr/ports/net/samba3/work/samba-3.0.28/source.
>> *** Error code 1
>>
>> Stop in /usr/ports/net/samba3.
>> *** Error code 1
>>
>> Stop in /usr/ports/net/samba3.
>>
>
> I can confirm this on a 6-STABLE system last SUPed (kernel and world
> rebuilt) to 20080428 11:23 EDT. samba-3.0.28,1 built fine on this box
> when it was 6.3-RELEASE, and now fails in exactly the same place when
> trying to rebuild on 6-STABLE.

The attached patch should fix the problem



--Apple-Mail-93--424099245
Content-Disposition: attachment;
	filename=syscall.diff
Content-Type: application/octet-stream; x-unix-mode=0664; name="syscall.diff"
Content-Transfer-Encoding: 7bit

Index: amd64/SYS.h
===================================================================
RCS file: /home/ncvs/src/lib/libc/amd64/SYS.h,v
retrieving revision 1.27
diff -u -r1.27 SYS.h
--- amd64/SYS.h	22 Feb 2004 02:11:39 -0000	1.27
+++ amd64/SYS.h	3 May 2008 09:11:50 -0000
@@ -48,6 +48,12 @@
 			.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
 			mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \
 			2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx
+
+#define	PSEUDO(x)	ENTRY(__CONCAT(__sys_,x));			\
+			.weak CNAME(__CONCAT(_,x));			\
+			.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
+			mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret ; \
+			2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx
 #else
 #define	RSYSCALL(x)	ENTRY(__CONCAT(__sys_,x));			\
 			.weak CNAME(x);					\
@@ -56,11 +62,12 @@
 			.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
 			mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \
 			2: jmp HIDENAME(cerror)
-#endif
 
 #define	PSEUDO(x)	ENTRY(__CONCAT(__sys_,x));			\
 			.weak CNAME(__CONCAT(_,x));			\
 			.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
-			mov __CONCAT($SYS_,x),%rax; KERNCALL; ret
+			mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \
+			2: jmp HIDENAME(cerror)
+#endif
 
 #define KERNCALL	movq %rcx, %r10; syscall
Index: arm/SYS.h
===================================================================
RCS file: /home/ncvs/src/lib/libc/arm/SYS.h,v
retrieving revision 1.2
diff -u -r1.2 SYS.h
--- arm/SYS.h	9 Nov 2004 16:49:13 -0000	1.2
+++ arm/SYS.h	3 May 2008 09:16:25 -0000
@@ -65,26 +65,19 @@
 	_SYSCALL_NOERROR(x);						\
 	bcs PIC_SYM(CERROR, PLT)
 
-#define SYSCALL_NOERROR(x)						\
-	_SYSCALL_NOERROR(x)
-
 #define SYSCALL(x)							\
 	_SYSCALL(x)
 
-
-#define PSEUDO_NOERROR(x)						\
-	_SYSCALL_NOERROR(x);						\
-	RET
-
 #define PSEUDO(x)							\
-	_SYSCALL(x);							\
+	ENTRY(__CONCAT(__sys_, x));					\
+	.weak _C_LABEL(__CONCAT(_,x));					\
+	.set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x));	\
+	SYSTRAP(x);							\
+	bcs PIC_SYM(CERROR, PLT);					\
 	RET
 
-
-#define RSYSCALL_NOERROR(x)						\
-	PSEUDO_NOERROR(x)
-
 #define RSYSCALL(x)							\
-	PSEUDO(x)
+	_SYSCALL(x);							\
+	RET
 
 	.globl  CERROR
Index: i386/SYS.h
===================================================================
RCS file: /home/ncvs/src/lib/libc/i386/SYS.h,v
retrieving revision 1.24
diff -u -r1.24 SYS.h
--- i386/SYS.h	17 Sep 2002 01:48:51 -0000	1.24
+++ i386/SYS.h	3 May 2008 09:07:50 -0000
@@ -50,10 +50,11 @@
 
 #define	RSYSCALL(x)	SYSCALL(x); ret
 
-#define	PSEUDO(x)	ENTRY(__CONCAT(__sys_,x));			\
+#define	PSEUDO(x)	2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
+			ENTRY(__CONCAT(__sys_,x));			\
 			.weak CNAME(__CONCAT(_,x));			\
 			.set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
-			mov __CONCAT($SYS_,x),%eax; KERNCALL; ret
+			mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret
 
 /* gas messes up offset -- although we don't currently need it, do for BCS */
 #define	LCALL(x,y)	.byte 0x9a ; .long y; .word x
Index: sparc64/SYS.h
===================================================================
RCS file: /home/ncvs/src/lib/libc/sparc64/SYS.h,v
retrieving revision 1.4
diff -u -r1.4 SYS.h
--- sparc64/SYS.h	22 Mar 2002 23:41:58 -0000	1.4
+++ sparc64/SYS.h	3 May 2008 09:12:52 -0000
@@ -82,8 +82,7 @@
 	.weak	CNAME(__CONCAT(_,x)) ; \
 	.type	CNAME(__CONCAT(_,x)),@function ; \
 	.set	CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)) ; \
-	mov	__CONCAT(SYS_,x), %g1 ; \
-	ta	%xcc, ST_SYSCALL ; \
+	_SYSCALL(x) ; \
 	retl ; \
 	 nop ; \
 	.size	CNAME(__CONCAT(__sys_,x)), . - CNAME(__CONCAT(__sys_,x)) ; \

--Apple-Mail-93--424099245
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed
Content-Transfer-Encoding: 7bit



--Apple-Mail-93--424099245--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FA0DF7D-EC80-4B2F-B7E5-86442BA23DA3>