Closed TJuberg closed 1 year ago
I had the same issue when building from source, but it worked after installing the 'alien' package (yum install alien) on fedora 19.
alien unfortunately is not currently available for Centos7/RHEL7 either in base or in EPEL7_Beta. And for some reason the source packages for the latest builds for f19 are not up on fedoras package database either.
In any case, it would be nice to have this issue resolved within the confines of Centos7 without having to jump trough hoops, even if I'm perfectly capable of doing that myself.
[edit] Found some time to look closer at this. The appropriate package missing is dpkg, which is not available on centos7 at present. Building it from fedora19 src rpm however works just fine, and allows you to pass the two failing tests and lets you build and install fpm from source sucessfully.
Alien is a fairly standard package that is usually in EPEL, so I don't think FPM needs to do anything fancy like optional dependencies. Maybe just wait for the repo teams to update, or as you said backport it from FC.
[root@2699803668bd build]# rpm -qa | grep alien alien-8.95-3.el7.noarch [root@2699803668bd build]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)
[root@2699803668bd build]# gem install --no-ri --no-rdoc fpm Building native extensions. This could take a while... ERROR: Error installing fpm: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for ffi.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}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/share/ruby/mkmf.rb:434:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/share/ruby/mkmf.rb:565:in
try_cpp'
from /usr/share/ruby/mkmf.rb:1038:in block in have_header' from /usr/share/ruby/mkmf.rb:889:in
block in checking_for'
from /usr/share/ruby/mkmf.rb:340:in block (2 levels) in postpone' from /usr/share/ruby/mkmf.rb:310:in
open'
from /usr/share/ruby/mkmf.rb:340:in block in postpone' from /usr/share/ruby/mkmf.rb:310:in
open'
from /usr/share/ruby/mkmf.rb:336:in postpone' from /usr/share/ruby/mkmf.rb:888:in
checking_for'
from /usr/share/ruby/mkmf.rb:1037:in have_header' from extconf.rb:16:in
Gem files will remain installed in /usr/local/share/gems/gems/ffi-1.9.23 for inspection. Results logged to /usr/local/share/gems/gems/ffi-1.9.23/ext/ffi_c/gem_make.out
@thatsk you're having a slightly different issue to the OP, you don't seem to have a compiler installed. yum groupinstall "Development tools"
should be enough, you may need the Development Libraries
group as well. Sorry for the late reply.
Development Libraries
- Does such a group even exist?
If it's not called Development Libraries
, then it's Development libs
. Been a while since I had to use it. Tools is generally stuff like gcc while libs had more of the devel packages for headers and whatnot. Tools should be enough though.
I think this was fixed by #1796 which removed the dependency (ffi) which was giving folks problems. Versions of fpm 1.13.0 or newer should work. Let me know if you find otherwise :)
Trying to install on Centos 7 64bit and running into problems with the native exception, and there is no specific error message, just warnings.
Relevant system information: Linux trws-013 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
CentOS Linux release 7.0.1406 (Core)
ruby-devel.x86_64 2.0.0.353-20.el7 gcc.x86_64 4.8.2-16.el7
Trying instead to build from source on the same machine results in errors:
Let me know if you need more information or need me to test something.