ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / Atom feed
From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:95771] [Ruby master Bug#16331] fails to build with BSD make when any -j option is given (including -j 1)
Date: Sun, 10 Nov 2019 00:27:10 +0000 (UTC)
Message-ID: <redmine.journal-82587.20191110002709.144289e10ec7135c@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-16331.20191107080425@ruby-lang.org>

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/

      parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 ` nobu [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-82587.20191110002709.144289e10ec7135c@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ruby-core@ruby-lang.org archive (unofficial mirror)

Archives are clonable: git clone --mirror https://public-inbox.org/ruby-core

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.core
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.core
	nntp://news.gmane.org/gmane.comp.lang.ruby.core

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git