ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:50373] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
@ 2017-12-20  3:11 ` tyamada
  2017-12-20  3:25 ` [ruby-dev:50374] " her
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: tyamada @ 2017-12-20  3:11 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been reported by minimum2scp (Tsuyoshi YAMADA).

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50374] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
  2017-12-20  3:11 ` [ruby-dev:50373] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI tyamada
@ 2017-12-20  3:25 ` her
  2017-12-20  3:39 ` [ruby-dev:50375] " tyamada
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: her @ 2017-12-20  3:25 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by sorah (Sorah Fukumori).


手元で大丈夫な時の Linux カーネルバージョンって 4.5 以降ですかね?

Ubuntu 16.04 および CircleCI (v2) は 4.4.0 系なので当該システムコールは動かないものの、Debian 9.x はそれより新しいのを想定しているはずなので、
まあちゃんと configure で見ましょうという感じがするな…。

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68537

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50375] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
  2017-12-20  3:11 ` [ruby-dev:50373] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI tyamada
  2017-12-20  3:25 ` [ruby-dev:50374] " her
@ 2017-12-20  3:39 ` tyamada
  2017-12-20  7:55 ` [ruby-dev:50376] " her
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: tyamada @ 2017-12-20  3:39 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by minimum2scp (Tsuyoshi YAMADA).


sorah (Sorah Fukumori) wrote:
> 手元で大丈夫な時の Linux カーネルバージョンって 4.5 以降ですかね?

はい、4.5 以降です。

~~~
tsuyoshi@wezen% uname -a
Linux wezen 4.14.0-1-amd64 #1 SMP Debian 4.14.2-1 (2017-11-30) x86_64 GNU/Linux
~~~



----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68538

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50376] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2017-12-20  3:39 ` [ruby-dev:50375] " tyamada
@ 2017-12-20  7:55 ` her
  2017-12-20  8:11 ` [ruby-dev:50377] " her
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: her @ 2017-12-20  7:55 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by sorah (Sorah Fukumori).


1. ビルド環境にある unistd の  __NR_copy_file_range のマクロの有無だけで判断している
2. ユーザーランドにある unistd は Docker 等コンテナホスト側のカーネルのバージョンなんて知らない
3. ビルドは copy_file_range システムコールが使えるものと信じて進行する
4. しかしビルドされたところでそんなシステムコールは存在しない訳なのでエラーになる
   - `docker run --privileged` 下の場合は ENOSYS になる
   - 通常の権限が絞られた Docker コンテナーの場合ここで EPERM になる (!) どうしようもない。

その他 sendfile 等も同様に実装されているけれど、これらはかなり古いカーネルから存在するので実用上問題になってないと推測される

どうしましょうね…。

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68542

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50377] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2017-12-20  7:55 ` [ruby-dev:50376] " her
@ 2017-12-20  8:11 ` her
  2017-12-20  8:26 ` [ruby-dev:50378] " her
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: her @ 2017-12-20  8:11 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by sorah (Sorah Fukumori).


補足すると、ビルド時 configure チェックしたところで結局新しいユーザーランドのパッケージマネージャから降ってくるバイナリはそういうのが含まれる可能性が高いので難しい話になってきた。

個人的にはホストより新しいカーネルを期待しているユーザーランドをコンテナで動かさないでください、という話になりそうで 3rd party issue にしたい気持ちが若干あります。
(本件、CircleCI って事で難易度たかそうですが…)

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68543

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50378] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2017-12-20  8:11 ` [ruby-dev:50377] " her
@ 2017-12-20  8:26 ` her
  2017-12-20  8:27 ` [ruby-dev:50379] " her
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: her @ 2017-12-20  8:26 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by sorah (Sorah Fukumori).

File 14207.patch added

copy_file_range の man みる限り EPERM は来なそうなので、こういう救いかたは出来ない事はないのだけれど…。

