ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:95741] [Ruby master Bug#16331] fails to build with BSD make possibly due to race condition
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
@ 2019-11-07  8:04 ` meta
  2019-11-08  3:31 ` [ruby-core:95752] " meta
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: meta @ 2019-11-07  8:04 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been reported by meta@vmeta.jp (Koichiro Iwao).

----------------------------------------
Bug #16331: fails to build with BSD make possibly due to race condition
https://bugs.ruby-lang.org/issues/16331

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```



## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)


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

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

* [ruby-core:95752] [Ruby master Bug#16331] fails to build with BSD make possibly due to race condition
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
  2019-11-07  8:04 ` [ruby-core:95741] [Ruby master Bug#16331] fails to build with BSD make possibly due to race condition meta
@ 2019-11-08  3:31 ` meta
  2019-11-08  8:37 ` [ruby-core:95755] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1) meta
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: meta @ 2019-11-08  3:31 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by meta@vmeta.jp (Koichiro Iwao).


One of the FreeBSD folks Yuichiro NAITO provided more detail.

See comment 13:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633#c13

----------------------------------------
Bug #16331: fails to build with BSD make possibly due to race condition
https://bugs.ruby-lang.org/issues/16331#change-82569

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```



## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)


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

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

* [ruby-core:95755] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
  2019-11-07  8:04 ` [ruby-core:95741] [Ruby master Bug#16331] fails to build with BSD make possibly due to race condition meta
  2019-11-08  3:31 ` [ruby-core:95752] " meta
@ 2019-11-08  8:37 ` meta
  2019-11-09 10:14 ` [ruby-core:95770] " naruse
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: meta @ 2019-11-08  8:37 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by meta@vmeta.jp (Koichiro Iwao).

Subject changed from fails to build with BSD make possibly due to race condition to fails to build with BSD make when any -j option is given (including -j 1)

Now it turned out the build fails even `-j 1` is specified. Any value to `-j` option will fail.
Not giving `-j` option goes fine.

Further information from Yuichiro NAITO:
> 最初にレースコンディションと言っていたのは誤りで
> -j の有無で shell に渡すコマンドの範囲が異なるのが原因でした。
> 基本的にはビルド手順を1行づつ shell に渡すのが本来の make の実装なのですが、
> BSD make は -j オプションをつけると、ビルド手順が複数行ある場合にまとめて shell に渡すようになります。
> そうすると、途中で exec があった場合、残りのコマンドが実行されなくなります。
> Ruby の Makefile では行の最後のコマンドに exec 使うことで、
> 最後の fork(2) 実行を省略しようという意図のように見えます。
> 
> 結局のところ BSD make の互換性問題のように思います。

----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-82572

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```



## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)


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

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

* [ruby-core:95770] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-11-08  8:37 ` [ruby-core:95755] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1) meta
@ 2019-11-09 10:14 ` naruse
  2019-11-10  0:27 ` [ruby-core:95771] " nobu
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: naruse @ 2019-11-09 10:14 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by naruse (Yui NARUSE).


meta@vmeta.jp (Koichiro Iwao) wrote:
> Now it turned out the build fails even `-j 1` is specified. Any value to `-j` option will fail.
> Not giving `-j` option goes fine.
> 
> Further information from Yuichiro NAITO:
> > 最初にレースコンディションと言っていたのは誤りで
> > -j の有無で shell に渡すコマンドの範囲が異なるのが原因でした。
> > 基本的にはビルド手順を1行づつ shell に渡すのが本来の make の実装なのですが、
> > BSD make は -j オプションをつけると、ビルド手順が複数行ある場合にまとめて shell に渡すようになります。
> > そうすると、途中で exec があった場合、残りのコマンドが実行されなくなります。
> > Ruby の Makefile では行の最後のコマンドに exec 使うことで、
> > 最後の fork(2) 実行を省略しようという意図のように見えます。
> > 
> > 結局のところ BSD make の互換性問題のように思います。

It sounds Ruby hits the issue described in `make -B`:
https://www.freebsd.org/cgi/man.cgi?query=make&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html

----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-82585

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8 # any value will cause build failure
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```

## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)


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

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

* [ruby-core:95771] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-11-09 10:14 ` [ruby-core:95770] " naruse
@ 2019-11-10  0:27 ` nobu
  2019-12-04 17:28 ` [ruby-core:96112] " yasu
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: nobu @ 2019-11-10  0:27 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by nobu (Nobuyoshi Nakada).


meta@vmeta.jp (Koichiro Iwao) wrote:
> One of the FreeBSD folks Yuichiro NAITO provided more detail.
> 
> See comment 13:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633#c13

The conditions in libruby-static and libruby-shared are different intentionally.

> First:
  It seems that it is not intended to call $(PRE_LIBRARY_UPDATE) in Ruby's Makefile,
  when libruby.so.26 is built.
  Comparing to libruby-static library build,
  Ruby's Makefile should be fixed like `Makefile.in.patch`.


----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-82587

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8 # any value will cause build failure
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```

## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)


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

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

* [ruby-core:96112] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2019-11-10  0:27 ` [ruby-core:95771] " nobu
@ 2019-12-04 17:28 ` yasu
  2019-12-22 10:02 ` [ruby-core:96404] " yasu
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: yasu @ 2019-12-04 17:28 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by yasuhirokimura (Yasuhiro KIMURA).


Are there plan to merge this fix to ruby_2_6 branch?

----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-82971

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8 # any value will cause build failure
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```

## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)


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

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

* [ruby-core:96404] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2019-12-04 17:28 ` [ruby-core:96112] " yasu
@ 2019-12-22 10:02 ` yasu
  2019-12-22 12:38 ` [ruby-core:96407] " nobu
  2020-01-27  6:37 ` [ruby-core:97003] " meta
  8 siblings, 0 replies; 9+ messages in thread
From: yasu @ 2019-12-22 10:02 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by yasuhirokimura (Yasuhiro KIMURA).

File buildtest-with-bmake-and-j-option.log added

I executed following shell script on my FreeBSD test environment and got attached log file.

``` shell
#!/bin/sh

LANG=C
(
    echo System Information:
    echo ----------------------------------------------------------------------
    dmesg
    echo ----------------------------------------------------------------------
    echo Package Information:
    echo ----------------------------------------------------------------------
    pkg info -aq
    echo ----------------------------------------------------------------------
    cd /tmp
    for ver in 2.6.5 2.7.0-rc2
    do
        echo Test build of ${ver}:
        tar xfpJ /net/freebsd/ports/distfiles/ruby/ruby-${ver}.tar.xz
        cd ruby-${ver}
        echo Configure:
        echo ----------------------------------------------------------------------
        ./configure
        echo ----------------------------------------------------------------------
        echo Build:
        echo ----------------------------------------------------------------------
        make -j $(sysctl -n kern.smp.cpus)
        echo ----------------------------------------------------------------------
        cd ..
        rm -rf ruby-${ver}
    done
) | 2>&1 tee buildtest-with-bmake-and-j-option.log
```

As you can see, `make -j` works fine with 2.6.5 but fails with 2.7.0-rc2.


----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-83329

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8 # any value will cause build failure
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```

## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)
buildtest-with-bmake-and-j-option.log (202 KB)


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

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

* [ruby-core:96407] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2019-12-22 10:02 ` [ruby-core:96404] " yasu
@ 2019-12-22 12:38 ` nobu
  2020-01-27  6:37 ` [ruby-core:97003] " meta
  8 siblings, 0 replies; 9+ messages in thread
From: nobu @ 2019-12-22 12:38 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by nobu (Nobuyoshi Nakada).


Does this log mean the following libraries are stopped by `make` due to the first failure in `cxxanyargs` or in yet another branch?

> ```
> --- ext/-test-/cxxanyargs/all ---
> A failure has been detected in another branch of the parallel make
> 
> make[2]: stopped in /tmp/ruby-2.7.0-rc2/ext/-test-/cxxanyargs
> *** [ext/-test-/cxxanyargs/all] Error code 2
> 
> make[1]: stopped in /tmp/ruby-2.7.0-rc2
> --- ext/-test-/exception/all ---
> A failure has been detected in another branch of the parallel make
> 
> make[2]: stopped in /tmp/ruby-2.7.0-rc2/ext/-test-/exception
> *** [ext/-test-/exception/all] Error code 2
> 
> make[1]: stopped in /tmp/ruby-2.7.0-rc2
> --- ext/-test-/enumerator_kw/all ---
> A failure has been detected in another branch of the parallel make
> 
> make[2]: stopped in /tmp/ruby-2.7.0-rc2/ext/-test-/enumerator_kw
> *** [ext/-test-/enumerator_kw/all] Error code 2
> 
> make[1]: stopped in /tmp/ruby-2.7.0-rc2
> --- ext/psych/all ---
> A failure has been detected in another branch of the parallel make
> 
> make[2]: stopped in /tmp/ruby-2.7.0-rc2/ext/psych
> *** [ext/psych/all] Error code 2
> 
> make[1]: stopped in /tmp/ruby-2.7.0-rc2
> 4 errors
> 
> make[1]: stopped in /tmp/ruby-2.7.0-rc2
> *** [build-ext] Error code 2
> ```

----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-83332

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8 # any value will cause build failure
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```

## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)
buildtest-with-bmake-and-j-option.log (202 KB)


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

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

* [ruby-core:97003] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
       [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2019-12-22 12:38 ` [ruby-core:96407] " nobu
@ 2020-01-27  6:37 ` meta
  8 siblings, 0 replies; 9+ messages in thread
From: meta @ 2020-01-27  6:37 UTC (permalink / raw)
  To: ruby-core

Issue #16331 has been updated by meta@vmeta.jp (Koichiro Iwao).

Status changed from Closed to Feedback
File buildtest-with-gmake-and-j-option.log added
File buildtest-with-bmake-and-j-option.log added

It is not fixed yet for me, too.

I attach ruby-{2.6.5,2.7.0} build result with {BSD,GNU} make.

----------------------------------------
Bug #16331: fails to build with BSD make when any -j option is given (including -j 1)
https://bugs.ruby-lang.org/issues/16331#change-84092

* Author: meta@vmeta.jp (Koichiro Iwao)
* Status: Feedback
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.5
* Backport: 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
When building Ruby parallely with BSD make (FreeBSD make), it fails to build.
Reported by FreeBSD Ruby folks. Please keep in mind I didn't find out the root cause.

OS: FreeBSD 12-STABLE
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241633

## How to reproduce
```
tar xf ruby-2.6.5.tar.gz
cd ruby-2.6.5
./configure --enable-shared --disable-readline --disable-libedit
make -j 8 # any value will cause build failure
(snip)
configuring -test-/st/numhash
configuring -test-/st/update
--- enc ---
ld: error: unable to find library -lruby
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- exts.mk ---
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
--- enc ---
*** [.ext/x86_64-freebsd12.1/enc/encdb.so] Error code 1
```

## BSD make without -j option: success
```
cd ruby-2.6.5
make distclean
./configure --enable-shared --disable-readline --disable-libedit
make
`ruby' is up to date.
*** Following extensions are not compiled:
readline:
	Could not be configured. It will not be installed.
	/home/sair/tmp/ruby-2.6.5/ext/readline/extconf.rb:52: readline not found
	Check ext/readline/mkmf.log for more details.
gdbm:
	Could not be configured. It will not be installed.
	Check ext/gdbm/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
making enc
making trans
`trans' is up to date.
making encs
Generating RDoc documentation
```

## Using GNU make: success

```
cd ruby-2.6.5
export MAKE=gmake # GNU make
make distclean
./configure --enable-shared --disable-readline --disable-libedit
$MAKE -j 8
```

---Files--------------------------------
ruby-bsdmake.log (13.9 KB)
buildtest-with-bmake-and-j-option.log (202 KB)
buildtest-with-bmake-and-j-option.log (101 KB)
buildtest-with-gmake-and-j-option.log (220 KB)


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

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

end of thread, other threads:[~2020-01-27  6:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-16331.20191107080425@ruby-lang.org>
2019-11-07  8:04 ` [ruby-core:95741] [Ruby master Bug#16331] fails to build with BSD make possibly due to race condition meta
2019-11-08  3:31 ` [ruby-core:95752] " meta
2019-11-08  8:37 ` [ruby-core:95755] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1) meta
2019-11-09 10:14 ` [ruby-core:95770] " naruse
2019-11-10  0:27 ` [ruby-core:95771] " nobu
2019-12-04 17:28 ` [ruby-core:96112] " yasu
2019-12-22 10:02 ` [ruby-core:96404] " yasu
2019-12-22 12:38 ` [ruby-core:96407] " nobu
2020-01-27  6:37 ` [ruby-core:97003] " meta

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).