Project

General

Profile

Bug #13413

--with-static-linked-ext doesn't install extension files on `make install`

Added by mistydemeo (Misty De Meo) about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
[ruby-core:80619]

Description

When compiling Ruby using the --with-static-linked-ext option, ext content is not installed into Ruby's lib directory. For modules which include pure Ruby content, it means that those parts of the module can't be required. For example, date's date.rb isn't installed into /lib/ruby/$ABI_VERSION; require "date_core" works, but require "date" doesn't.

I've confirmed that this bug occurs on versions 2.3.1 through 2.4.1 and on trunk; it doesn't occur on 2.2.7 and older. I was not able to test on 2.3.0 due to what appears to be an unrelated static linked ext bug. In 2.4 and trunk, make install fails to complete due to the inability to require an ext module required as part of the install process; in 2.3, make install completes.

Ruby was configured with the following options:

--prefix=/usr/local/Cellar/portable-ruby-trunk/HEAD-9638295
--enable-load-relative
--with-static-linked-ext
--disable-dln
--with-out-ext=tk,sdbm,gdbm,dbm,dl,coverage,fiddle
--disable-install-doc
--disable-install-rdoc
--disable-dtrace
--with-opt-dir=/usr/local/opt/portable-readline:/usr/local/opt/portable-libyaml:/usr/local/opt/portable-openssl

Full build logs are available here: https://gist.github.com/b33108e03ed6eeda30c4e004a81284b3

Associated revisions

Revision 57446
Added by nobu (Nobuyoshi Nakada) over 2 years ago

mkmf.rb: fix script installation

  • lib/mkmf.rb (MakeMakefile): fix condition to install script files.

Revision e1f73c32
Added by usa (Usaku NAKAMURA) almost 2 years ago

merge revision(s) 57446: [Backport #13413]

    mkmf.rb: fix script installation

    * lib/mkmf.rb (MakeMakefile): fix condition to install script
      files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59277
Added by usa (Usaku NAKAMURA) almost 2 years ago

merge revision(s) 57446: [Backport #13413]

mkmf.rb: fix script installation

* lib/mkmf.rb (MakeMakefile): fix condition to install script
  files.

Revision b1b4772f
Added by nagachika (Tomoyuki Chikanaga) almost 2 years ago

merge revision(s) 57446: [Backport #13413]

    mkmf.rb: fix script installation

    * lib/mkmf.rb (MakeMakefile): fix condition to install script
      files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 59402
Added by nagachika (Tomoyuki Chikanaga) almost 2 years ago

merge revision(s) 57446: [Backport #13413]

mkmf.rb: fix script installation

* lib/mkmf.rb (MakeMakefile): fix condition to install script
  files.

History

Updated by ko1 (Koichi Sasada) about 2 years ago

  • Assignee set to nobu (Nobuyoshi Nakada)
  • Status changed from Open to Assigned

Updated by arnoldwald (arnold w) about 2 years ago

The ext subdirectory Makefile's don't seem to invoke the "install-rb" rule during a static build.

As a workaround I ran this command before "make install":
find ext -name Makefile | xargs -L 1 sed -i "s/static: \$/static: install-rb \$/"

Updated by mistydemeo (Misty De Meo) almost 2 years ago

Found the commit that's responsible - r51756 (50226fb61cb10c5be9e2745e7b1a29228987a4ee in the github mirror).

This does adjust the logic surrounding the STATIC_LIB target and whether or not to add install-rb. At a glance, making the second check !$extmk ? " install-rb" : "" may have been a typo, since the original version checked for $extout ? " install-rb" : "".

Updated by mistydemeo (Misty De Meo) almost 2 years ago

After some research, I discovered that this has since been fixed in trunk. It was fixed by r57446 (git b3dbeb6e90f). I can't test if this fixes the trunk build, which fails for what may or may not be unrelated reasons, but backporting this patch to 2.3 and 2.4 fixes the issue.

Please backport r57446 to the 2.3 and 2.4 branches; I'll continue diagnosing the build error I'm seeing in trunk. :)

#5

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONTNEED
  • Status changed from Assigned to Closed

Updated by mistydemeo (Misty De Meo) almost 2 years ago

2.4: DONTNEED

Thank you for marking this for backport! The backport is needed for 2.4 as well.

Updated by usa (Usaku NAKAMURA) almost 2 years ago

  • Backport changed from 2.2: DONTNEED, 2.3: REQUIRED, 2.4: DONTNEED to 2.2: DONTNEED, 2.3: DONE, 2.4: DONTNEED

ruby_2_3 r59277 merged revision(s) 57446.

#8

Updated by usa (Usaku NAKAMURA) almost 2 years ago

  • Backport changed from 2.2: DONTNEED, 2.3: DONE, 2.4: DONTNEED to 2.2: DONTNEED, 2.3: DONE, 2.4: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) almost 2 years ago

  • Backport changed from 2.2: DONTNEED, 2.3: DONE, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONE, 2.4: DONE

ruby_2_4 r59402 merged revision(s) 57446.

Also available in: Atom PDF