Which version do you want to build?
I wanted to update likwid to the latest version in the openSUSE OBS for multiple Linux distributions.
I have used the version 5.2.2 from Github.
Which architecture do you want to build for?
[x] x86_64
[x] ARMv8
[x] POWER9
[ ] Nvidia GPUs
[x] x86 (32 bit)
[x] ARMv7
[x] POWER8
To Reproduce
Changes to config.mk (you may leave out PREFIX changes)
sed -i "/^PREFIX / s,= .#,= $RPM_BUILD_ROOT/usr#," config.mk # path were to install likwid (includes buildroot)
sed -i "/^INSTALLED_PREFIX / s,= .#,= /usr#," config.mk # hardcoded into executables and libraries
sed -i "/^LIBPREFIX / s,/lib,/%{_lib}," config.mk # libdir
sed -i "/^INSTALLED_LIBPREFIX / s,/lib,/%{_lib}," config.mk # libdir
sed -i "/^APPDAEMON / s,/lib,/%{_lib}," config.mk # libdir
sed -i "/^INSTALLED_APPDAEMON / s,/lib,/%{_lib}," config.mk # libdir
sed -i "/^MANPREFIX / s,/man,/share/man," config.mk # manpages
sed -i "/^INSTALL_CHOWN / s,= .*#,= #," config.mk # don't try to chown files on install (would require root permissions)
Changes to build configurations make/include_<COMPILER>.mk
Output log
[ 61s] likwid.x86_64: E: executable-stack (Badness: 10000) /usr/lib64/liblikwid.so.5.2
[ 61s] The binary declares the stack as executable. Executable stack is usually an
[ 61s] error as it is only needed if the code contains GCC trampolines or similar
[ 61s] constructs which uses code on the stack. One common source for needlessly
[ 61s] executable stack cases are object files built from assembler files which don't
[ 61s] define a proper .note.GNU-stack section.
Which version do you want to build? I wanted to update likwid to the latest version in the openSUSE OBS for multiple Linux distributions. I have used the version 5.2.2 from Github.
Which architecture do you want to build for?
To Reproduce
Changes to
config.mk
(you may leave outPREFIX
changes) sed -i "/^PREFIX / s,= .#,= $RPM_BUILD_ROOT/usr#," config.mk # path were to install likwid (includes buildroot) sed -i "/^INSTALLED_PREFIX / s,= .#,= /usr#," config.mk # hardcoded into executables and libraries sed -i "/^LIBPREFIX / s,/lib,/%{_lib}," config.mk # libdir sed -i "/^INSTALLED_LIBPREFIX / s,/lib,/%{_lib}," config.mk # libdir sed -i "/^APPDAEMON / s,/lib,/%{_lib}," config.mk # libdir sed -i "/^INSTALLED_APPDAEMON / s,/lib,/%{_lib}," config.mk # libdir sed -i "/^MANPREFIX / s,/man,/share/man," config.mk # manpages sed -i "/^INSTALL_CHOWN / s,= .*#,= #," config.mk # don't try to chown files on install (would require root permissions)Changes to build configurations
make/include_<COMPILER>.mk
Any other changes
Install options:
%{__make} install \ COMPILER="${COMPILER}" \ INSTRUMENT_BENCH="true" \ FC="gfortran" \ FCFLAGS="-J ./ -fsyntax-only" \ FORTRAN_INTERFACE="true" \ BUILDDAEMON="true" \ ACCESSDAEMON="$RPM_BUILD_ROOT/%{_prefix}/sbin/likwid-accessD" \ ACCESSMODE="accessdaemon" \ BUILDFREQ="true"
Output log [ 61s] likwid.x86_64: E: executable-stack (Badness: 10000) /usr/lib64/liblikwid.so.5.2 [ 61s] The binary declares the stack as executable. Executable stack is usually an [ 61s] error as it is only needed if the code contains GCC trampolines or similar [ 61s] constructs which uses code on the stack. One common source for needlessly [ 61s] executable stack cases are object files built from assembler files which don't [ 61s] define a proper .note.GNU-stack section.
Link to x86 build log