Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-49714

Name collision between binaries and directories prevents linking with ld on RHEL 8

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-8.9.0
    • cmake
    • None
    • Yes
    • None
    • Patch, Regression
    • rhel-sst-pt-llvm-rust-go
    • ssg_platform_tools
    • 3
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • x86_64
    • None

      A name collision between binaries and directories prevents linking with ld provided by binutils-2.30-123.el8. Such collisions did not prevent linking (or did not occur) in older versions of binutils on RHEL 8.

      The following quotation is from the build log I quoted when I opened the issue in our internal tracker; those logs are not available any longer, but I submitted another build on RHEL 8 and the new logs are attached for two different software versions (SLiM-4.2.1-2 and SLiM-4.2.2.-1).

       

      [ 48%] Linking CXX executable eidos
      /usr/bin/cmake -E cmake_link_script CMakeFiles/eidos.dir/link.txt --verbose=1
      /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 -std=c++11 -Wno-attributes -Wunused-label -Wunused-variable -Wunused-value -Wno-pragmas -Wempty-body -Wshadow -Wparentheses -Wswitch -Wsign-compare -Wno-sign-conversion -Wuninitialized -fno-math-errno -DNDEBUG -O3 -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -rdynamic CMakeFiles/eidos.dir/eidos/eidos_ast_node.cpp.o CMakeFiles/eidos.dir/eidos/eidos_beep.cpp.o CMakeFiles/eidos.dir/eidos/eidos_call_signature.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_DataFrame.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_Dictionary.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_Image.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_Object.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_TestElement.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_colors.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_distributions.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_files.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_math.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_matrices.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_other.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_stats.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_strings.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_values.cpp.o CMakeFiles/eidos.dir/eidos/eidos_globals.cpp.o CMakeFiles/eidos.dir/eidos/eidos_interpreter.cpp.o CMakeFiles/eidos.dir/eidos/eidos_property_signature.cpp.o CMakeFiles/eidos.dir/eidos/eidos_rng.cpp.o CMakeFiles/eidos.dir/eidos/eidos_script.cpp.o CMakeFiles/eidos.dir/eidos/eidos_sorting.cpp.o CMakeFiles/eidos.dir/eidos/eidos_symbol_table.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_math.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_other.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_statistics.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_vector.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_operators_arithmetic.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_operators_comparison.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_operators_other.cpp.o CMakeFiles/eidos.dir/eidos/eidos_token.cpp.o CMakeFiles/eidos.dir/eidos/eidos_type_interpreter.cpp.o CMakeFiles/eidos.dir/eidos/eidos_type_table.cpp.o CMakeFiles/eidos.dir/eidos/eidos_value.cpp.o CMakeFiles/eidos.dir/eidos/lodepng.cpp.o CMakeFiles/eidos.dir/eidostool/main.cpp.o -o eidos  libgsl.a libeidos_zlib.a libtables.a 
      /usr/bin/ld: cannot open output file eidos: Is a directory
      collect2: error: ld returned 1 exit status 

       

      The following is the linking error when attempting to build SLiM-4.2.2-1 on the release version of RHEL 8 that COPR is using as of 2024-07-18. The full build log is available here.

       

      [ 61%] Linking CXX executable eidos
      /usr/bin/cmake -E cmake_link_script CMakeFiles/eidos.dir/link.txt --verbose=1
      /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 -std=c++11 -Wno-attributes -Wunused-label -Wunused-variable -Wunused-value -Wno-pragmas -Wempty-body -Wshadow -Wparentheses -Wswitch -Wsign-compare -Wno-sign-conversion -Wuninitialized -fno-math-errno -DNDEBUG -O3 -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -rdynamic CMakeFiles/eidos.dir/eidos/eidos_ast_node.cpp.o CMakeFiles/eidos.dir/eidos/eidos_beep.cpp.o CMakeFiles/eidos.dir/eidos/eidos_call_signature.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_DataFrame.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_Dictionary.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_Image.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_Object.cpp.o CMakeFiles/eidos.dir/eidos/eidos_class_TestElement.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_colors.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_distributions.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_files.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_math.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_matrices.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_other.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_stats.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_strings.cpp.o CMakeFiles/eidos.dir/eidos/eidos_functions_values.cpp.o CMakeFiles/eidos.dir/eidos/eidos_globals.cpp.o CMakeFiles/eidos.dir/eidos/eidos_interpreter.cpp.o CMakeFiles/eidos.dir/eidos/eidos_property_signature.cpp.o CMakeFiles/eidos.dir/eidos/eidos_rng.cpp.o CMakeFiles/eidos.dir/eidos/eidos_script.cpp.o CMakeFiles/eidos.dir/eidos/eidos_sorting.cpp.o CMakeFiles/eidos.dir/eidos/eidos_symbol_table.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_math.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_other.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_statistics.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_functions_vector.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_operators_arithmetic.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_operators_comparison.cpp.o CMakeFiles/eidos.dir/eidos/eidos_test_operators_other.cpp.o CMakeFiles/eidos.dir/eidos/eidos_token.cpp.o CMakeFiles/eidos.dir/eidos/eidos_type_interpreter.cpp.o CMakeFiles/eidos.dir/eidos/eidos_type_table.cpp.o CMakeFiles/eidos.dir/eidos/eidos_value.cpp.o CMakeFiles/eidos.dir/eidos/lodepng.cpp.o CMakeFiles/eidos.dir/eidostool/main.cpp.o -o eidos  libgsl.a libeidos_zlib.a libtables.a 
      /usr/bin/ld: cannot open output file eidos: Is a directory
      collect2: error: ld returned 1 exit status 

       

      Building an RPM on RHEL 8 (using COPR) fails because of a name collision linking error. We are tracking the issue on GitHub. The linking issue previously did not exist on EPEL 8, and when CentOS was marked EOL on COPR we started building for RHEL 8 directly in addition to EPEL 8 (which is no longer built with CentOS, as far as I'm aware).

      The package NVR is: binutils-2.30-123.el8

      I am able to reproduce the issue with the current release version of RHEL 8 that COPR uses to build RPMs.

      Steps to reproduce

      1. Download the released sources from SLiM: https://github.com/MesserLab/SLiM/archive/refs/tags/v4.2.2.tar.gz
      2. Build the binary RPM on RHEL 8

      Linking should complete without issue, as with ld provided by earlier versions of binutils.

      Linking during the build fails with a regression in binutils-2.30-123.el8 provided ld (the GNU linker).

       

      I suggest the following epic: RHEL 8.10.0 should release fixes and feature additions to the system compiler (GCC) and related components.

        1. SLiM-4.2.2-1.builder-live.log.gz
          329 kB
        2. SLiM-4.2.2.tar.gz
          9.21 MB
        3. SLiM-4.2.1-2.builder-live.log.gz
          144 kB
        4. SLiM-4.2.1.tar.gz
          9.21 MB
        5. SLiM-4.0.1.tar.gz
          8.37 MB
        6. rhel-9-x86_64_07411703-SLiM_builder-live.log.gz
          415 kB
        7. rhel-8-x86_64_07749868-SLiM_builder-live.log-1.gz
          329 kB
        8. rhel-8-x86_64_07749868-SLiM_builder-live.log.gz
          329 kB
        9. builder-live.log-1.gz
          329 kB
        10. builder-live.log.gz
          415 kB

              tstellar@redhat.com Thomas Stellard
              bryce-carson Bryce Carson (Inactive)
              Thomas Stellard Thomas Stellard
              qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: