Hide Forgot
Description of problem: Bo Fan could not rebuild libguestfs and got the error: > perl /home/mockbuild/rpmbuild/BUILD/libguestfs-1.22.6/perl/Makefile.PL \ > INSTALLDIRS=vendor PREFIX=/usr > ! test -f ../generator/Makefile || \ > make -C ../generator stamp-generator > make[3]: Entering directory `/home/mockbuild/rpmbuild/BUILD/libguestfs-1.22.6\ /generator' > make[3]: `stamp-generator' is up to date. > make[3]: Leaving directory `/home/mockbuild/rpmbuild/BUILD/libguestfs-1.22.6/\ generator' > Only one of PREFIX or INSTALL_BASE can be given. Not both. This error makes no sense because INSTALL_BASE is not specified. Also I could not reproduce this. Version-Release number of selected component (if applicable): 1.22.6-15.el7
Created attachment 822377 [details] configure.log
Created attachment 822378 [details] make.log
Created attachment 822379 [details] rebuild.log
Thanks for your help via email, I find a weird environment value 'PERL_MM_OPT=INSTALL_BASE=/home/mockbuild/perl5' in my host, so I set it to PERL_MM_OPT=/home/mockbuild/perl5 build process can continue, but finally failed due to "RPM build errors: File not found by glob: /home/mockbuild/rpmbuild/BUILDROOT/libguestfs-1.22.6-15.el7.x86_64/usr/lib/python2.7/site-packages/*.pyc File not found by glob: /home/mockbuild/rpmbuild/BUILDROOT/libguestfs-1.22.6-15.el7.x86_64/usr/lib/python2.7/site-packages/*.pyo " I cut the end of build log and attached
Created attachment 822991 [details] build log
(In reply to bfan from comment #5) > Thanks for your help via email, > > I find a weird environment value > 'PERL_MM_OPT=INSTALL_BASE=/home/mockbuild/perl5' in my host, so I set it to > PERL_MM_OPT=/home/mockbuild/perl5 > > build process can continue, but finally failed due to > "RPM build errors: > File not found by glob: > /home/mockbuild/rpmbuild/BUILDROOT/libguestfs-1.22.6-15.el7.x86_64/usr/lib/ > python2.7/site-packages/*.pyc > File not found by glob: > /home/mockbuild/rpmbuild/BUILDROOT/libguestfs-1.22.6-15.el7.x86_64/usr/lib/ > python2.7/site-packages/*.pyo > " These files (compiled Python bytecode) are generated by RPM. If you look at a typical successful build log upstream, eg: http://kojipkgs.fedoraproject.org//packages/libguestfs/1.25.7/1.fc21/data/logs/x86_64/build.log then you will see: + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 Bytecompiling .py files below /builddir/build/BUILDROOT/libguestfs-1.25.7-1.fc21.x86_64/usr/lib/python2.7/ using /usr/bin/python2.7 Bytecompiling .py files below /builddir/build/BUILDROOT/libguestfs-1.25.7-1.fc21.x86_64/usr/lib64/python2.7/ using /usr/bin/python2.7 The brp-python-bytecompile program is what generates these files. If brp-python-bytecompile is missing/broken then these files don't get generated and the build would fail. > I cut the end of build log and attached As usual, I need to see the whole log, not parts of it. In this case I cannot see any reference to brp-python-bytecompile but I'm not sure if that occurred earlier, or if it's just not installed. My suggestion: # yum install /usr/lib/rpm/brp-python-bytecompile
brp-python-bytecompile is installed $ ls /usr/lib/rpm/brp- brp-compress brp-python-bytecompile brp-strip brp-strip-shared brp-java-gcjcompile brp-python-hardlink brp-strip-comment-note brp-strip-static-archive How can I tell it works but not broken, I run /usr/lib/rpm/brp-python-bytecompile , nothing returned without error I compare the upstream logs to mine, I just find in my logs + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump attach the whole logs
Created attachment 823021 [details] the whole logs
The way this works is: After installation, the RPM macro __os_install_post runs. This macro contains a call to brp-python-bytecompile hard wired. You can find out what your macro contains by doing: $ rpm --eval '%{__os_install_post}' /usr/lib/rpm/redhat/brp-compress /usr/lib/rpm/redhat/brp-strip /usr/bin/strip /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 /usr/lib/rpm/redhat/brp-python-hardlink /usr/lib/rpm/redhat/brp-java-repack-jars (for me) Now, there are two possibilities here: (1) You don't have redhat-rpm-config package installed. This seems most likely. (2) You have overridden this macro in your ~/.rpmmacros.
Yes, build passed after I installed redhat-rpm-config package. Thanks very much
Closing as NOTABUG, but please see this thread: https://lists.fedoraproject.org/pipermail/devel/2013-November/thread.html#191994