Bug 1965078 - "file INSTALL cannot set modification time on" on i686
Summary: "file INSTALL cannot set modification time on" on i686
Keywords:
Status: CLOSED DUPLICATE of bug 1965360
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cmake
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Tom Stellard
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-26 18:55 UTC by Vít Ondruch
Modified: 2021-09-20 08:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-27 14:46:29 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Vít Ondruch 2021-05-26 18:55:46 UTC
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

Comment 1 Vít Ondruch 2021-05-26 19:33:42 UTC
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

Comment 2 Vít Ondruch 2021-05-27 09:03:22 UTC
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
~~~

Comment 3 Vít Ondruch 2021-05-27 10:30:00 UTC
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`

Comment 4 Vít Ondruch 2021-05-27 10:40:32 UTC
@Florian sorry for bothering you, but does this sound familiar to you by a chance?

Comment 5 Florian Weimer 2021-05-27 11:02:04 UTC
I think we should continue the conversion on the RHELBLD ticket. It's probably another kernel bug.

Comment 6 Florian Weimer 2021-05-27 14:46:29 UTC

*** This bug has been marked as a duplicate of bug 1965360 ***


Note You need to log in before you can comment on or make changes to this bug.