やはりその環境だと apt-get で降ってくるバイナリとかも同じ目にあいそうな気がするので Ruby だけで救うっていうのもなんかなーという気持ちがありますね。

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68544

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)
14207.patch (1.23 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50379] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2017-12-20  8:26 ` [ruby-dev:50378] " her
@ 2017-12-20  8:27 ` her
  2017-12-22  8:25 ` [ruby-dev:50381] [Ruby trunk Bug#14207][Assigned] " glass.saga
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: her @ 2017-12-20  8:27 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by sorah (Sorah Fukumori).

File 14207.patch added

patch にゴミが混ざっていたので差し替え

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68546

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)
14207.patch (824 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50381] [Ruby trunk Bug#14207][Assigned] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2017-12-20  8:27 ` [ruby-dev:50379] " her
@ 2017-12-22  8:25 ` glass.saga
  2017-12-22  8:52 ` [ruby-dev:50382] [Ruby trunk Bug#14207] " glass.saga
  2017-12-22 14:03 ` [ruby-dev:50383] " tyamada
  9 siblings, 0 replies; 10+ messages in thread
From: glass.saga @ 2017-12-22  8:25 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by Glass_saga (Masaki Matsushita).

Status changed from Open to Assigned
Assignee set to Glass_saga (Masaki Matsushita)
Target version set to 2.5

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68589

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Assigned
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 2.5
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)
14207.patch (824 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50382] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2017-12-22  8:25 ` [ruby-dev:50381] [Ruby trunk Bug#14207][Assigned] " glass.saga
@ 2017-12-22  8:52 ` glass.saga
  2017-12-22 14:03 ` [ruby-dev:50383] " tyamada
  9 siblings, 0 replies; 10+ messages in thread
From: glass.saga @ 2017-12-22  8:52 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by Glass_saga (Masaki Matsushita).


バグレポートありがとうございます。
copy_file_range(2)でerrnoがEPERMだった場合は、sendfile(2)またはread/writeにフォールバックする実装にしました。
これで修正できているかと思います。

----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68592

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Closed
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 2.5
* ruby -v: 2.5.0-rc1
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)
14207.patch (824 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [ruby-dev:50383] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI
       [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
                   ` (8 preceding siblings ...)
  2017-12-22  8:52 ` [ruby-dev:50382] [Ruby trunk Bug#14207] " glass.saga
@ 2017-12-22 14:03 ` tyamada
  9 siblings, 0 replies; 10+ messages in thread
From: tyamada @ 2017-12-22 14:03 UTC (permalink / raw)
  To: ruby-dev

Issue #14207 has been updated by minimum2scp (Tsuyoshi YAMADA).


ありがとうございます。
CircleCIのDocker上で最新の trunk をビルドできることと、
2.5.0-rc1 に r61412 のパッチを当てる方法でもビルドできることを確認しました。


----------------------------------------
Bug #14207: Failed to build 2.5.0-rc1 on CircleCI
https://bugs.ruby-lang.org/issues/14207#change-68598

* Author: minimum2scp (Tsuyoshi YAMADA)
* Status: Closed
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
* Target version: 2.5
* ruby -v: 2.5.0-rc1
* Backport: 2.3: DONTNEED, 2.4: DONTNEED
----------------------------------------
CircleCI の docker 上で ruby 2.5.0-rc1 をビルドしてみたらエラーになりました。

make 時に多くの拡張ライブラリが "Could not be configured. It will not be installed" となっていて、
fileutilsで "Operation not permitted - copy_file_range" というメッセージが出ていました。

~~~
linking ruby
make[2]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Leaving directory '/tmp/ruby-2.5.0-rc1'
make[1]: Entering directory '/tmp/ruby-2.5.0-rc1'
*** Following extensions are not compiled:
dbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/dbm/mkmf.log for more details.
io/console:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/io/console/mkmf.log for more details.
io/nonblock:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/nonblock/mkmf.log for more details.
io/wait:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/mkmf.rb:309: closed stream
    Check ext/io/wait/mkmf.log for more details.
etc:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/etc/mkmf.log for more details.

(snip)

readline:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/readline/mkmf.log for more details.
gdbm:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:441: Operation not permitted - copy_file_range
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
~~~

また、 make install から呼ばれる do-install-nodoc ターゲットでも
"Operation not permitted - copy_file_range (Errno::EPERM)" のメッセージが
バックトレースとともに出ていました。

~~~
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="man"
installing binary commands:         /usr/local/ruby-2.5.0-rc1/bin
/tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `copy_stream': Operation not permitted - copy_file_range (Errno::EPERM)
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1291:in `block (2 levels) in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1290:in `block in copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `open'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1289:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:430:in `copy_file'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:782:in `block in install'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1475:in `fu_each_src_dest0'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:1459:in `fu_each_src_dest'
    from /tmp/ruby-2.5.0-rc1/lib/fileutils.rb:778:in `install'
    from ./tool/rbinstall.rb:167:in `install'
    from ./tool/rbinstall.rb:346:in `block in <main>'
    from ./tool/rbinstall.rb:853:in `block in <main>'
    from ./tool/rbinstall.rb:850:in `each'
    from ./tool/rbinstall.rb:850:in `<main>'
uncommon.mk:312: recipe for target 'do-install-nodoc' failed
~~~

この現象は、ビルドする対象を2.5.0-preview1に変更すると起きませんでした。
また、ローカルPC (Debian) の Docker では 2.5.0-rc1 でも 2.5.0-preview1 でも問題なくビルドできました。

CircleCI 上で git bisect して調べてみると、 r60284 で発生するようになったようです。

CircleCIでのビルド時のログと、再現のための Dockerfile, .circleci/config.yml を添付します。

---Files--------------------------------
build-2.5.0-rc1.log (85.8 KB)
Dockerfile (520 Bytes)
config.yml (319 Bytes)
14207.patch (824 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-12-22 14:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-14207.20171220031135@ruby-lang.org>
2017-12-20  3:11 ` [ruby-dev:50373] [Ruby trunk Bug#14207] Failed to build 2.5.0-rc1 on CircleCI tyamada
2017-12-20  3:25 ` [ruby-dev:50374] " her
2017-12-20  3:39 ` [ruby-dev:50375] " tyamada
2017-12-20  7:55 ` [ruby-dev:50376] " her
2017-12-20  8:11 ` [ruby-dev:50377] " her
2017-12-20  8:26 ` [ruby-dev:50378] " her
2017-12-20  8:27 ` [ruby-dev:50379] " her
2017-12-22  8:25 ` [ruby-dev:50381] [Ruby trunk Bug#14207][Assigned] " glass.saga
2017-12-22  8:52 ` [ruby-dev:50382] [Ruby trunk Bug#14207] " glass.saga
2017-12-22 14:03 ` [ruby-dev:50383] " tyamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).