Jump to content


P4Ruby gem errors out on install


  • Please log in to reply
1 reply to this topic

#1 Mike Smith

Mike Smith

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 06 September 2019 - 05:59 PM

Starting on Thursday (2019.09.05) we noticed that the p4ruby gem no longer installs. Looking at the logs we get the following (note I replaced my home directory with ~):

Building native extensions. This could take a while...
ERROR:  Error installing p4ruby:
ERROR: Failed to build gem native extension.

current directory: ~/.rvm/gems/ruby-2.3.8/gems/p4ruby-2017.1.1699426/ext/P4
~/.rvm/rubies/ruby-2.3.8/bin/ruby -r ./siteconf20190905-32375-1n916i4.rb extconf.rb
p4osname LINUX
p4osver 44
$CPPFLAGS  $(DEFS) $(cppflags)-DOS_LINUX -DOS_LINUX44 -DOS_LINUX44X86_64
$CFLAGS $(cflags)  -fPIC
checking for main() in -lsupc++... yes
*** 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=~/.rvm/rubies/ruby-2.3.8/bin/$(RUBY_BASE_NAME)
--with-supc++lib
--without-supc++lib
--with-p4api-dir
--without-p4api-dir
--enable-p4api-download
--disable-p4api-download
~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:243:in `initialize': Connection timed out - connect(2) for "ftp.perforce.com" port 10106 (Errno::ETIMEDOUT)
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:243:in `open'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:243:in `block in open_socket'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/timeout.rb:74:in `timeout'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:238:in `open_socket'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:420:in `transfercmd'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:504:in `block (2 levels) in retrbinary'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:214:in `with_binary'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:502:in `block in retrbinary'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:501:in `retrbinary'
from ~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:635:in `getbinaryfile'
from extconf.rb:508:in `download_api_via_ftp'
from extconf.rb:363:in `resolve_p4api_dir'
from extconf.rb:549:in `<main>'
$LDFLAGS -L. -fstack-protector -rdynamic -Wl,-export-dynamic
downloading p4api.tgz from perforce/r17.2/bin.linux26x86_64 on ftp.perforce.com

Now today Friday (2019.09.06) we get a similar error but we one small change:


~/.rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/ftp.rb:243:in `initialize': Connection timed out - connect(2) for "12.234.39.160" port 10106 (Errno::ETIMEDOUT)

The ftp.perforce.com address changed to an IP address.

Looks like the gem is trying to get a file call: perforce/r17.2/bin.linux26x86_64 on the Perforce ftp server while installing. I can navigate to the file on the ftp server (ftp.perforce.com) in a web browser, but the gem seems to have trouble getting the file. Does anyone else have this problem?

#2 P4Jen

P4Jen

    Advanced Member

  • Staff Moderators
  • 153 posts

Posted 13 September 2019 - 03:13 PM

Hi,

I did a quick test on a clean Linux box and the P4Ruby gem was able to download the P4API.

If you are still experiencing this issue please reply to the thread and let us know.

Also it is possible to specify the path to the P4API when you install the gem, so you could download it
first if necessary.

From the P4Ruby release notes:
gem install p4ruby -- --with-p4api-dir=DIR

    In this case, the DIR above is the path to the C++ API distribution that
    should match the major and minor version of P4Ruby. If you omit the
    --with-p4api-dir option, the gem will attempt to download a version of the
    API itself from ftp.perforce.com.
  <Snip>

Regards,
Jen.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users