[ruby-core:96407] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-83332.20191222123844.db4855cfbcd3984f@ruby-lang.org>
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: [email protected] (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/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.