Install From Source Failing on OSX
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
I'm currently trying to update to gitlab 10.8 from source on a development server running osx 10.11.6 (el capitan). I installed ruby and bundler as per the instructions here: https://gitlab.com/gitlab-org/gitlab-ce/blob/70bf08b5d34e71bb67d3a71a9f6aae553f0d9f4a/doc/update/10.7-to-10.8.md
When attempting to install the dependencies using 'bundle install' the build fails with the error
An error occurred while installing kgio (2.10.0), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.10.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
unicorn-worker-killer was resolved to 0.4.4, which depends on
unicorn was resolved to 5.1.0, which depends on
kgio
I ran into a similar issue before with rugged and was able to get around it with the '--use-system-libraries' flag. I tried the same thing with this gem with no success. Is there some other library that needs to be installed manually for osx?
Steps to reproduce
- Install ruby 2.3.7
- Install bundler
- navigate to the gitlab install directory (/Users//gitlab)
- Run the command 'bundle install'
What is the current bug behavior?
bundle install fails when attempting to install kgio
Relevant logs and/or screenshots
Fetching kgio 2.10.0
Installing kgio 2.10.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/git/gitlab/vendor/bundle/ruby/2.3.0/gems/kgio-2.10.0/ext/kgio
/usr/local/bin/ruby -r ./siteconf20180625-17588-km9spc.rb extconf.rb --use-system-libraries
checking for CLOCK_MONOTONIC in time.h... no
checking for CLOCK_MONOTONIC() in time.h... no
checking for clockid_t in time.h... no
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... yes
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... yes
checking for getnameinfo() in sys/types.h,sys/socket.h,netdb.h... yes
checking for struct sockaddr_storage in sys/types.h,sys/socket.h... yes
checking for accept4() in sys/socket.h... no
checking for sys/select.h... yes
checking for writev() in sys/uio.h... yes
checking for ruby/io.h... yes
checking for rb_io_t.fd in ruby.h,ruby/io.h... yes
checking for rb_io_t.mode in ruby.h,ruby/io.h... yes
checking for rb_io_t.pathv in ruby.h,ruby/io.h... yes
checking for struct RFile in ruby.h,ruby/io.h... yes
checking size of struct RFile in ruby.h,ruby/io.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
/usr/local/lib/ruby/2.3.0/mkmf.rb:728:in `Integer': can't convert nil into Integer (TypeError)
from /usr/local/lib/ruby/2.3.0/mkmf.rb:728:in `block in try_constant'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:408:in `popen'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:408:in `block in xpopen'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:401:in `xpopen'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:727:in `try_constant'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1333:in `block in check_sizeof'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /usr/local/lib/ruby/2.3.0/mkmf.rb:1332:in `check_sizeof'
from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/git/gitlab/vendor/bundle/ruby/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/kgio-2.10.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/git/gitlab/vendor/bundle/ruby/2.3.0/gems/kgio-2.10.0 for inspection.
Results logged to /Users/git/gitlab/vendor/bundle/ruby/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/kgio-2.10.0/gem_make.out
Results of GitLab environment info
Could not find kgio-2.10.0 in any of the sources
Run `bundle install` to install missing gems.