Search code examples
dockercentos7rpmbuildoraclelinux

Problem creating rpm in docker container gcc-toolset-11 - libelf.so.dts.1


I have a CentOS 7 machine with an Oracle Linux 8 docker container with gcc-toolset-11. When I try to build the project in the container I get the following errors:

extracting debug info from /cm/build/rpmbuild/BUILDROOT/MyPackage-9.1.0-497.ol8.x86_64/usr/local/bin/mariadb
gdb-add-index: No index was created for /cm//build/rpmbuild/BUILDROOT/MyPackage-9.1.0-497.ol8.x86_64/usr/local/bin/mariadb
gdb-add-index: [Was there no debuginfo? Was there already an index?]
gdb-add-index: No index was created for /cm/build/rpmbuild/BUILDROOT/MyPackage-9.1.0-497.ol8.x86_64/usr/local/bin/mariadb-binlog
gdb-add-index: [Was there no debuginfo? Was there already an index?]
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
/usr/lib/rpm/find-debuginfo.sh: line 501: /tmp/find-debuginfo.NCirqm/res.*: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.tHJ5xo (%install)

Any help?


Solution

  • I figured it out. I was having trouble getting source /opt/rh/gcc-toolset-11/enable to work, so I put all the paths in the Docerfile as ENV commands. But I apparently did it wrong. Fixed the bad ENV commands, and now it builds correctly.