Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem Installing on Raspberry Pi #78

Closed
Lynchmenow opened this issue Aug 7, 2017 · 9 comments
Closed

Problem Installing on Raspberry Pi #78

Lynchmenow opened this issue Aug 7, 2017 · 9 comments

Comments

@Lynchmenow
Copy link

I am trying to install on the latest Raspbian Jessie and I keep running into this problem below. Can someone please halp?

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

current directory: /var/lib/gems/2.3.0/gems/eventmachine-1.2.5/ext
/usr/bin/ruby2.3 -r ./siteconf20170806-11985-kextex.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}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
    --with-ssl-dir
    --without-ssl-dir
    --with-ssl-include
    --without-ssl-include=${ssl-dir}/include
    --with-ssl-lib
    --without-ssl-lib=${ssl-dir}/lib
    --with-openssl-config
    --without-openssl-config
    --with-pkg-config
    --without-pkg-config
/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. 
(RuntimeError)
You have to install development tools first.\        from /usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
    from /usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
    from /usr/lib/ruby/2.3.0/mkmf.rb:657:in `try_ldflags'
    from /usr/lib/ruby/2.3.0/mkmf.rb:1813: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:

/var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/eventmachine-1.2.5 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/gem_make.out
@kinow
Copy link
Member

kinow commented Aug 7, 2017

You have to install development tools first

I think in RHEL it would be ruby-devel. In Debian it looks like the package would be ruby-dev?

https://packages.debian.org/jessie/ruby-dev

Give it a try, sudo apt-get install ruby-dev and see if after that installing the gem works.

@Lynchmenow
Copy link
Author

@kinow It looks like I'm still running into the same thing. It tells me I have the latest Ruby.

pi@raspberrypi:~ $ sudo apt-get install ruby-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ruby-dev is already the newest version (1:2.3.3).
0 upgraded, 0 newly installed, 0 to remove and 157 not upgraded.
pi@raspberrypi:~ $ sudo gem install smashing
Building native extensions.  This could take a while...
ERROR:  Error installing smashing:
    ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/eventmachine-1.2.5/ext
/usr/bin/ruby2.3 -r ./siteconf20170807-19866-1b487v2.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}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
    --with-ssl-dir
    --without-ssl-dir
    --with-ssl-include
    --without-ssl-include=${ssl-dir}/include
    --with-ssl-lib
    --without-ssl-lib=${ssl-dir}/lib
    --with-openssl-config
    --without-openssl-config
    --with-pkg-config
    --without-pkg-config
/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file.         
(RuntimeError)
You have to install development tools first.
    from /usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
    from /usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
    from /usr/lib/ruby/2.3.0/mkmf.rb:657:in `try_ldflags'
    from /usr/lib/ruby/2.3.0/mkmf.rb:1813: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:

  /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/eventmachine-1.2.5 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/gem_make.out

@terraboops
Copy link

terraboops commented Aug 8, 2017 via email

@Lynchmenow
Copy link
Author

@tylermauthe The Bash script finished without issue. I reloaded the shell and tried again, but still get the same thing.

pi@raspberrypi:~$ sudo gem install smashing
Building native extensions.  This could take a while...
ERROR:  Error installing smashing:
    ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/eventmachine-1.2.5/ext
/usr/bin/ruby2.3 -r ./siteconf20170808-18629-17a4fr6.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}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
    --with-ssl-dir
    --without-ssl-dir
    --with-ssl-include
    --without-ssl-include=${ssl-dir}/include
    --with-ssl-lib
    --without-ssl-lib=${ssl-dir}/lib
    --with-openssl-config
    --without-openssl-config
    --with-pkg-config
    --without-pkg-config
/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file.         
(RuntimeError)
You have to install development tools first.
    from /usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
    from /usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
    from /usr/lib/ruby/2.3.0/mkmf.rb:657:in `try_ldflags'
    from /usr/lib/ruby/2.3.0/mkmf.rb:1813: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:

 /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/eventmachine-1.2.5 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/gem_make.out

@Lynchmenow
Copy link
Author

I'm not sure if this has anything to do with it, but I get this upon opening the shell
-bash: rbenv: command not found

@Lynchmenow
Copy link
Author

Also, contents of the mkmf.log

"gcc -o conftest -I/usr/include/arm-linux-gnueabihf/ruby-2.3.0 -I/usr/include/ruby-
2.3.0/ruby/backward -
I/usr/include/ruby-2.3.0 -I. -Wdate-time -D_$
gcc: error: unrecognized command line option ‘-Wdate-time’
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"pkg-config --exists openssl"
| pkg-config --libs openssl  
=> "-lssl -lcrypto\n"

@kinow
Copy link
Member

kinow commented Aug 9, 2017

Anything on /var/lib/gems/2.3.0/extensions/arm-linux/2.3.0/eventmachine-1.2.5/mkmf.log that looks useful?

@Lynchmenow
Copy link
Author

Well I started from the beginning with fresh install of Raspbian and did the below instructions. Now, it is up and working fine. I am wondering where I went wrong.

sudo apt-get install ruby2.3-dev
sudo gem install smashing
mkdir dashboard && cd dashboard
smashing new sweet_dashboard_project
cd dashboard/sweet_dashboard_project
sudo gem install bundler
bundle
dashing start

@kinow
Copy link
Member

kinow commented Aug 10, 2017

Interesting. Maybe one of the libraries had some temporary files/folders from when it failed? I remember having that with a Python module some time ago, simply because somewhere a make clean of sorts was not invoked.

Let's close it as it seems to be working. Should you have anything that you believe could be documented for other Raspbian users, feel free to submit a pull request, or comment here :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants