i installed rpmbuild and supported packages. and having following directories in /root/rpmbuild/
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
i've given following command :
Code: Select all
rpmbuild -v -bb gcc.7.2.0.spec
and having following error :-
*** ERROR: No build ID note found in /root/rpmbuild/BUILDROOT/gcc-7.2.0-1.x86_64/libgo/go/debug/elf/testdata/gcc-amd64-linux-exec
error: Bad exit status from /var/tmp/rpm-tmp.7hyCrE (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.7hyCrE (%install)
Code: Select all
Name: gcc
Version: 7.2.0
Release: 1
Summary: gcc-7.2.0.tar.gz installtion file
License: GPL
Source0: gcc-7.2.0.tar.gz
BuildRoot: %{_tmppath}/%{name}-buildroot
%description
install gcc.7.2.0 in form of rpm
%prep
%setup -q
%build
%install
make -p "$RPM_BUILD_ROOT"
cp -R * "$RPM_BUILD_ROOT"
%clean
rm -rf $RPM_BUILD_ROOT
%make_install
%defattr(-,root,root,-)
i googled and i changed SPEC file as follows :-
Code: Select all
Name: gcc
Version: 7.2.0
Release: 1%{?dist}
Summary: gcc-7.2.0.tar.gz installtion file
License: GPL
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc
BuildRoot: %{_tmppath}/%{name}-buildroot
%description
install gcc.7.2.0 in form of rpm
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%make_install
%clean
%files
%doc
/usr/%{name}
%defattr(-,root,root,-)
and ran command as follows :-
Code: Select all
# rpmbuild -v -ba gcc.7.2.0.spec
gives this error :-
make[3]: *** [c/c-decl.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Shared 30074 out of 59977 states by creating 7944 new states, saving 22130
/bin/sh ../.././gcc/../move-if-change tmp-recog.c insn-recog.c
echo timestamp > s-recog
/bin/sh ../.././gcc/../move-if-change tmp-attrtab.c insn-attrtab.c
/bin/sh ../.././gcc/../move-if-change tmp-dfatab.c insn-dfatab.c
/bin/sh ../.././gcc/../move-if-change tmp-latencytab.c insn-latencytab.c
echo timestamp > s-attrtab
/bin/sh ../.././gcc/../move-if-change tmp-automata.c insn-automata.c
echo timestamp > s-automata
rm gcc.pod
make[3]: Leaving directory `/root/rpmbuild/BUILD/gcc-7.2.0/host-x86_64-redhat-linux-gnu/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/root/rpmbuild/BUILD/gcc-7.2.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/root/rpmbuild/BUILD/gcc-7.2.0'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.txYLjQ (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.txYLjQ (%build)