Skip to content

Instantly share code, notes, and snippets.

@pvalena
Created December 16, 2020 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvalena/c072217dfc473ca1507234801065970a to your computer and use it in GitHub Desktop.
Save pvalena/c072217dfc473ca1507234801065970a to your computer and use it in GitHub Desktop.
$ rpm -q ruby-devel
ruby-devel-2.7.2-137.fc34.x86_64
$ rpm -q !$ --recommends
rpm -q ruby-devel --recommends
redhat-rpm-config
$ gem install eventmachine
Fetching eventmachine-1.2.7.gem
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
current directory: /home/lpcs/.gem/ruby/gems/eventmachine-1.2.7/ext
/usr/bin/ruby -I /usr/share/rubygems -r ./siteconf20201216-772238-91rayn.rb extconf.rb
*** 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_BASE_NAME)
--with-ssl-dir
--without-ssl-dir
--with-ssl-include
--without-ssl-include=${ssl-dir}/include
--with-ssl-lib
--without-ssl-lib=${ssl-dir}/lib64
--with-openssl-config
--without-openssl-config
--with-pkg-config
--without-pkg-config
/usr/share/ruby/mkmf.rb:471: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:564:in `try_link0'
from /usr/share/ruby/mkmf.rb:582:in `try_link'
from /usr/share/ruby/mkmf.rb:684:in `try_ldflags'
from /usr/share/ruby/mkmf.rb:1851:in `pkg_config'
from extconf.rb:65:in `pkg_config_wrapper'
from extconf.rb:92:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/lpcs/.gem/ruby/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/lpcs/.gem/ruby/gems/eventmachine-1.2.7 for inspection.
Results logged to /home/lpcs/.gem/ruby/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/gem_make.out
$ less /home/lpcs/.gem/ruby/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/mkmf.log
$ cat /home/lpcs/.gem/ruby/extensions/x86_64-linux/2.7.0/eventmachine-1.2.7/mkmf.log
"gcc -o conftest -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC conftest.c -L. -L/usr/lib64 -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -m64 -lruby -lm -lc"
as: unrecognized option '--gdwarf-4'
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
"pkg-config --exists openssl"
| pkg-config --libs openssl
=> "-lssl -lcrypto \n"
$ sudo dnf install openssl-devel
Last metadata expiration check: 0:08:08 ago on Wed 16 Dec 2020 03:26:29 PM CET.
Package openssl-devel-1:1.1.1g-11.fc33.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment