Project

General

Profile

Actions

Bug #12681

closed

Updated by hsbt (Hiroshi SHIBATA) almost 9 years ago

Also, the "gem install tk" does not build the extension, so that is another source of possible issues.

I missed configuration of tk.gemspec. It's fixed at tk-0.1.1 probably. Can you confirm it?

Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

  • Status changed from Open to Closed

Applied in changeset r55950.


gem extensions

  • ext/extmk.rb: build gem extensions into separate directories
  • tool/rbinstall.rb: install pre-built gem extension files gem
    extension directories. [ruby-core:76931] [Bug ]

Updated by vo.x (Vit Ondruch) almost 9 years ago

Hiroshi SHIBATA wrote:

Also, the "gem install tk" does not build the extension, so that is another source of possible issues.

I missed configuration of tk.gemspec. It's fixed at tk-0.1.1 probably. Can you confirm it?

Yes, the 0.1.1 looks good. Thx.

Updated by vo.x (Vit Ondruch) almost 9 years ago

  • Status changed from Closed to Open

The r55950 does not resolve the issue completely. The make install does not work (neither the gem itself probably):

# make install DESTDIR=/builddir/build/BUILDROOT/ruby-2.4.0-0.1.r56008.fc26.x86_64

... snip ...

./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="/builddir/build/BUILDROOT/ruby-2.4.0-0.1.r56008.fc26.x86_64" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --install=all --rdoc-output=".ext/rdoc"
installing binary commands:   /usr/bin
installing base libraries:    /usr/lib64
installing arch files:        /usr/lib64/ruby/2.4.0/x86_64-linux
installing pkgconfig data:    /usr/lib64/pkgconfig
installing command scripts:   /usr/bin
installing library scripts:   /usr/lib64/ruby/2.4.0
installing common headers:    /usr/include/ruby-2.4.0
installing manpages:          /usr/share/man/man1
installing extension objects: /usr/lib64/ruby/2.4.0/x86_64-linux
installing extension objects: /usr/lib64/ruby/site_ruby/2.4.0/x86_64-linux
installing extension objects: /usr/lib64/ruby/vendor_ruby/2.4.0/x86_64-linux
installing extension headers: /usr/include/ruby-2.4.0/x86_64-linux
installing extension scripts: /usr/lib64/ruby/2.4.0
installing extension scripts: /usr/lib64/ruby/site_ruby/2.4.0
installing extension scripts: /usr/lib64/ruby/vendor_ruby/2.4.0
installing extension headers: /usr/include/ruby-2.4.0/ruby
installing default gems:      /usr/lib64/ruby/gems/2.4.0 (build_info, cache, doc, extensions, gems, specifications)
                              bigdecimal 1.2.8
                              io-console 0.4.6
                              json 2.0.2
                              psych 2.1.0
                              rdoc 4.2.1
installing bundle gems:       /usr/lib64/ruby/gems/2.4.0 (build_info, cache, doc, extensions, gems, specifications)
                              did_you_mean 1.0.2
                              minitest 5.9.0
                              rake 11.2.2
                              power_assert 0.3.0
                              test-unit 3.2.1
                              tk 0.1.1
./tool/rbinstall.rb:273:in `initialize': No such file or directory @ rb_sysopen - /builddir/build/BUILDROOT/ruby-2.4.0-0.1.r56008.fc26.x86_64/usr/lib64/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/tk-0.1.1/gem.build_complete (Errno::ENOENT)
	from ./tool/rbinstall.rb:273:in `open'
	from ./tool/rbinstall.rb:273:in `open_for_install'
	from ./tool/rbinstall.rb:769:in `block (2 levels) in <main>'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:821:in `block in each_spec'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:743:in `block (2 levels) in each_gemspec'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:742:in `each'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:742:in `block in each_gemspec'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:741:in `each'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:741:in `each_gemspec'
	from /builddir/build/BUILD/ruby-2.4.0-r56008/lib/rubygems/specification.rb:819:in `each_spec'
	from ./tool/rbinstall.rb:758:in `block in <main>'
	from ./tool/rbinstall.rb:823:in `block in <main>'
	from ./tool/rbinstall.rb:820:in `each'
	from ./tool/rbinstall.rb:820:in `<main>'
uncommon.mk:277: recipe for target 'do-install-all' failed
make: *** [do-install-all] Error 1

Updated by vo.x (Vit Ondruch) almost 9 years ago

Moreover, I still see the tcltklib.so and tkutil.so installed into /usr/lib64/ruby/2.4.0/x86_64-linux/ but they should not be there at all.

Updated by vo.x (Vit Ondruch) almost 9 years ago

Actually this line is suspicious:

https://.com/ruby/ruby/blob/trunk/ext/extmk.rb#L568

It expands to $(topdir)/.ext/gems and creates the $(topdir) directory indeed. But that doesn't look to be the original intention here. Tried to revert to .ext/gems but it doesn't really make a difference ...

Updated by vo.x (Vit Ondruch) almost 9 years ago

  • Related to : Unbundle ext/tk added

Updated by vo.x (Vit Ondruch) almost 9 years ago

  • Assignee changed from naruse (Yui NARUSE) to nobu (Nobuyoshi Nakada)

It seems that r55966 is part of the problem. The place 1 where the block could be executed was removed in favor of 2. Unfortunately, that path is never reached, since the tk gem contains extconf.rb and hence the condition 3 is true.

Reverting r55966 helped me to place the compiled extension into proper places.

Also, I think that the removal of FileUtils::makedirs("#$extout/gems") 4 should be enough to avoid the creation of the $(topdir) directory. The appropriate directories are created later by extmake anyway

Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

Do you install after make extract-gems or without it?

Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

  • Status changed from Open to Closed

Applied in changeset r56047.


mkmf.rb: TARGET_SO_DIR

  • ext/extmk.rb: move TARGET_SO_DIR stuffs to mkmf.rb.
  • lib/mkmf.rb (create_makefile): create target shared object files
    under $(TARGET_SO_DIR) which is $sodir if it is defined with
    $extout. [ruby-core:77058] [Bug ]

Updated by vo.x (Vit Ondruch) almost 9 years ago

  • Related to : make で $(topdir)/.ext/gems が作成される added

Updated by vo.x (Vit Ondruch) almost 9 years ago

  • Status changed from Closed to Assigned

Vit Ondruch wrote:

Also, I think that the removal of FileUtils::makedirs("#$extout/gems") [4] should be enough to avoid the creation of the $(topdir) directory. The appropriate directories are created later by extmake anyway

This was reported separately as and fixed by r56042

Nobuyoshi Nakada wrote:

Do you install after make extract-gems or without it?

Never heard about "extract-gems" nor I understand why I should use it, when I build from the snapshot tarball. So far make & make install was always enough.

Anyway, your recent changes probably fix the issue but broke some RubyGems tests:

http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20160831T110500Z.fail.html.gz

Updated by vo.x (Vit Ondruch) almost 9 years ago

  • Status changed from Assigned to Closed

It seems that r56049 and r56050 fixes the remaining issues for me. Thx.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0