Project

General

Profile

Actions

Bug #16475

closed

[Installation process - compiling ruby 2.7.0 from source} "make install" step oddity for ruby 2.7.0 on linux mint (debian base)

Added by shevegen (Robert A. Heiler) about 4 years ago. Updated almost 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
[ruby-core:96640]

Description

Hello ruby core team (and everyone else),

I have a slight oddity; it seems to be not hugely important, as it seems minor, but
I will report it anyway just in case. Please disregard/close if this has already been
reported before.

Situation:

I am trying to compile/install ruby-2.7.0 on the most recent linux mint (fresh
installation).

The "make" step works fine. No error I could see there.

The "make install" step, however had, has one slight problem/warning:

Traceback (most recent call last):
	11: from ./tool/rbinstall.rb:942:in `<main>'
	10: from ./tool/rbinstall.rb:942:in `each'
	 9: from ./tool/rbinstall.rb:945:in `block in <main>'
	 8: from ./tool/rbinstall.rb:794:in `block in <main>'
	 7: from ./tool/rbinstall.rb:830:in `install_default_gem'
	 6: from ./tool/rbinstall.rb:830:in `each'
	 5: from ./tool/rbinstall.rb:840:in `block in install_default_gem'
	 4: from ./tool/rbinstall.rb:278:in `open_for_install'
	 3: from ./tool/rbinstall.rb:841:in `block (2 levels) in install_default_gem'
	 2: from /Depot/j/ruby-2.7.0/lib/rubygems/specification.rb:2426:in `to_ruby'
	 1: from /Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in `require'

/Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- openssl (LoadError)
uncommon.mk:373: recipe for target 'do-install-all' failed

I believe this is due to linux mint not having openssl installed by default (probably not
the dev-package either).

Ruby seems to work just fine otherwise, so this may just be a simple inconvenient
warning - but if possible, I believe it would be better to, IF there is a step during the
do-install-all action, to rescue this (and continue if something else has to be done).

Right now it seems to stop right at this point, with the "cannot load such file -- openssl"
message, and I am not sure if there is anything else that has to be installed.

Note that I know how to work around this; I will just install/compile the other packages
that are missing, then I can recompile ruby or just do so in the ext/ directory. But
this is just an initial setup right now - I have to install the rest at a later time
today. So I just report this here - not sure if it is known yet, but either way it
may not be very elegant to fail or report that warning.

If it is of help, I will copy/paste the whole "make install" step next:

/Depot/j/ruby-2.7.0/make install

^^^ make install step issued here ^^^

BASERUBY = echo executable host ruby is required.  use --with-baseruby option.; false
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -std=gnu99 
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0
CPPFLAGS =   
DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie  
SOLIBS = -lpthread -lrt -lrt -ldl -lcrypt -lm 
LANG = en_US.UTF-8
LC_ALL = 
LC_CTYPE = 
MFLAGS = 

gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

./revision.h unchanged
generating enc.mk
making srcs under enc
make[1]: Entering directory '/Depot/j/ruby-2.7.0'
make[1]: Nothing to be done for 'srcs'.
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'
generating transdb.h
transdb.h unchanged
generating makefiles ext/configure-ext.mk
ext/configure-ext.mk unchanged
make[1]: Entering directory '/Depot/j/ruby-2.7.0'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/pathname'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/pathname'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/ripper'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/ripper'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/json'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/json'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/io/console'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/io/console'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/nkf'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/nkf'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/psych'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/psych'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/pty'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/pty'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/date'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/date'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/socket'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/socket'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/bigdecimal'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/bigdecimal'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/coverage'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/coverage'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/fiddle'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/fiddle'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/rubyvm'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/rubyvm'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/syslog'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/syslog'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/monitor'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/monitor'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/digest'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/digest'
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/digest/sha2'
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/digest/sha2'
make[2]: Entering directory '/Depot/j/ruby-2.7.0'
./revision.h unchanged
make[2]: Leaving directory '/Depot/j/ruby-2.7.0'
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'
make[1]: Entering directory '/Depot/j/ruby-2.7.0'
*** Following extensions are not compiled:
zlib:
Could not be configured. It will not be installed.
Check ext/zlib/mkmf.log for more details.
readline:
Could not be configured. It will not be installed.
/Depot/j/ruby-2.7.0/ext/readline/extconf.rb:62: Neither readline nor libedit was found
Check ext/readline/mkmf.log for more details.
dbm:
Could not be configured. It will not be installed.
Check ext/dbm/mkmf.log for more details.
openssl:
Could not be configured. It will not be installed.
/Depot/j/ruby-2.7.0/ext/openssl/extconf.rb:97: OpenSSL library could not be found. You might want to use --with-openssl-dir=

option to specify the prefix where OpenSSL is installed.
Check ext/openssl/mkmf.log for more details.
gdbm:
Could not be configured. It will not be installed.
Check ext/gdbm/mkmf.log for more details.
-test-/cxxanyargs:
Could not be configured. It will not be installed.
/Depot/j/ruby-2.7.0/lib/mkmf.rb:471: The compiler failed to generate an executable file.
You have to install development tools first.
Check ext/-test-/cxxanyargs/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'
making enc
make[1]: Entering directory '/Depot/j/ruby-2.7.0'
make[1]: Nothing to be done for 'enc'.
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'
making trans
make[1]: Entering directory '/Depot/j/ruby-2.7.0'
make[1]: Nothing to be done for './enc/trans'.
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'
making encs
make[1]: Entering directory '/Depot/j/ruby-2.7.0'
make[1]: Nothing to be done for 'encs'.
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'
Generating RDoc documentation
Parsing sources...
100% [1141/1141] win32/README.win32

Generating RI format into /Depot/j/ruby-2.7.0/.ext/rdoc...

Files: 1141

Classes: 1611 ( 755 undocumented)
Modules: 327 ( 134 undocumented)
Constants: 2434 ( 725 undocumented)
Attributes: 1484 ( 558 undocumented)
Methods: 13002 (3976 undocumented)

Total: 18858 (6148 undocumented)
67.40% documented

Elapsed: 42.0s

./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="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --rdoc-output=".ext/rdoc" --html-output=".ext/html"
installing binary commands: /usr/bin
installing base libraries: /usr/lib
installing arch files: /usr/lib/ruby/2.7.0/x86_64-linux
installing pkgconfig data: /usr/lib/pkgconfig
installing extension objects: /usr/lib/ruby/2.7.0/x86_64-linux
installing extension objects: /usr/lib/ruby/site_ruby/2.7.0/x86_64-linux
installing extension objects: /usr/lib/ruby/vendor_ruby/2.7.0/x86_64-linux
installing extension headers: /usr/include/ruby-2.7.0/x86_64-linux
installing extension scripts: /usr/lib/ruby/2.7.0
installing extension scripts: /usr/lib/ruby/site_ruby/2.7.0
installing extension scripts: /usr/lib/ruby/vendor_ruby/2.7.0
installing extension headers: /usr/include/ruby-2.7.0/ruby
installing rdoc: /usr/share/ri/2.7.0/system
installing html-docs: /usr/share/doc/ruby
installing capi-docs: /usr/share/doc/ruby
installing command scripts: /usr/bin
installing library scripts: /usr/lib/ruby/2.7.0
installing common headers: /usr/include/ruby-2.7.0
installing manpages: /usr/share/man (man1, man5)
installing default gems from lib: /usr/lib/ruby/gems/2.7.0 (build_info, cache, doc, extensions, gems, specifications)
benchmark 0.1.0
Traceback (most recent call last):
11: from ./tool/rbinstall.rb:942:in <main>' 10: from ./tool/rbinstall.rb:942:in each'
9: from ./tool/rbinstall.rb:945:in block in <main>' 8: from ./tool/rbinstall.rb:794:in block in '
7: from ./tool/rbinstall.rb:830:in install_default_gem' 6: from ./tool/rbinstall.rb:830:in each'
5: from ./tool/rbinstall.rb:840:in block in install_default_gem' 4: from ./tool/rbinstall.rb:278:in open_for_install'
3: from ./tool/rbinstall.rb:841:in block (2 levels) in install_default_gem' 2: from /Depot/j/ruby-2.7.0/lib/rubygems/specification.rb:2426:in to_ruby'
1: from /Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in require' /Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in require': cannot load such file -- openssl (LoadError)
uncommon.mk:373: recipe for target 'do-install-all' failed
make: *** [do-install-all] Error 1

Updated by shevegen (Robert A. Heiler) about 4 years ago

I should add that even despite the openssl warning, "make install" appears to work perfectly
fine - ruby is at /usr/bin/ruby and it works fine. As I type this, I am compiling a new
base system through ruby, lateron the extensions too - so this is really just a tiny
glitch; not even sure if it is worth reporting but I thought it is better to report
it anyway. :)

Updated by duerst (Martin Dürst) almost 3 years ago

  • Subject changed from [Installation process - compiling ruby 2.7.0 from source} "make install" step oddity for ruby 2.7.0 on linux minut (debian base) to [Installation process - compiling ruby 2.7.0 from source} "make install" step oddity for ruby 2.7.0 on linux mint (debian base)

@shevegen (Robert A. Heiler): Can this be closed? Looks like nobody else has the same problem.

Updated by xtkoba (Tee KOBAYASHI) almost 3 years ago

This is reproducible for me with Ruby 2.7.3p183 when passing --with-baseruby=no to ./configure, with OpenSSL header files removed (mv /usr/include/openssl{,.bak}).

And this seems to be not reproducible with Ruby 3.0.1p64. Probably backporting is needed?

Updated by xtkoba (Tee KOBAYASHI) almost 3 years ago

This seems to be fixed by backporting ea8f7d4 + lib/rubygems/openssl.rb (created in 69fa0d6 and changed in 4aca77e).

Actions #5

Updated by jeremyevans0 (Jeremy Evans) almost 3 years ago

  • Status changed from Open to Closed
  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN to 2.6: DONTNEED, 2.7: REQUIRED, 3.0: DONTNEED
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0