Description of problem: Trying to build Ruby on RHEL9 [1], I am facing issues on i686 with one of the test cases: ~~~ 1) Error: TestGemExtCmakeBuilder#test_self_build: Gem::InstallError: make install failed, exit code 2 /builddir/build/BUILD/ruby-3.0.0/lib/rubygems/ext/builder.rb:90:in `run' /builddir/build/BUILD/ruby-3.0.0/lib/rubygems/ext/builder.rb:42:in `block in make' /builddir/build/BUILD/ruby-3.0.0/lib/rubygems/ext/builder.rb:34:in `each' /builddir/build/BUILD/ruby-3.0.0/lib/rubygems/ext/builder.rb:34:in `make' /builddir/build/BUILD/ruby-3.0.0/lib/rubygems/ext/cmake_builder.rb:13:in `build' /builddir/build/BUILD/ruby-3.0.0/test/rubygems/test_gem_ext_cmake_builder.rb:39:in `test_self_build' ~~~ Digging into this, the reproducer seems to be: ~~~ mkdir -p tmp/test_rubygems_3803205/ext pushd tmp/test_rubygems_3803205/ext cat <<EO_CMAKE > CMakeLists.txt cmake_minimum_required(VERSION 2.6) project(self_build NONE) install (FILES test.txt DESTINATION bin) EO_CMAKE touch test.txt cmake . -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix make "DESTDIR=" clean cmake . -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix make "DESTDIR=" clean make "DESTDIR=" cmake . -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix make "DESTDIR=" clean make "DESTDIR=" make "DESTDIR=" install popd ~~~ Interestingly, while this fails in Brew [2], I cannot reproduce it locally. Not really sure what might be the reason. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: CMake test case fails on i686. Expected results: CMake test case passes on all architectures. Additional info: [1] https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=36998991 [2] https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37001583
BTW I have also reported this against Brew, since I can't reproduce it locally and even c9s Koji seems fine: https://projects.engineering.redhat.com/browse/RHELBLD-6038
I should have include the relevant part of the log: ~~~ + mkdir -p tmp/test_rubygems_3803205/ext + pushd tmp/test_rubygems_3803205/ext ~/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/ext ~/build/BUILD/ruby-3.0.0 + cat + touch test.txt + cmake . -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- Configuring done -- Generating done -- Build files have been written to: /builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/ext + make DESTDIR= clean + cmake . -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- Configuring done -- Generating done -- Build files have been written to: /builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/ext + make DESTDIR= clean + make DESTDIR= + cmake . -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument <min> value or use a ...<max> suffix to tell CMake that the project does not need compatibility with older versions. -- Configuring done -- Generating done -- Build files have been written to: /builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/ext + make DESTDIR= clean + make DESTDIR= + make DESTDIR= install Install the project... -- Install configuration: "" -- Installing: /builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix/bin/test.txt CMake Error at cmake_install.cmake:41 (file): file INSTALL cannot set modification time on "/builddir/build/BUILD/ruby-3.0.0/tmp/test_rubygems_3803205/prefix/bin/test.txt": Invalid argument. make: *** [Makefile:81: install] Error 1 ~~~
It seems the error comes from here: https://gitlab.kitware.com/cmake/cmake/-/blob/v3.19.7/Source/cmFileCopier.cxx#L616-622 https://gitlab.kitware.com/cmake/cmake/-/blob/v3.19.7/Source/cmFileTimes.cxx#L125-129 And I suspect that the `stat` call is the real culprit, returning `EINVAL`
@Florian sorry for bothering you, but does this sound familiar to you by a chance?
I think we should continue the conversion on the RHELBLD ticket. It's probably another kernel bug.
*** This bug has been marked as a duplicate of bug 1965360 ***