Discussion:
can't compile sfs from src.rpm
Matias Lopez Bergero
2006-05-29 15:17:31 UTC
Permalink
Hello,
First post here,

I'm trying to create the rpm file from the src.rpm due to a compile
error :-P
I search trough google and the sfs mailing list, but I couldn't find
this kind of error message, so, I requesting help here :-D

My system: RedHat ES 3.0, gcc: 3.2.3, glib 1.2.10, glibc 2.3.2, kernel
2.4.32.

Here is the error message:

-bash-2.05b# rpmbuild --rebuild sfs-0.7.2-1.src.rpm
Installing sfs-0.7.2-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.61935
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
...
...
...
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I..
-I.. -I../async -I../arpc -I../crypt -I../sfsmisc -I../sfsrodb -I../adb
-I../svc -I../svc -DEXECDIR=\"/usr/lib/sfs-0.7.2\" -DETCDIR=\"/etc/sfs\"
-DDATADIR=\"/usr/share/sfs\" -DPIDDIR=\"/var/run\" -DSFSDIR=\"/var/sfs\"
-O2 -Wall -Werror -c pmap_prot.C
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../async -I../arpc -I../crypt
-I../sfsmisc -I../sfsrodb -I../adb -I../svc -I../svc
-DEXECDIR=\"/usr/lib/sfs-0.7.2\" -DETCDIR=\"/etc/sfs\"
-DDATADIR=\"/usr/share/sfs\" -DPIDDIR=\"/var/run\" -DSFSDIR=\"/var/sfs\"
-O2 -Wall -Werror -c pmap_prot.C -o pmap_prot.o
cc1plus: warnings being treated as errors
In file included from xdrmisc.h:81,
from pmap_prot.h:7,
from pmap_prot.C:7:
rpctypes.h: In member function `rpc_vec<T, max>& rpc_vec<T, max>::set(const
vec<T, NN>&)':
rpctypes.h:179: warning: no return statement in function returning non-void
make[2]: *** [pmap_prot.lo] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/sfs-0.7.2/arpc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/sfs-0.7.2'
make: *** [all-recursive-am] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.41369 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.41369 (%build)

#

TIA!

BR,
Matias.
Jaakko Niemi
2006-05-29 19:38:40 UTC
Permalink
Post by Matias Lopez Bergero
Hello,
First post here,
I'm trying to create the rpm file from the src.rpm due to a compile
error :-P
I search trough google and the sfs mailing list, but I couldn't find
this kind of error message, so, I requesting help here :-D
My system: RedHat ES 3.0, gcc: 3.2.3, glib 1.2.10, glibc 2.3.2, kernel
2.4.32.
...
Post by Matias Lopez Bergero
Installing sfs-0.7.2-1.src.rpm
..
Post by Matias Lopez Bergero
cc1plus: warnings being treated as errors
Most of those warnings have been addressed in cvs. You can easily
work around those with for example turning off -Werror by giving
"WFLAGS=-Wall" to build enviroment.

--j
Matias Lopez Bergero
2006-05-30 18:51:23 UTC
Permalink
Post by Jaakko Niemi
Post by Matias Lopez Bergero
I'm trying to create the rpm file from the src.rpm due to a compile
error :-P
[...]
[...]
Post by Matias Lopez Bergero
Installing sfs-0.7.2-1.src.rpm
[...]
cc1plus: warnings being treated as errors
[...]
Most of those warnings have been addressed in cvs. You can easily
work around those with for example turning off -Werror by giving
"WFLAGS=-Wall" to build enviroment.
Many Thanks Jaakko!
That solved the problem. But I end in a new one:


...
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires: /bin/sh config(sfs-servers) = 0.7.2-1 libc.so.6
libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libcrypt.so.1
libcrypt.so.1(GLIBC_2.0) libgcc_s.so.1 libgcc_s.so.1(GCC_3.0)
libgcc_s.so.1(GLIBC_2.0) libm.so.6 libnsl.so.1 libresolv.so.2
libresolv.so.2(GLIBC_2.0) libresolv.so.2(GLIBC_2.2) libstdc++.so.5
libstdc++.so.5(CXXABI_1.2) libstdc++.so.5(GLIBCPP_3.2) libutil.so.1
libutil.so.1(GLIBC_2.0) nfs-server
Processing files: sfs-debuginfo-0.7.2-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/sfs-0.7.2-buildroot
error: Installed (but unpackaged) file(s) found:
/usr/info/dir


RPM build errors:
Installed (but unpackaged) file(s) found:
/usr/info/dir

I solved this by issuing a remove command in at the end of the %install
step in the spec file like this:

%install
rm -rf $RPM_BUILD_ROOT
make install-strip DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/sfs $RPM_BUILD_ROOT/etc/sfs $RPM_BUILD_ROOT/sfs
install -D -m 755 etc/sfscd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sfscd
install -D -m 755 etc/sfssd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sfssd
rm -rf $RPM_BUILD_ROOT/usr/info/dir

After that, I issue the rpmbuild command to use that spec file to make
the rpm files :)

# WFLAGS=-Wall rpmbuild -bb /usr/src/redhat/SPECS/sfs-0.7.2.spec

HTH someone.

BR,
Matias.

Loading...