So starting from inside the empty direcotry, "/home/sbh/SW/Ruby/" I did the following as you prescribed.
Also, due to svn, my old folder name "dev" is now "ruby".
I notice, under ./configure --help, that EPREFIX is by default PREFIX, which in most of the software
I've installed is not the case - hence the habit of mine of making directories "prefix",
"execprefix", etc. I did add "oldincludedir". Therefore using what you suggest;
./configure --prefix=/home/sbh/SW/Ruby/prefix/ --oldincludedir=/home/sbh/SW/Ruby/oldincludedir/
···
On 09/08/2016 11:34 PM, Carlo E. Prelz wrote:
---
./configure --prefix=/home/sbh/SW/Ruby/dev/
make
make install
For which "make" gave;
...
Generating RI format into /home/sbh/SW/Ruby/ruby/.ext/rdoc...
Files: 950
Classes: 1374 ( 560 undocumented)
Modules: 277 ( 108 undocumented)
Constants: 2154 ( 590 undocumented)
Attributes: 1139 ( 248 undocumented)
Methods: 10471 (2147 undocumented)
Total: 15415 (3653 undocumented)
76.30% documented
Elapsed: 40.4s
"make check" gave;
[ 1324/16508] OpenSSL::TestSSL#test_ctx_options = 0.00s
1) Failure:
OpenSSL::TestSSL#test_ctx_options [/home/sbh/SW/Ruby/ruby/test/openssl/test_ssl.rb:14]:
<2147486719> expected but was
<2181041151>.
Finished tests in 264.296222s, 62.4337 tests/s, 8427.5628 assertions/s.
16501 tests, 2227373 assertions, 1 failures, 0 errors, 40 skips
ruby -v: ruby 2.4.0dev (2016-09-15 trunk 56164) [x86_64-linux]
uncommon.mk:630: recipe for target 'yes-test-almost' failed
make: *** [yes-test-almost] Error 1
but looking very quickly at this;
Bug #12433: uncommon.mk:614: recipe for target 'yes-test-almost' failed - missing UnicodeData.txt - Ruby master - Ruby Issue Tracking System didn't lead me anywhere yet. And then "make install" put out;
./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"
--install=all --rdoc-output=".ext/rdoc"
installing binary commands: /home/sbh/SW/Ruby/prefix/bin
installing base libraries: /home/sbh/SW/Ruby/prefix/lib
installing arch files: /home/sbh/SW/Ruby/prefix/lib/ruby/2.4.0/x86_64-linux
installing pkgconfig data: /home/sbh/SW/Ruby/prefix/lib/pkgconfig
installing command scripts: /home/sbh/SW/Ruby/prefix/bin
installing library scripts: /home/sbh/SW/Ruby/prefix/lib/ruby/2.4.0
installing common headers: /home/sbh/SW/Ruby/prefix/include/ruby-2.4.0
installing manpages: /home/sbh/SW/Ruby/prefix/share/man/man1
installing extension objects: /home/sbh/SW/Ruby/prefix/lib/ruby/2.4.0/x86_64-linux
installing extension objects: /home/sbh/SW/Ruby/prefix/lib/ruby/site_ruby/2.4.0/x86_64-linux
installing extension objects: /home/sbh/SW/Ruby/prefix/lib/ruby/vendor_ruby/2.4.0/x86_64-linux
installing extension headers: /home/sbh/SW/Ruby/prefix/include/ruby-2.4.0/x86_64-linux
installing extension scripts: /home/sbh/SW/Ruby/prefix/lib/ruby/2.4.0
installing extension scripts: /home/sbh/SW/Ruby/prefix/lib/ruby/site_ruby/2.4.0
installing extension scripts: /home/sbh/SW/Ruby/prefix/lib/ruby/vendor_ruby/2.4.0
installing extension headers: /home/sbh/SW/Ruby/prefix/include/ruby-2.4.0/ruby
installing default gems: /home/sbh/SW/Ruby/prefix/lib/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
openssl 2.0.0.beta.2
psych 2.1.1
rdoc 5.0.0.beta2
installing bundle gems: /home/sbh/SW/Ruby/prefix/lib/ruby/gems/2.4.0 (build_info, cache, doc,
extensions, gems, specifications)
installing rdoc: /home/sbh/SW/Ruby/prefix/share/ri/2.4.0/system
installing capi-docs: /home/sbh/SW/Ruby/prefix/share/doc/ruby
I haven't tried installing/reinstalling/whatever with redmine yet, until I try a little more on what
this failure means. Maybe it doesn't mean anything but I'm not sure yet.
I do note that I have these ruby.h locations;
sbh@sbh-laptop-M18 ~/SW/Ruby $ find . -name ruby.h -exec ls -Alrt {} \;
-rw-r--r-- 1 sbh sbh 868 Sep 14 19:34 ./ruby/include/ruby.h
-rw-r--r-- 1 sbh sbh 77600 Sep 14 19:34 ./ruby/include/ruby/ruby.h
-rw-r--r-- 1 sbh sbh 868 Sep 14 19:34 ./prefix/include/ruby-2.4.0/ruby.h
-rw-r--r-- 1 sbh sbh 77600 Sep 14 19:34 ./prefix/include/ruby-2.4.0/ruby/ruby.h
and during trying to install redmine, Ruby's gem "install" was expecting ruby.h to be in a path with
"lib/" in it...
Anyway, so now I change the PATH, putting the new ruby at the beginning. I verified it with ruby -v
too.
So I then do;
bundle install --without development test
resulting in a bunch of errors;
sbh@sbh-laptop-M18 ~/SW/Redmine/redmine $ bundle install --without developement test
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies....
Using rake 11.2.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Using rack 1.6.4
Using mime-types-data 3.2016.0521
Using arel 6.0.3
Using addressable 2.4.0
Using bundler 1.12.5
Using coderay 1.1.1
Using concurrent-ruby 1.0.2
Using htmlentities 4.3.1
Using thor 0.19.1
Using mimemagic 0.3.2
Using net-ldap 0.12.1
Using ruby-openid 2.3.0
Using rbpdf-font 1.19.0
Installing redcarpet 3.3.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/redcarpet-3.3.4/ext/redcarpet
/usr/bin/ruby2.3 -r ./siteconf20160914-8576-9xhgmg.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/redcarpet-3.3.4 for inspection.
Results logged to
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/redcarpet-3.3.4/gem_make.out
Using request_store 1.0.5
Installing rmagick 2.16.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/ext/RMagick
/usr/bin/ruby2.3 -r ./siteconf20160914-8576-1q1pv7l.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0 for inspection.
Results logged to
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/rmagick-2.16.0/gem_make.out
Installing sqlite3 1.3.11 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.11/ext/sqlite3
/usr/bin/ruby2.3 -r ./siteconf20160914-8576-lssjuy.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.11 for inspection.
Results logged to
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/sqlite3-1.3.11/gem_make.out
Using tzinfo 1.2.2
Installing nokogiri 1.6.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.8/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20160914-8576-aozfjx.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.8 for inspection.
Results logged to
/home/sbh/SW/Redmine/redmine/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.6.8/gem_make.out
Using rack-test 0.6.3
Using mime-types 3.1
Using css_parser 1.3.7
Using sprockets 3.7.0
Using rack-openid 1.4.2
Using rbpdf 1.19.0
An error occurred while installing redcarpet (3.3.4), and Bundler cannot continue.
Make sure that `gem install redcarpet -v '3.3.4'` succeeds before bundling.
and so choosing to do what the last line above said, I did this;
gem install redcarpet -v '3.3.4'
which says;
sbh@sbh-laptop-M18 ~/SW/Redmine/redmine $ gem install redcarpet -v '3.3.4'
Building native extensions. This could take a while...
Successfully installed redcarpet-3.3.4
Parsing documentation for redcarpet-3.3.4
Done installing documentation for redcarpet after 0 seconds
1 gem installed
So I think it is okay.... so I run again "bundle install --without development test", and I get the
same error as above - that redcarpet did not work, etc.
I also notice that it is still complaining about the same thing --- header files for ruby at
"/usr/lib/ruby/include/rubh.h"...
Thank you for your time and advice in looking at this.
Best wishes,
Brett
Instead of running the new interpreter by specifying its complete
path, did you try to modify the PATH environment variable? Like, with
export PATH=/home/sbh/SW/Ruby/dev/execprefix/bin/:$PATH
? (remove the 'execprefix' part if you recompile as I show above). If
you do that, your new interpreter will be run as default.
You should find your gems' code under
/home/sbh/SW/Ruby/dev/execprefix/lib/ruby/gems/2.4.0/gems
You can monitor that directory. If/when the installation of a gem
fails during the compilation of the C part, you can look at its
directory there. In the directory for the specific gem, there should
be a subdir called 'ext'. Under it ther should be yet another dir with
the name of the gem. There you will find the C stuff that is being
compiled. To see what goes wrong, run
ruby extconf.rb
make
from inside that dir (be sure that you are using your new
interpreter!) An error should be easier to trace from there.
Carlo