Bugzilla – Bug 14595
Some binaries have rpaths compiled into them causing RPM build to fail
Last modified: 2019-01-25 10:41:27 UTC
Building on CentOS 5.3 x86_64 from 7.4/trunk, using buildme.pl as follows: $(pwd)/buildme.pl --build rpm --buildDir /tmp/scbuild/ --sourceDir $(pwd) --destDir ~/rpmbuild/RPMS/ Throws the following warnings, before failing: + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot ******************************************************************************* * * WARNING: 'check-rpaths' detected a broken RPATH and will cause 'rpmbuild' * to fail. To ignore these errors, you can set the '$QA_RPATHS' * environment variable which is a bitmask allowing the values * below. The current value of QA_RPATHS is 0x0000. * * 0x0001 ... standard RPATHs (e.g. /usr/lib); such RPATHs are a minor * issue but are introducing redundant searchpaths without * providing a benefit. They can also cause errors in multilib * environments. * 0x0002 ... invalid RPATHs; these are RPATHs which are neither absolute * nor relative filenames and can therefore be a SECURITY risk * 0x0004 ... insecure RPATHs; these are relative RPATHs which are a * SECURITY risk * 0x0008 ... the special '$ORIGIN' RPATHs are appearing after other * RPATHs; this is just a minor issue but usually unwanted * 0x0010 ... the RPATH is empty; there is no reason for such RPATHs * and they cause unneeded work while loading libraries * 0x0020 ... an RPATH references '..' of an absolute path; this will break * the functionality when the path before '..' is a symlink * * * Examples: * - to ignore standard and empty RPATHs, execute 'rpmbuild' like * $ QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild my-package.src.rpm * - to check existing files, set $RPM_BUILD_ROOT and execute check-rpaths like * $ RPM_BUILD_ROOT=<top-dir> /usr/lib/rpm/check-rpaths * ******************************************************************************* ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/x86_64-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/x86_64-linux-thread-multi/auto/GD/GD.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/GD/GD.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-freebsd-64int/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0002: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-freebsd-64int/auto/GD/GD.so' contains an invalid rpath '/usr/local/lib' in [/usr/local/lib:/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-freebsd-64int/auto/GD/GD.so' contains a standard rpath '/usr/lib' in [/usr/local/lib:/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-freebsd-64int/auto/EV/EV.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-freebsd-64int/auto/DBD/mysql/mysql.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/x86_64-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] error: Bad exit status from /var/tmp/rpm-tmp.83620 (%install) Bad exit status from /var/tmp/rpm-tmp.83620 (%install) Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.27708 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.83620 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.83620 RPM build errors: INFO: Moving /tmp/scbuild//rpm/RPMS/noarch/*.rpm to /home/robin/rpmbuild/RPMS/ mv: cannot stat `/tmp/scbuild//rpm/RPMS/noarch/*.rpm': No such file or directory This can be worked around as suggested in the output from check-rpaths: export QA_RPATHS=$[ 0x0001|0x0010|0x0002 ] ; $(pwd)/buildme.pl --build rpm --buildDir /tmp/scbuild/ --sourceDir $(pwd) --destDir ~/rpmbuild/RPMS But, the rpaths should be fixed in those binaries.
== Auto-comment from SVN commit #28783 to the slim repo by fletch == == https://svn.slimdevices.com/slim?view=revision&revision=28783 == Bug 14595 partial - remove freebsd stuff from RPM
Andy, I fixed the freebsd part by excluding them from the RPM. I'm not sure if you want to recompile the others or just use chrpath.
Grr, CentOS drives me nuts with this stupid error. Anyway, the right solution is to update buildme.sh to build the modules correctly. Want to take a crack at that Robin?
(In reply to comment #3) > Grr, CentOS drives me nuts with this stupid error. > > Anyway, the right solution is to update buildme.sh to build the modules > correctly. Want to take a crack at that Robin? Are you saying that we should build the binary perl modules at RPM build time, or that we should do what we are doing now, and work around the error message? I agree with the former...
buildme.sh, or buildme.pl? Fletch, I would say neither option. I don't think that those modules should be built when the RPM is created - they are checked into svn. I don't think we should work around the problem Option 3 is: whatever the process is for building the binary modules, it should be and corrected to build them correctly. This link may be useful: http://fedoraproject.org/wiki/Extras/Schedule/RpathCheckBuildsys R.
build-perl-modules is dead. buildme.sh is the way to build modules now, it's in trunk/vendor/CPAN. Yes the correct option is to fix the build script, rebuild the modules, and check them in over the bad versions.
7.4.x milestone is in the past
Is this still an issue? Please reopen if so.
It's not fixed: This is from building 7.6 trunk: + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot ******************************************************************************* * * WARNING: 'check-rpaths' detected a broken RPATH and will cause 'rpmbuild' * to fail. To ignore these errors, you can set the '$QA_RPATHS' * environment variable which is a bitmask allowing the values * below. The current value of QA_RPATHS is 0x0000. * * 0x0001 ... standard RPATHs (e.g. /usr/lib); such RPATHs are a minor * issue but are introducing redundant searchpaths without * providing a benefit. They can also cause errors in multilib * environments. * 0x0002 ... invalid RPATHs; these are RPATHs which are neither absolute * nor relative filenames and can therefore be a SECURITY risk * 0x0004 ... insecure RPATHs; these are relative RPATHs which are a * SECURITY risk * 0x0008 ... the special '$ORIGIN' RPATHs are appearing after other * RPATHs; this is just a minor issue but usually unwanted * 0x0010 ... the RPATH is empty; there is no reason for such RPATHs * and they cause unneeded work while loading libraries * 0x0020 ... an RPATH references '..' of an absolute path; this will break * the functionality when the path before '..' is a symlink * * * Examples: * - to ignore standard and empty RPATHs, execute 'rpmbuild' like * $ QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild my-package.src.rpm * - to check existing files, set $RPM_BUILD_ROOT and execute check-rpaths like * $ RPM_BUILD_ROOT=<top-dir> /usr/lib/rpm/check-rpaths * ******************************************************************************* ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/x86_64-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/x86_64-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/x86_64-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/i386-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/i386-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.12/i386-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/x86_64-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/x86_64-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/x86_64-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.10/i386-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/arm-linux-gnueabi-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/arm-linux-gnueabi-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/arm-linux-gnueabi-thread-multi/auto/DBD/mysql/mysql.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/arm-linux-gnueabi-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/powerpc-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/powerpc-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/powerpc-linux-thread-multi/auto/DBD/mysql/mysql.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/powerpc-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/x86_64-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/x86_64-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/x86_64-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-linux-thread-multi/auto/Audio/Scan/Scan.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-linux-thread-multi/auto/Image/Scale/Scale.so' contains a standard rpath '/usr/lib' in [/usr/lib] ERROR 0001: file '/usr/share/squeezeboxserver/CPAN/arch/5.8/i386-linux-thread-multi/auto/DBD/SQLite/SQLite.so' contains a standard rpath '/usr/lib' in [/usr/lib] error: Bad exit status from /var/tmp/rpm-tmp.55625 (%install) Bad exit status from /var/tmp/rpm-tmp.55625 (%install) Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9072 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.55625 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.55625
OK thanks. Will need to add rpath-removal code to buildme.sh.
See bug 8232 for more info. Andy used chrpath --delete to fix this the last time.
I need to rebuild all Linux binaries/modules using updated scripts to remove rpath. This is an annoying RedHat "feature"
Hey Mark, can you help on this one? thanks!
(In reply to comment #13) > Hey Mark, can you help on this one? thanks! Hi Mickey, I'm not sure what I can do. I have never built the perl module binaries and do not have the source or scripts to do so. As I mentioned in comment 11, bug 8232 contains more information on the issue and what Andy did to fix this the last time. As far as I know, the same fix should still work.
The buildme.sh script and all source is at http://svn.slimdevices.com/repos/slim/7.6/trunk/vendor/CPAN/ I build all Linux binaries on Debian VMs, so it's probably a matter of adding a call to chrpath to the build script in the right places.