Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] RPM creation fails with build errors: #660

Open
1 of 7 tasks
frankeverdij opened this issue Jan 7, 2025 · 3 comments
Open
1 of 7 tasks

[Build] RPM creation fails with build errors: #660

frankeverdij opened this issue Jan 7, 2025 · 3 comments

Comments

@frankeverdij
Copy link

Which version do you want to build?
Building from tag v5.4.1 from the github repo.

Which architecture do you want to build for?

  • x86_64
  • ARMv8
  • POWER9
  • Nvidia GPUs
  • x86 (32 bit)
  • ARMv7
  • POWER8

To Reproduce
No changes made to to the config.mk file
Building on a RHEL 8.10 system.

Output log

Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.f9UOZ0           
+ umask 022                                                       
+ cd /root/rpmbuild/BUILD                                                                                                           
+ '[' /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64 '!=' / ']'                                                                 
+ rm -rf /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64                                                                         
++ dirname /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64                                                                       
+ mkdir -p /root/rpmbuild/BUILDROOT                                                                                                 
+ mkdir /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64                                                                          
+ cd likwid-5.4.1                                                 
+ COMPILER=GCC                                                                                                                      
+ /usr/bin/make install PREFIX=/root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr MANPREFIX=/root/rpmbuild/BUILDROOT/likwid-5.4
.1-1.el8.x86_64//usr/share/man BINPREFIX=/root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/bin LIBPREFIX=/root/rpmbuild/BUILDR
OOT/likwid-5.4.1-1.el8.x86_64//usr/lib64 INSTALLED_PREFIX=/usr INSTALLED_BINPREFIX=/usr/bin INSTALLED_LIBPREFIX=/usr/lib64 INSTALLED
_MANPREFIX=/usr/share/man COMPILER=GCC INSTRUMENT_BENCH=true FC=gfortran 'FCFLAGS=-J ./  -fsyntax-only' FORTRAN_INTERFACE=true      
make[1]: Entering directory '/usr/src/redhat/BUILD/likwid-5.4.1'  
Info: PREFIX and INSTALLED_PREFIX differ, be aware that you have to move stuff after make install from /root/rpmbuild/BUILDROOT/likw
id-5.4.1-1.el8.x86_64//usr to /usr. You can use make move for this.                                                                 
===> INSTALL access daemon to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/sbin/likwid-accessD                           
===> INSTALL setFrequencies tool to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/sbin/likwid-setFreq                     
===> No INSTALL of the application interface appDaemon                                                                              
===> No INSTALL of the container helper likwid-bridge                                                                               
===> INSTALL applications to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/bin                                            
===> INSTALL helper applications to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/bin                                     
===> INSTALL lua to likwid interface to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/share/lua
===> INSTALL libraries to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/lib64
===> INSTALL man pages to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/share/man/man1
===> INSTALL headers to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/include
===> INSTALL fortran interface to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/include/
===> INSTALL groups to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/share/likwid/perfgroups
===> INSTALL docs and examples to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64//usr/share/likwid/docs
===> INSTALL filters to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/likwid/filter
===> INSTALL cmake to /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/likwid
make[1]: Leaving directory '/usr/src/redhat/BUILD/likwid-5.4.1'
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
/sbin/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile '' 1
+ /usr/lib/rpm/brp-python-hardlink
+ PYTHON3=/usr/libexec/platform-python
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
mangling shebang in /usr/share/likwid/filter/template from /usr/bin/env perl to #!/usr/bin/perl
mangling shebang in /usr/share/likwid/filter/xml from /usr/bin/env perl to #!/usr/bin/perl
mangling shebang in /usr/share/likwid/filter/json from /usr/bin/env python3 to #!/usr/libexec/platform-python
mangling shebang in /usr/bin/feedGnuplot from /usr/bin/env perl to #!/usr/bin/perl
Processing files: likwid-5.4.1-1.el8.x86_64
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.GFbIvM
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd likwid-5.4.1
+ DOCDIR=/root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/doc/likwid
+ export LC_ALL=C
+ LC_ALL=C
+ export DOCDIR
+ /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/doc/likwid
+ cp -pr COPYING /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/doc/likwid
+ cp -pr README.md /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/doc/likwid
+ cp -pr INSTALL /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64/usr/share/doc/likwid
+ exit 0
warning: File listed twice: /usr/share/man/man1/likwid-setFrequencies.1.gz
Provides: liblikwid-hwloc.so.5.4()(64bit) liblikwid-lua.so.5.4()(64bit) liblikwid.so.5.4()(64bit) liblikwidpin.so.5.4()(64bit) likwi
d = 5.4.1-1.el8 likwid(x86-64) = 5.4.1-1.el8
Requires(interp): /bin/sh /bin/sh 
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh /sbin/ldconfig
Requires(postun): /bin/sh /sbin/ldconfig
Requires: /usr/bin/likwid-lua /usr/bin/perl /usr/libexec/platform-python libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(G
LIBC_2.17)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.24)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bi
t) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.6)(64bit) libc.so.6(GLIBC_2.7)(64bit) libdl.so.2()(64bit) libdl.so.2(GLIBC_2.2.5)(6
4bit) liblikwid-hwloc.so.5.4()(64bit) liblikwid-lua.so.5.4()(64bit) liblikwid.so.5.4()(64bit) liblikwidpin.so.5.4()(64bit) libm.so.6
()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.4)(64
bit) librt.so.1()(64bit) rtld(GNU_HASH)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/likwid-5.4.1-1.el8.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/bin/likwid-setFrequencies 
   /usr/sbin/likwid-accessD
   /usr/sbin/likwid-setFreq


RPM build errors:
    File listed twice: /usr/share/man/man1/likwid-setFrequencies.1.gz
    Installed (but unpackaged) file(s) found:
   /usr/bin/likwid-setFrequencies 
   /usr/sbin/likwid-accessD
   /usr/sbin/likwid-setFreq
@TomTheBear
Copy link
Member

Those files should be on the file list for x86_64 and x86, there is a conditional around it. I'm no expert in packaging, maybe the ifarch conditional does not work in the file list section or you need some RPM macro package to get the ifarch conditional on RHEL 8.10.

@ho-ob any ideas?

@bkmgit
Copy link
Collaborator

bkmgit commented Jan 9, 2025

warning: File listed twice: /usr/share/man/man1/likwid-setFrequencies.1.gz

occurs because of
%doc %{_mandir}/man*/likwid-setFrequencies*
%doc %{_mandir}/man*/likwid-setFreq*

Check architecture macros are correctly defined on your system:
https://docs.fedoraproject.org/en-US/packaging-guidelines/RPMMacros/

Alternatively, if only building on one architecture, remove unneeded conditionals.

@frankeverdij
Copy link
Author

frankeverdij commented Jan 14, 2025

The "file listed twice" warning can be worked around by changing the second %doc line in likwid.spec into:
doc %{_mandir}/man*/likwid-setFreq.*

After reading the rpmbuild documentation I changed the %ifarch %{x86_64} %{ix86} into %ifarch x86_64 ix86 which seems to be the default way of checking architectures.

The build now works. So this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants