Bug 2049275

Summary: inaccessible plugin file plugin/annobin.so
Product: Red Hat Enterprise Linux 8 Reporter: Germano Massullo <germano.massullo>
Component: gcc-toolset-11-gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.5CC: ahajkova, fweimer, jakub, ohudlick, sipoyare
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-01 21:17:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
srpm file
none
gcc logs none

Description Germano Massullo 2022-02-01 20:29:57 UTC
Created attachment 1858470 [details]
srpm file

darktable package maintainer here (Fedora/EPEL).
I am using GCC toolset 11 on EPEL 8 to compile darktable.
- spec file https://github.com/Germano0/darktable-spec/blob/main/darktable.spec
- srpm: see attachment

During mock build I obtain this error that may be a GCC bug(?)

=======================================
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9vrFiw
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf darktable-3.8.0
+ /usr/bin/xz -dc /builddir/build/SOURCES/darktable-3.8.0.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd darktable-3.8.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /builddir/build/SOURCES/appdata.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /builddir/build/SOURCES/aarch64-DT_CLONE_TARGETS.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /builddir/build/SOURCES/10826.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ rm -rf src/external/CL
+ sed -i -e 's, \"external/CL/\*\.h\" , ,' src/CMakeLists.txt
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.xUi0dt
+ umask 022
+ cd /builddir/build/BUILD
+ cd darktable-3.8.0
+ . /opt/rh/gcc-toolset-11/enable
++ export PATH=/opt/rh/gcc-toolset-11/root/usr/bin:/builddir/.local/bin:/builddir/bin:/usr/share/Modules/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
++ PATH=/opt/rh/gcc-toolset-11/root/usr/bin:/builddir/.local/bin:/builddir/bin:/usr/share/Modules/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
++ export MANPATH=/opt/rh/gcc-toolset-11/root/usr/share/man::
++ MANPATH=/opt/rh/gcc-toolset-11/root/usr/share/man::
++ export INFOPATH=/opt/rh/gcc-toolset-11/root/usr/share/info
++ INFOPATH=/opt/rh/gcc-toolset-11/root/usr/share/info
++ export PCP_DIR=/opt/rh/gcc-toolset-11/root
++ PCP_DIR=/opt/rh/gcc-toolset-11/root
+++ rpm --eval '%{_libdir}'
++ rpmlibdir=/usr/lib64
++ '[' /usr/lib64 '!=' /usr/ ']'
++ rpmlibdir32=:/opt/rh/gcc-toolset-11/root/usr/lib
++ dynpath32=:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib:/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib:/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ export PKG_CONFIG_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/pkgconfig::/usr/lib64/pkgconfig:/usr/share/pkgconfig
++ PKG_CONFIG_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/pkgconfig::/usr/lib64/pkgconfig:/usr/share/pkgconfig
+ mkdir x86_64-redhat-linux-gnu
+ pushd x86_64-redhat-linux-gnu
~/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu ~/build/BUILD/darktable-3.8.0
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_LIBRARY_PATH:PATH=/usr/lib64 -DUSE_GEO:BOOLEAN=ON -DCMAKE_BUILD_TYPE:STRING=Release -DBINARY_PACKAGE_BUILD=1 -DDONT_USE_INTERNAL_LUA=OFF -DBUILD_NOISE_TOOLS=ON -DHAVE_GMIC=OFF -DRAWSPEED_ENABLE_LTO=OFF ..
-- The CXX compiler identification is GNU 11.2.1
-- The C compiler identification is GNU 11.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/rh/gcc-toolset-11/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/gcc-toolset-11/root/usr/bin/c++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  The C++ compiler

    "/opt/rh/gcc-toolset-11/root/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/opt/rh/gcc-toolset-11/root/usr/bin/gmake -f Makefile cmTC_1b24f/fast && /opt/rh/gcc-toolset-11/root/usr/bin/gmake  -f CMakeFiles/cmTC_1b24f.dir/build.make CMakeFiles/cmTC_1b24f.dir/build
    gmake[1]: Entering directory '/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_1b24f.dir/testCXXCompiler.cxx.o
    /opt/rh/gcc-toolset-11/root/usr/bin/c++   -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -fPIE -o CMakeFiles/cmTC_1b24f.dir/testCXXCompiler.cxx.o -c /builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    cc1plus: fatal error: inaccessible plugin file plugin/annobin.so expanded from short plugin name annobin: No such file or directory
    compilation terminated.
    gmake[1]: *** [CMakeFiles/cmTC_1b24f.dir/build.make:78: CMakeFiles/cmTC_1b24f.dir/testCXXCompiler.cxx.o] Error 1
    gmake[1]: Leaving directory '/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:127: cmTC_1b24f/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:22 (project)


-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.xUi0dt (%build)
    Bad exit status from /var/tmp/rpm-tmp.xUi0dt (%build)


RPM build errors:
Finish: rpmbuild darktable-3.8.0-6.el8.next.src.rpm
Finish: build phase for darktable-3.8.0-6.el8.next.src.rpm
ERROR: Exception(/home/user/darktable/darktable-3.8.0-6.el8.next.src.rpm) Config(epel-next-8-x86_64) 1 minutes 3 seconds
INFO: Results and/or logs in: /home/user/darktable/results_darktable/3.8.0/6.el8.next
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
INFO: unmounting tmpfs.
Finish: clean chroot
INFO: unmounting tmpfs.
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 7bce7cd969294b648cda859c91e1e68f -D /var/lib/mock/epel-next-8-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.oaqgyx18:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/darktable.spec

Could not execute mockbuild: Failed to execute command.
=======================================



One of upstream developers said:
[15:57] <xxx> cc1plus: fatal error: inaccessible plugin file plugin/annobin.so expanded from short plugin name annobin: No such file or directory
[15:58] <xxx> some super esoteric build switches, very redhat specific
[15:58] <xxx> i suspect there's something broken with the compiler installation?
[15:58] <xxx> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  <= i have never heard of that

Comment 1 Marek Polacek 2022-02-01 20:32:24 UTC
Do you have gcc-toolset-11-annobin?

Comment 2 Germano Massullo 2022-02-01 20:48:28 UTC
I replaced

BuildRequires: gcc-toolset-11

with

BuildRequires: gcc-toolset-11
BuildRequires: gcc-toolset-11-annobin-annocheck

but the mockbuild output seems to be the same



+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf darktable-3.8.0
+ /usr/bin/xz -dc /builddir/build/SOURCES/darktable-3.8.0.tar.xz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd darktable-3.8.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /builddir/build/SOURCES/appdata.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /builddir/build/SOURCES/aarch64-DT_CLONE_TARGETS.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /builddir/build/SOURCES/10826.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ rm -rf src/external/CL
+ sed -i -e 's, \"external/CL/\*\.h\" , ,' src/CMakeLists.txt
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.kYxJ7v
+ umask 022
+ cd /builddir/build/BUILD
+ cd darktable-3.8.0
+ . /opt/rh/gcc-toolset-11/enable
++ export PATH=/opt/rh/gcc-toolset-11/root/usr/bin:/builddir/.local/bin:/builddir/bin:/usr/share/Modules/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
++ PATH=/opt/rh/gcc-toolset-11/root/usr/bin:/builddir/.local/bin:/builddir/bin:/usr/share/Modules/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
++ export MANPATH=/opt/rh/gcc-toolset-11/root/usr/share/man::
++ MANPATH=/opt/rh/gcc-toolset-11/root/usr/share/man::
++ export INFOPATH=/opt/rh/gcc-toolset-11/root/usr/share/info
++ INFOPATH=/opt/rh/gcc-toolset-11/root/usr/share/info
++ export PCP_DIR=/opt/rh/gcc-toolset-11/root
++ PCP_DIR=/opt/rh/gcc-toolset-11/root
+++ rpm --eval '%{_libdir}'
++ rpmlibdir=/usr/lib64
++ '[' /usr/lib64 '!=' /usr/ ']'
++ rpmlibdir32=:/opt/rh/gcc-toolset-11/root/usr/lib
++ dynpath32=:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib:/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ LD_LIBRARY_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64:/opt/rh/gcc-toolset-11/root/usr/lib:/opt/rh/gcc-toolset-11/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-11/root/usr/lib/dyninst
++ export PKG_CONFIG_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/pkgconfig::/usr/lib64/pkgconfig:/usr/share/pkgconfig
++ PKG_CONFIG_PATH=/opt/rh/gcc-toolset-11/root/usr/lib64/pkgconfig::/usr/lib64/pkgconfig:/usr/share/pkgconfig
+ mkdir x86_64-redhat-linux-gnu
+ pushd x86_64-redhat-linux-gnu
~/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu ~/build/BUILD/darktable-3.8.0
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_LIBRARY_PATH:PATH=/usr/lib64 -DUSE_GEO:BOOLEAN=ON -DCMAKE_BUILD_TYPE:STRING=Release -DBINARY_PACKAGE_BUILD=1 -DDONT_USE_INTERNAL_LUA=OFF -DBUILD_NOISE_TOOLS=ON -DHAVE_GMIC=OFF -DRAWSPEED_ENABLE_LTO=OFF ..
-- The CXX compiler identification is GNU 11.2.1
-- The C compiler identification is GNU 11.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /opt/rh/gcc-toolset-11/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/gcc-toolset-11/root/usr/bin/c++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  The C++ compiler

    "/opt/rh/gcc-toolset-11/root/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/opt/rh/gcc-toolset-11/root/usr/bin/gmake -f Makefile cmTC_1bcd4/fast && /opt/rh/gcc-toolset-11/root/usr/bin/gmake  -f CMakeFiles/cmTC_1bcd4.dir/build.make CMakeFiles/cmTC_1bcd4.dir/build
    gmake[1]: Entering directory '/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_1bcd4.dir/testCXXCompiler.cxx.o
    /opt/rh/gcc-toolset-11/root/usr/bin/c++   -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -fPIE -o CMakeFiles/cmTC_1bcd4.dir/testCXXCompiler.cxx.o -c /builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    cc1plus: fatal error: inaccessible plugin file plugin/annobin.so expanded from short plugin name annobin: No such file or directory
    compilation terminated.
    gmake[1]: *** [CMakeFiles/cmTC_1bcd4.dir/build.make:78: CMakeFiles/cmTC_1bcd4.dir/testCXXCompiler.cxx.o] Error 1
    gmake[1]: Leaving directory '/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:127: cmTC_1bcd4/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:22 (project)


-- Configuring incomplete, errors occurred!
See also "/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.kYxJ7v (%build)
    Bad exit status from /var/tmp/rpm-tmp.kYxJ7v (%build)


RPM build errors:
Finish: rpmbuild darktable-3.8.0-6.el8.next.src.rpm
Finish: build phase for darktable-3.8.0-6.el8.next.src.rpm
ERROR: Exception(/home/user/darktable/darktable-3.8.0-6.el8.next.src.rpm) Config(epel-next-8-x86_64) 0 minutes 52 seconds
INFO: Results and/or logs in: /home/user/darktable/results_darktable/3.8.0/6.el8.next
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
INFO: unmounting tmpfs.
Finish: clean chroot
INFO: unmounting tmpfs.
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M afd3a1bbcf1d41949a6a054a0a765e3e -D /var/lib/mock/epel-next-8-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.g72mu0q_:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/darktable.spec

Could not execute mockbuild: Failed to execute command.

Comment 3 Marek Polacek 2022-02-01 20:51:57 UTC
Not gcc-toolset-11-annobin-annocheck, you need gcc-toolset-11-annobin-plugin-gcc.

Installing gcc-toolset-11-toolchain would take care of this, BTW.

Comment 4 Germano Massullo 2022-02-01 21:14:15 UTC
Created attachment 1858472 [details]
gcc logs

BuildRequires: gcc-toolset-11-annobin-annocheck
fixed the annobin error, but there is a new one, that does not happen on Fedora branch, only on EPEL 8

[ 21%] Building C object bin/CMakeFiles/lib_darktable.dir/version_gen.c.o
cd /builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/bin && /opt/rh/gcc-toolset-11/root/usr/bin/cc -DDT_HAVE_SIGNAL_TRACE -DGDK_DISABLE_DEPRECATED -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_MIN_REQUIRED -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DHAVE_BUILTIN_CPU_SUPPORTS -DHAVE_CONFIG_H -DHAVE_GAME -DHAVE_GPHOTO2 -DHAVE_GPHOTO_25_OR_NEWER -DHAVE_GRAPHICSMAGICK -DHAVE_HTTP_SERVER -DHAVE_ICU -DHAVE_KWALLET -DHAVE_LENSFUN -DHAVE_LIBRAW=1 -DHAVE_LIBSECRET -DHAVE_OPENCL -DHAVE_OPENEXR -DHAVE_OPENJPEG -DHAVE_PRINT -DHAVE_SQLITE_324_OR_NEWER -DSQLITE_CORE -DSQLITE_ENABLE_ICU -DUSE_COLORDGTK -DUSE_LUA -D_RELEASE -D_XOPEN_SOURCE=700 -D__GDK_KEYSYMS_COMPAT_H__ -Dlib_darktable_EXPORTS -I/builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/bin -I/builddir/build/BUILD/darktable-3.8.0/src -I/builddir/build/BUILD/darktable-3.8.0/src/external/lua/src -I/builddir/build/BUILD/darktable-3.8.0/src/external/LuaAutoC -I/builddir/build/BUILD/darktable-3.8.0/src/external/whereami/src -I/builddir/build/BUILD/darktable-3.8.0/src/external/LibRaw -isystem /builddir/build/BUILD/darktable-3.8.0/src/external -isystem /builddir/build/BUILD/darktable-3.8.0/src/external/OpenCL -isystem /usr/include/glib-2.0 -isystem /usr/lib64/glib-2.0/include -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/uuid -isystem /usr/include/harfbuzz -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib64/dbus-1.0/include -isystem /usr/include/libxml2 -isystem /usr/include/libsoup-2.4 -isystem /usr/include/OpenEXR -isystem /usr/include/lensfun -isystem /usr/include/librsvg-2.0 -isystem /usr/include/json-glib-1.0 -isystem /usr/include/openjpeg-2.4 -isystem /usr/include/libsecret-1 -isystem /usr/include/GraphicsMagick -isystem /usr/include/colord-1 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -Wformat -Wformat-security -Wshadow -Wtype-limits -Wvla -Wold-style-declaration -Wno-unknown-pragmas -Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member -std=c99 -fopenmp -mtune=generic -msse2 -g -mfpmath=sse -DNDEBUG -O3 -ffast-math -fno-finite-math-only -fexpensive-optimizations -fPIC -MD -MT bin/CMakeFiles/lib_darktable.dir/version_gen.c.o -MF CMakeFiles/lib_darktable.dir/version_gen.c.o.d -o CMakeFiles/lib_darktable.dir/version_gen.c.o -c /builddir/build/BUILD/darktable-3.8.0/x86_64-redhat-linux-gnu/bin/version_gen.c
as: unrecognized option '--gdwarf-4'

Comment 5 Marek Polacek 2022-02-01 21:17:56 UTC
I think you're missing gcc-toolset-11-binutils.  Please install the needed packages by installing gcc-toolset-11-toolchain.

Not a bug in the toolset.

Comment 6 Marek Polacek 2022-02-01 21:24:01 UTC
Also please make sure you're invoking the toolset tools correctly, e.g.

$ scl enable gcc-toolset-11 bash
# now things should work and use gcc-toolset-11

Comment 7 Germano Massullo 2022-02-01 21:58:42 UTC
Thank you, now everything works

Concerning guide 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/developing_c_and_cpp_applications_in_rhel_8/additional-toolsets-for-development_developing-applications

it should be stressed that users may really want to install gcc-toolset-11-toolchain rather than just gcc-toolset-11.
This could have avoided "false" bugreports like this one

Have a nice day!

Comment 8 Marek Polacek 2022-02-01 22:09:21 UTC
gcc-toolset-11 is actually a superset of gcc-toolset-11-toolchain, so gcc-toolset-11 is the way users should go, generally.

Anyway, I'm glad it works now, and thanks!