[#106355] [Ruby master Bug#18373] RBS build failure: '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'. — "vo.x (Vit Ondruch)" <noreply@...>

Issue #18373 has been reported by vo.x (Vit Ondruch).

28 messages 2021/12/01

[#106356] [Ruby master Bug#18374] make: Circular spec/ruby/optional/capi/ext/array_spec.c <- spec/ruby/optional/capi/ext/array_spec.c dependency dropped. — "vo.x (Vit Ondruch)" <noreply@...>

Issue #18374 has been reported by vo.x (Vit Ondruch).

8 messages 2021/12/01

[#106360] [Ruby master Feature#18376] Version comparison API — "vo.x (Vit Ondruch)" <noreply@...>

Issue #18376 has been reported by vo.x (Vit Ondruch).

28 messages 2021/12/01

[#106543] [Ruby master Bug#18396] An unexpected "hash value omission" syntax error when parentheses call expr follows — "koic (Koichi ITO)" <noreply@...>

Issue #18396 has been reported by koic (Koichi ITO).

10 messages 2021/12/08

[#106596] [Ruby master Misc#18399] DevMeeting-2022-01-13 — "mame (Yusuke Endoh)" <noreply@...>

Issue #18399 has been reported by mame (Yusuke Endoh).

11 messages 2021/12/09

[#106621] [Ruby master Misc#18404] 3.1 documentation problems tracking ticket — "zverok (Victor Shepelev)" <noreply@...>

Issue #18404 has been reported by zverok (Victor Shepelev).

16 messages 2021/12/11

[#106634] [Ruby master Bug#18407] Behavior difference between integer and string flags to File creation — deivid <noreply@...>

Issue #18407 has been reported by deivid (David Rodr鱈guez).

12 messages 2021/12/13

[#106644] [Ruby master Bug#18408] Rightward assignment into instance variable — "Dan0042 (Daniel DeLorme)" <noreply@...>

Issue #18408 has been reported by Dan0042 (Daniel DeLorme).

23 messages 2021/12/13

[#106686] [Ruby master Bug#18409] Crash (free(): invalid pointer) if LD_PRELOAD doesn't explicitly include libjemalloc.so.2 — "itay-grudev (Itay Grudev)" <noreply@...>

Issue #18409 has been reported by itay-grudev (Itay Grudev).

7 messages 2021/12/15

[#106730] [Ruby master Bug#18417] IO::Buffer problems — "zverok (Victor Shepelev)" <noreply@...>

Issue #18417 has been reported by zverok (Victor Shepelev).

9 messages 2021/12/19

[#106784] [CommonRuby Feature#18429] Configure ruby-3.0.3 on Solaris 10 Unknown keyword 'URL' in './ruby.tmp.pc' — "dklein (Dmitri Klein)" <noreply@...>

Issue #18429 has been reported by dklein (Dmitri Klein).

32 messages 2021/12/23

[#106828] [Ruby master Bug#18435] Calling `protected` on ancestor method changes result of `instance_methods(false)` — "ufuk (Ufuk Kayserilioglu)" <noreply@...>

Issue #18435 has been reported by ufuk (Ufuk Kayserilioglu).

23 messages 2021/12/26

[#106833] [Ruby master Feature#18438] Add `Exception#additional_message` to show additional error information — "mame (Yusuke Endoh)" <noreply@...>

Issue #18438 has been reported by mame (Yusuke Endoh).

30 messages 2021/12/27

[#106834] [Ruby master Bug#18439] Support YJIT for VC++ — "usa (Usaku NAKAMURA)" <noreply@...>

Issue #18439 has been reported by usa (Usaku NAKAMURA).

11 messages 2021/12/27

[#106851] [Ruby master Bug#18442] Make Ruby 3.0.3 on Solaris 10 with "The following command caused the error: cc -D_STDC_C99= " — "dklein (Dmitri Klein)" <noreply@...>

Issue #18442 has been reported by dklein (Dmitri Klein).

8 messages 2021/12/27

[#106928] [Ruby master Bug#18454] YJIT slowing down key Discourse benchmarks — "sam.saffron (Sam Saffron)" <noreply@...>

Issue #18454 has been reported by sam.saffron (Sam Saffron).

8 messages 2021/12/31

[ruby-core:106714] [Ruby master Bug#18373] RBS build failure: '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'.

From: "vo.x (Vit Ondruch)" <noreply@...>
Date: 2021-12-16 16:23:24 UTC
List: ruby-core #106714
Issue #18373 has been updated by vo.x (Vit Ondruch).


I am not sure who to really blame. The place where it goes quite wrong is actually mkmf, somewhere around [here](https://github.com/ruby/ruby/blob/fff058a8d6c2e5d7c3529484a1c9a636dbf66dc2/lib/mkmf.rb#L242-L249):

~~~ruby
  if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
    $topdir = $hdrdir
    $top_srcdir = $hdrdir
    $arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"]
  elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include")  + "/ruby.h")
    $topdir ||= RbConfig::CONFIG["topdir"]
    $arch_hdrdir = "$(extout)/include/$(arch)"
  else
~~~

The first branch is used for regular cases when Ruby is already installed. The second branch is used for building extensions during build of Ruby.

Unfortunately, installing gems and building their extensions is non of these. So there should be probably created some middle path. Maybe if the mkmf could be convinced that the extension is nothing different to building extensions which are part of Ruby ...

But I think that it might make difference, if there is already installed Ruby on the system, which is not my case.

----------------------------------------
Bug #18373: RBS build failure: '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'.
https://bugs.ruby-lang.org/issues/18373#change-95398

* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-12-01 master 0b53a8895f) [x86_64-linux]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Trying to build Ruby 3.1.0 preview1 (or the current snapshot), I observe the following issue during installation of bundled RBS:

~~~
Building native extensions. This could take a while...
/builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:95:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)

    current directory: /builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension
/builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/bin/ruby --disable\\=gems -I/builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/lib64/ruby -I /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib -r ./siteconf20211201-24852-213cgt.rb extconf.rb
creating Makefile

current directory: /builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension
make DESTDIR\\= clean
make[1]: Entering directory '/builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension'
rm -f 
rm -fr rbs_extension.so false *.o  *.bak mkmf.log .*.time
make[1]: Leaving directory '/builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension'

current directory: /builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension
make DESTDIR\\=
make[1]: Entering directory '/builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension'
make[1]: *** No rule to make target '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'.  Stop.
make[1]: Leaving directory '/builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1/ext/rbs_extension'

make failed, exit code 2

Gem files will remain installed in /builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/gems/rbs-1.7.1 for inspection.
Results logged to /builddir/build/BUILDROOT/ruby-3.1.0-0.1.20211201git0b53a8895f.fc36.x86_64/usr/share/ruby/gems/extensions/x86_64-linux/3.1.0/rbs-1.7.1/gem_make.out
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:44:in `block in make'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:36:in `each'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:36:in `make'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/tempfile.rb:317:in `open'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/ext_conf_builder.rb:26:in `build'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:161:in `build_extension'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:195:in `block in build_extensions'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:192:in `each'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:192:in `build_extensions'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/installer.rb:837:in `build_extensions'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/installer.rb:318:in `install'
	from ./tool/rbinstall.rb:895:in `block in install'
	from ./tool/rbinstall.rb:719:in `no_write'
	from ./tool/rbinstall.rb:895:in `install'
	from ./tool/rbinstall.rb:1062:in `block (2 levels) in <main>'
	from ./tool/rbinstall.rb:1037:in `foreach'
	from ./tool/rbinstall.rb:1037:in `block in <main>'
	from ./tool/rbinstall.rb:1121:in `block in <main>'
	from ./tool/rbinstall.rb:1118:in `each'
	from ./tool/rbinstall.rb:1118:in `<main>'
/builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:95:in `run': make failed, exit code 2 (Gem::InstallError)
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:44:in `block in make'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:36:in `each'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:36:in `make'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/ext_conf_builder.rb:63:in `block in build'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/tempfile.rb:317:in `open'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/ext_conf_builder.rb:26:in `build'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:161:in `build_extension'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:195:in `block in build_extensions'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:192:in `each'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/ext/builder.rb:192:in `build_extensions'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/installer.rb:837:in `build_extensions'
	from /builddir/build/BUILD/ruby-3.1.0-0b53a8895f/lib/rubygems/installer.rb:318:in `install'
	from ./tool/rbinstall.rb:895:in `block in install'
	from ./tool/rbinstall.rb:719:in `no_write'
	from ./tool/rbinstall.rb:895:in `install'
	from ./tool/rbinstall.rb:1062:in `block (2 levels) in <main>'
	from ./tool/rbinstall.rb:1037:in `foreach'
	from ./tool/rbinstall.rb:1037:in `block in <main>'
	from ./tool/rbinstall.rb:1121:in `block in <main>'
	from ./tool/rbinstall.rb:1118:in `each'
	from ./tool/rbinstall.rb:1118:in `<main>'
make: *** [uncommon.mk:383: do-install-all] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.cpHVoZ (%install)
    Bad exit status from /var/tmp/rpm-tmp.cpHVoZ (%install)
~~~

This is probably fault of RubyGems, but also, RBS have not contained binary extension previously, if I am not mistaken. So I am not entirely sure.

BTW there is not Ruby installed on the build system, so this should work with the Ruby being build.

---Files--------------------------------
Makefile (9.3 KB)


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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread