Create RUBYCOMMONDIR directory and .RUBYCOMMONDIR.time file in advance.#2669
Create RUBYCOMMONDIR directory and .RUBYCOMMONDIR.time file in advance.#2669junaruga wants to merge 2 commits into
RUBYCOMMONDIR directory and .RUBYCOMMONDIR.time file in advance.#2669Conversation
|
Travis is okay. |
…vance.
Create `RUBYCOMMONDIR` (`.ext/common`) `.ext/.timestamp/.RUBYCOMMONDIR.time`
file in `common.mk` before building extensions.
This prevents following error in `make install`.
Because `$(TIMESTAMP_DIR)/.RUBYCOMMONDIR.time` file can be touched more than
2 times by each `ext/**/Makefile` `$(TIMESTAMP_DIR)/.RUBYCOMMONDIR.time` task
in case of `make -jN`.
```
$ make -jN
```
`ext/**/Makefile`
```
$(TIMESTAMP_DIR)/.RUBYCOMMONDIR.time:
$(Q) $(MAKEDIRS) $(@d) $(RUBYLIBDIR)
$(Q) $(TOUCH) $@
```
This causes "Permission defined" error like https://travis-ci.org/ruby/ruby/jobs/606916890#L2412 .
```
$ make install
...
Prerequisite '../../.ext/.timestamp/.RUBYCOMMONDIR.time' is newer than target '../../.ext/common/json.rb'.
...
cp ../../../ext/json/lib/json.rb ../../.ext/common
cp: cannot create regular file '../../.ext/common/json.rb': Permission denied
=> ../../.ext/common/json.rb already exists as permission 444 (-r--r--r--).
...
```
The `template/Makefile.in` `TOUCH` definition comes from `lib/mkmf.rb` `TOUCH`.
0f6ea0c to
3bd3b6a
Compare
|
Rebsaed on the latest master branch. |
|
I believe it's Travis-specific issue. Do you have any other ideas to fix the issue without touching the build system ( |
Why do you think so? I think the reason of the error is For example. In Then In So, this issue can be happened when running But if you want to fix the issue without touching the build system ( Or run |
|
Thank you for the report. |
|
Thank you for your fixing. Seeing your commit: fb02e31 . Now I understand that there has already been the similar logic for And my modification was not at a proper place and was not the proper way in it. Seeing https://travis-ci.org/ruby/ruby/builds after the commit, arm64-linux case is 100% success 4 times. I think that it's time to remove arm64 from allow_failures again adapting this commit. |
I sent PR for that. |
It's to fix the failure in Travis arm64.
This PR is pointed out from https://bugs.ruby-lang.org/issues/16234 .
I tested it 3 times on my forked repository's Travis. And it was okay.
Create
RUBYCOMMONDIR(.ext/common).ext/.timestamp/.RUBYCOMMONDIR.timefile in
common.mkbefore building extensions.This prevents following error in
make install.Because
$(TIMESTAMP_DIR)/.RUBYCOMMONDIR.timefile can be touched more than2 times by each
ext/**/Makefile$(TIMESTAMP_DIR)/.RUBYCOMMONDIR.timetaskin case of
make -jN.ext/**/MakefileThis causes "Permission defined" error like https://travis-ci.org/ruby/ruby/jobs/606916890#L2412 .
The
template/Makefile.inTOUCHdefinition comes fromlib/mkmf.rbTOUCH.