makerpm.sh fails on both RHEL4 and RHEL5 in a similar way... The following command failed: ccache gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -c ../lib/replace/snprintf.c -o ../lib/replace/snprintf.o In file included from ../lib/replace/getpass.c:20: ../lib/replace/replace.h:125: error: conflicting types for 'sys_errlist' /usr/include/bits/sys_errlist.h:28: error: previous declaration of 'sys_errlist' was here ../lib/replace/replace.h:355:1: warning: "snprintf" redefined In file included from /usr/include/stdio.h:838, from ../lib/replace/replace.h:39, from ../lib/replace/getpass.c:20: /usr/include/bits/stdio2.h:45:1: warning: this is the location of the previous definition In file included from ../lib/replace/getpass.c:20: ../lib/replace/replace.h:360:1: warning: "vsnprintf" redefined In file included from /usr/include/stdio.h:838, from ../lib/replace/replace.h:39, from ../lib/replace/getpass.c:20: /usr/include/bits/stdio2.h:48:1: warning: this is the location of the previous definition ../lib/replace/getpass.c: In function 'tcgetattr': ../lib/replace/getpass.c:86: warning: implicit declaration of function 'ioctl' ../lib/replace/getpass.c:86: error: 'TIOCGETP' undeclared (first use in this function) ../lib/replace/getpass.c:86: error: (Each undeclared identifier is reported only once ../lib/replace/getpass.c:86: error: for each function it appears in.) ../lib/replace/getpass.c: In function 'tcsetattr': ../lib/replace/getpass.c:91: error: 'TIOCSETP' undeclared (first use in this function) ../lib/replace/getpass.c: In function 'rep_getpass': ../lib/replace/getpass.c:151: warning: implicit declaration of function 'RETSIGTYPE' ../lib/replace/getpass.c:151: error: expected expression before ')' token ../lib/replace/getpass.c:151: error: called object 'RETSIGTYPE(<erroneous-expression>)' is not a function ../lib/replace/getpass.c:151: error: expected ')' before 'gotintr_sig' ../lib/replace/getpass.c:169: error: invalid use of undefined type 'struct sgttyb' ../lib/replace/getpass.c:169: error: 'ECHO' undeclared (first use in this function) ../lib/replace/getpass.c:170: error: invalid use of undefined type 'struct sgttyb' ../lib/replace/getpass.c:172: error: invalid use of undefined type 'struct sgttyb' ../lib/replace/getpass.c:192: warning: implicit declaration of function 'strlen' ../lib/replace/getpass.c:192: warning: incompatible implicit declaration of built-in function 'strlen' ../lib/replace/getpass.c:214: error: expected expression before ')' token ../lib/replace/getpass.c:214: error: called object 'RETSIGTYPE(<erroneous-expression>)' is not a function The following command failed: ccache gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -c ../lib/replace/getpass.c -o ../lib/replace/getpass.o make: *** [../lib/talloc/talloc.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [../lib/replace/snprintf.o] Error 1 make: *** [../lib/replace/replace.o] Error 1 make: *** [../lib/replace/getpass.o] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.11206 (%build)
I've encountered this (again) as well -- it is a regression of bug #5832 that was fixed in samba-3.2.12. Applying the patch that I submitted on that bug solves the problems and allows the build to continue.
Created attachment 4531 [details] fix build when ccache not available (RHEL) attaching patch from #5832 to fix this regression...
*sigh* Didn't read this closely enough -- this is not the same as #5832, it just references ccache in the quoted output. Sorry -- guess I need to open a separate bug for the regression after all...
OK, I believe I am now seeing a similar error when building packages with makerpms.sh, now that I have the aforementioned ccache patch applied. My output is a bit different, however. (perhaps because ccache is not being used?) The build still fails referencing 'replace.h' from making talloc.c: -------------- Compiling ../lib/talloc/talloc.c ../lib/talloc/talloc.c:50:21: replace.h: No such file or directory ../lib/talloc/talloc.c: In function `_talloc_realloc': ../lib/talloc/talloc.c:987: error: `bool' undeclared (first use in this function) ../lib/talloc/talloc.c:987: error: (Each undeclared identifier is reported only once ../lib/talloc/talloc.c:987: error: for each function it appears in.) ../lib/talloc/talloc.c:987: error: syntax error before "malloced" ../lib/talloc/talloc.c:1035: error: `malloced' undeclared (first use in this function) ../lib/talloc/talloc.c:1035: error: `true' undeclared (first use in this function) ../lib/talloc/talloc.c:1486:1: warning: "va_copy" redefined In file included from ../lib/talloc/talloc.h:30, from ../lib/talloc/talloc.c:51: /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h:54:1: warning: this is the location of the previous definition The following command failed: gcc -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -c ../lib/talloc/talloc.c -o ../lib/talloc/talloc.o make: *** [../lib/talloc/talloc.o] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.1158 (%build) -------------- (I will attach the full build output, in case that proves helpful...)
Created attachment 4534 [details] full output log of failed build process (RHEL4, no ccache)
Created attachment 4535 [details] full output log of failed build process (RHEL4, no ccache) [corrected...]
I've been able to determine that the problem appears to be related to the unavailability of the precompiled header info in the subsequent compiles. The 'make pch' step completes successfully and generates the includes.h.gch file in the expected place. (source3/include/) However, the subsequent compiles do not specify include paths on the CLI, obviously expecting to get them from the PCH step. However, the subsequent compiles act like the they do not have even basic include path info. Copying/adding the entire list of include paths from the 'make pch' step to the 'make all...' step as additions to the CFLAGS= definition allows the build to proceed successfully well past the initial failure point noted above. The build does eventually hang up again at the ldb_modules.c compile, where it complains that 'MODULESDIR' is undefined in function 'ldb_try_load_dso'. Adding " -DMODULESDIR=\'/usr/lib/samba\' " to the CFLAGS= definition allows this to complete as well, and allows the package build to complete past compile/link into the install process. (where it ran out of disk space, and I ran out of time...) Hopefully, someone more versed in working with the precompiled header methods can look into this and find what is preventing the carry-forward of the precompiled headers... -D
will this bug be fix when samba 3.4.4 comes out? kind regards werner
(In reply to comment #8) > will this bug be fix when samba 3.4.4 comes out? > > kind regards > > werner > Hopefully, yes. At least the source dir has been adapted to source3 and I think that will fix the issue. Could you re-test with current v3-4-test branch?
I suppose I can find this branch here: http://gitweb.samba.org/?p=samba.git;a=tree;h=v3-4-test but I'm not familiar with git. Is there an easy to download this branch?
http://repo.or.cz/w/Samba.git/snapshot/0a3b576c0a4298cbe600ad8943e401e3a0639359.tar.gz
same error still occurs with the version I downloaded from: http://repo.or.cz/w/Samba.git/snapshop/0a3b576c0a4298cbe600ad8943e401e3a0639359.tar.gz Compiling ../lib/talloc/talloc.c ../lib/talloc/talloc.c:50:21: replace.h: No such file or directory ../lib/talloc/talloc.c: In function `_talloc_realloc': ../lib/talloc/talloc.c:987: error: `bool' undeclared (first use in this function) ../lib/talloc/talloc.c:987: error: (Each undeclared identifier is reported only once ../lib/talloc/talloc.c:987: error: for each function it appears in.) ../lib/talloc/talloc.c:987: error: syntax error before "malloced" ../lib/talloc/talloc.c:1035: error: `malloced' undeclared (first use in this function) ../lib/talloc/talloc.c:1035: error: `true' undeclared (first use in this function) ../lib/talloc/talloc.c:1486:1: warning: "va_copy" redefined In file included from ../lib/talloc/talloc.h:30, from ../lib/talloc/talloc.c:51: /usr/lib/gcc/i386-redhat-linux/3.4.6/include/stdarg.h:54:1: warning: this is the location of the previous definition The following command failed: ccache gcc -O2 -g -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -c ../lib/talloc/talloc.c -o ../lib/talloc/talloc.o make: *** [../lib/talloc/talloc.o] Error 1
Created attachment 5080 [details] Log for 3.4.3 release makerpm.sh which works fine on RHEL5 The release version of 3.4.3 built fine on my RHEL 5.4 machine using makerpm.sh where older 3.4.X releases would always error out as described in this bug entry.
I forgot to mention that I tried to compile on a RHEL 4 Update 8 machine. I'll see if I can find a RHEL 5 server
I don't know whether it makes a difference but you compiled on a 64 bit machine where I tried a 32 bit. Anyway I'm trying a RHEL 5 machine right now
update & solution !!: it seems to work now for the libtalloc issue but I have another error: + install -m644 setup/swat /var/tmp/samba-3.4.3-root/etc/xinetd.d/swat install: cannot stat `setup/swat': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.16927 (%install) This occurs when I use the samba-3.4.3.tar.gz downloaded from the samba website. However when I ran makerpms.sh it creates a samba-3.4.3.tar.bz2 which is different from samba-3.4.3.tar.gz. It used this as a source and it worked. Appparently the file setup/swat needs to be under the samba-3.4.3/ folder and not only under samba-3.4.3/source3/packaging/RHEL/ To prove my point: source= samba-3.4.3.tar created by makerpms.sh tar -xvf samba-3.4.3.tar |grep "setup\/swat" samba-3.4.3/./packaging/RHEL-CTDB/setup/swat.desktop samba-3.4.3/./packaging/RHEL-CTDB/setup/swat samba-3.4.3/./packaging/RHEL/setup/swat.desktop samba-3.4.3/./packaging/RHEL/setup/swat samba-3.4.3/./setup/swat.desktop samba-3.4.3/./setup/swat source= samba-3.4.3.tar downloaded from samba website: tar -xvf samba-3.4.3.tar |grep "setup\/swat" samba-3.4.3/packaging/RHEL-CTDB/setup/swat samba-3.4.3/packaging/RHEL-CTDB/setup/swat.desktop samba-3.4.3/packaging/RHEL/setup/swat samba-3.4.3/packaging/RHEL/setup/swat.desktop
(In reply to comment #16) > update & solution !!: > > it seems to work now for the libtalloc issue > but I have another error: > > + install -m644 setup/swat /var/tmp/samba-3.4.3-root/etc/xinetd.d/swat > install: cannot stat `setup/swat': No such file or directory > error: Bad exit status from /var/tmp/rpm-tmp.16927 (%install) > > This occurs when I use the samba-3.4.3.tar.gz downloaded from the samba > website. > > However when I ran makerpms.sh it creates a samba-3.4.3.tar.bz2 which is > different from samba-3.4.3.tar.gz. It used this as a source and it worked. > Appparently the file setup/swat needs to be under the samba-3.4.3/ folder and > not only under samba-3.4.3/source3/packaging/RHEL/ > > To prove my point: > source= samba-3.4.3.tar created by makerpms.sh > > tar -xvf samba-3.4.3.tar |grep "setup\/swat" > samba-3.4.3/./packaging/RHEL-CTDB/setup/swat.desktop > samba-3.4.3/./packaging/RHEL-CTDB/setup/swat > samba-3.4.3/./packaging/RHEL/setup/swat.desktop > samba-3.4.3/./packaging/RHEL/setup/swat > samba-3.4.3/./setup/swat.desktop > samba-3.4.3/./setup/swat > > source= samba-3.4.3.tar downloaded from samba website: > tar -xvf samba-3.4.3.tar |grep "setup\/swat" > samba-3.4.3/packaging/RHEL-CTDB/setup/swat > samba-3.4.3/packaging/RHEL-CTDB/setup/swat.desktop > samba-3.4.3/packaging/RHEL/setup/swat > samba-3.4.3/packaging/RHEL/setup/swat.desktop > makerpms.sh copies the setup dir containing the swat files to the Samba dir. So it is by design that this spec file works only together with the makerpms.sh script (it uses the files out of the setup dir). I just built RPMs running makerpms.sh in Samba 3.4.3 and it worked. I think, this bug report can be closed, right? Thanks a lot for testing!
yes it can be closed. I've managed to build packages for RHEL4 & RHEL5 thanks for the feedback
Closing out bug report. Thanks!