hybridgroup / kidsruby

KidsRuby is a Ruby programming environment meant for kids to learn and have fun!
http://kidsruby.com
Other
333 stars 104 forks source link

install on Ubuntu 10.04 fails in native gem compilation, cmake is missing #10

Closed petervandenabeele closed 12 years ago

petervandenabeele commented 12 years ago

Hi,

I tried the literal install commands for Ubuntu as documented

sudo apt-get install libqt4-dev bundle install

but the building of the native gem failed.

This is my development Ubuntu system on which I have built quite a lot of other native gems. But the Qt install was new.

I figured out the cmake command was missing. It would be useful to add this to the documentation (I will provide a patch for that).

I am using ruby 1.9.2 on rvm

Many thanks,

Peter

peterv@ASUS:~$ sudo apt-get install libqt4-dev
[sudo] password for peterv: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libaudio2 libdrm-dev libgl1-mesa-dev libglu1-mesa-dev libphonon4
  libqt4-assistant libqt4-dbus libqt4-designer libqt4-help libqt4-multimedia
  libqt4-network libqt4-opengl libqt4-opengl-dev libqt4-qt3support
  libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-svg
  libqt4-test libqt4-webkit libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4
  mesa-common-dev qt4-qmake
Suggested packages:
  nas qt4-dev-tools qt4-doc libsqlite0-dev unixodbc-dev qt4-qtconfig
The following NEW packages will be installed:
  libaudio2 libdrm-dev libgl1-mesa-dev libglu1-mesa-dev libphonon4
  libqt4-assistant libqt4-dbus libqt4-designer libqt4-dev libqt4-help
  libqt4-multimedia libqt4-network libqt4-opengl libqt4-opengl-dev
  libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql
  libqt4-sql-mysql libqt4-svg libqt4-test libqt4-webkit libqt4-xml
  libqt4-xmlpatterns libqtcore4 libqtgui4 mesa-common-dev qt4-qmake
0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.4MB of archives.
After this operation, 105MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://be.archive.ubuntu.com/ubuntu/ lucid/main libaudio2 1.9.2-3 [81.0kB]
Get:2 http://be.archive.ubuntu.com/ubuntu/ lucid/main libdrm-dev 2.4.18-1ubuntu3 [515kB]
Get:3 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main mesa-common-dev 7.7.1-1ubuntu3 [2,339kB]
Get:4 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libgl1-mesa-dev 7.7.1-1ubuntu3 [31.5kB]
Get:5 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libglu1-mesa-dev 7.7.1-1ubuntu3 [213kB]
Get:6 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqtcore4 4:4.6.2-0ubuntu5.3 [1,723kB]
Get:7 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-xml 4:4.6.2-0ubuntu5.3 [124kB]
Get:8 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-dbus 4:4.6.2-0ubuntu5.3 [224kB]
Get:9 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-script 4:4.6.2-0ubuntu5.3 [793kB]
Get:10 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqtgui4 4:4.6.2-0ubuntu5.3 [4,013kB]
Get:11 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-designer 4:4.6.2-0ubuntu5.3 [4,718kB]
Get:12 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libphonon4 4:4.6.2-0ubuntu5.3 [157kB]
Get:13 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-network 4:4.6.2-0ubuntu5.3 [445kB]
Get:14 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-assistant 4:4.6.2-0ubuntu5.3 [46.4kB]
Get:15 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-sql 4:4.6.2-0ubuntu5.3 [128kB]
Get:16 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-qt3support 4:4.6.2-0ubuntu5.3 [1,106kB]
Get:17 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-svg 4:4.6.2-0ubuntu5.3 [168kB]
Get:18 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-xmlpatterns 4:4.6.2-0ubuntu5.3 [1,108kB]
Get:19 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-webkit 4:4.6.2-0ubuntu5.3 [4,367kB]
Get:20 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-scripttools 4:4.6.2-0ubuntu5.3 [261kB]
Get:21 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-help 4:4.6.2-0ubuntu5.3 [220kB]
Get:22 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-test 4:4.6.2-0ubuntu5.3 [87.5kB]
Get:23 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-multimedia 4:4.6.2-0ubuntu5.3 [83.9kB]
Get:24 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main qt4-qmake 4:4.6.2-0ubuntu5.3 [1,263kB]
Get:25 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-dev 4:4.6.2-0ubuntu5.3 [2,854kB]
Get:26 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-opengl 4:4.6.2-0ubuntu5.3 [266kB]
Get:27 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-opengl-dev 4:4.6.2-0ubuntu5.3 [44.5kB]
Get:28 http://be.archive.ubuntu.com/ubuntu/ lucid-updates/main libqt4-sql-mysql 4:4.6.2-0ubuntu5.3 [60.0kB]
Fetched 27.4MB in 18s (1,492kB/s)                                              
Selecting previously deselected package libaudio2.
(Reading database ... 392430 files and directories currently installed.)
Unpacking libaudio2 (from .../libaudio2_1.9.2-3_i386.deb) ...
Selecting previously deselected package libdrm-dev.
Unpacking libdrm-dev (from .../libdrm-dev_2.4.18-1ubuntu3_i386.deb) ...
Replaced by files in installed package linux-libc-dev ...
Selecting previously deselected package mesa-common-dev.
Unpacking mesa-common-dev (from .../mesa-common-dev_7.7.1-1ubuntu3_i386.deb) ...
Selecting previously deselected package libgl1-mesa-dev.
Unpacking libgl1-mesa-dev (from .../libgl1-mesa-dev_7.7.1-1ubuntu3_i386.deb) ...
Selecting previously deselected package libglu1-mesa-dev.
Unpacking libglu1-mesa-dev (from .../libglu1-mesa-dev_7.7.1-1ubuntu3_i386.deb) ...
Selecting previously deselected package libqtcore4.
Unpacking libqtcore4 (from .../libqtcore4_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-xml.
Unpacking libqt4-xml (from .../libqt4-xml_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-dbus.
Unpacking libqt4-dbus (from .../libqt4-dbus_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-script.
Unpacking libqt4-script (from .../libqt4-script_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqtgui4.
Unpacking libqtgui4 (from .../libqtgui4_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-designer.
Unpacking libqt4-designer (from .../libqt4-designer_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libphonon4.
Unpacking libphonon4 (from .../libphonon4_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-network.
Unpacking libqt4-network (from .../libqt4-network_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-assistant.
Unpacking libqt4-assistant (from .../libqt4-assistant_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-sql.
Unpacking libqt4-sql (from .../libqt4-sql_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-qt3support.
Unpacking libqt4-qt3support (from .../libqt4-qt3support_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-svg.
Unpacking libqt4-svg (from .../libqt4-svg_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-xmlpatterns.
Unpacking libqt4-xmlpatterns (from .../libqt4-xmlpatterns_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-webkit.
Unpacking libqt4-webkit (from .../libqt4-webkit_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-scripttools.
Unpacking libqt4-scripttools (from .../libqt4-scripttools_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-help.
Unpacking libqt4-help (from .../libqt4-help_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-test.
Unpacking libqt4-test (from .../libqt4-test_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-multimedia.
Unpacking libqt4-multimedia (from .../libqt4-multimedia_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package qt4-qmake.
Unpacking qt4-qmake (from .../qt4-qmake_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-dev.
Unpacking libqt4-dev (from .../libqt4-dev_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-opengl.
Unpacking libqt4-opengl (from .../libqt4-opengl_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-opengl-dev.
Unpacking libqt4-opengl-dev (from .../libqt4-opengl-dev_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Selecting previously deselected package libqt4-sql-mysql.
Unpacking libqt4-sql-mysql (from .../libqt4-sql-mysql_4%3a4.6.2-0ubuntu5.3_i386.deb) ...
Processing triggers for man-db ...
Setting up libaudio2 (1.9.2-3) ...

Setting up libdrm-dev (2.4.18-1ubuntu3) ...
Setting up mesa-common-dev (7.7.1-1ubuntu3) ...
Setting up libgl1-mesa-dev (7.7.1-1ubuntu3) ...
Setting up libglu1-mesa-dev (7.7.1-1ubuntu3) ...
Setting up libqtcore4 (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-xml (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-dbus (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-script (4:4.6.2-0ubuntu5.3) ...

Setting up libqtgui4 (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-designer (4:4.6.2-0ubuntu5.3) ...

Setting up libphonon4 (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-network (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-assistant (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-sql (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-qt3support (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-svg (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-xmlpatterns (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-webkit (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-scripttools (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-help (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-test (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-multimedia (4:4.6.2-0ubuntu5.3) ...

Setting up qt4-qmake (4:4.6.2-0ubuntu5.3) ...
update-alternatives: using /usr/bin/qmake-qt4 to provide /usr/bin/qmake (qmake) in auto mode.

Setting up libqt4-dev (4:4.6.2-0ubuntu5.3) ...
update-alternatives: using /usr/bin/moc-qt4 to provide /usr/bin/moc (moc) in auto mode.
update-alternatives: using /usr/bin/uic-qt4 to provide /usr/bin/uic (uic) in auto mode.
update-alternatives: using /usr/bin/lupdate-qt4 to provide /usr/bin/lupdate (lupdate) in auto mode.
update-alternatives: using /usr/bin/lrelease-qt4 to provide /usr/bin/lrelease (lrelease) in auto mode.

Setting up libqt4-opengl (4:4.6.2-0ubuntu5.3) ...

Setting up libqt4-opengl-dev (4:4.6.2-0ubuntu5.3) ...
Setting up libqt4-sql-mysql (4:4.6.2-0ubuntu5.3) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

peterv@ASUS:~/b/github$ mkdir hybridgroup/
peterv@ASUS:~/b/github$ cd hybridgroup/
peterv@ASUS:~/b/github/hybridgroup$ git clone git://github.com/hybridgroup/kidsruby.git
Initialized empty Git repository in /home/peterv/data/backed_up/github/hybridgroup/kidsruby/.git/
remote: Counting objects: 1489, done.
remote: Compressing objects: 100% (776/776), done.
remote: Total 1489 (delta 720), reused 1404 (delta 642)
Receiving objects: 100% (1489/1489), 8.58 MiB | 1.87 MiB/s, done.
Resolving deltas: 100% (720/720), done.
peterv@ASUS:~/b/github/hybridgroup$ l
total 4
drwxr-xr-x 7 peterv peterv 4096 2011-09-28 22:55 kidsruby
peterv@ASUS:~/b/github/hybridgroup$ cd kidsruby/
peterv@ASUS:~/b/github/hybridgroup/kidsruby$ l
total 44
drwxr-xr-x 4 peterv peterv 4096 2011-09-28 22:55 app
-rw-r--r-- 1 peterv peterv  142 2011-09-28 22:55 Gemfile
-rw-r--r-- 1 peterv peterv  296 2011-09-28 22:55 Gemfile.lock
drwxr-xr-x 3 peterv peterv 4096 2011-09-28 22:55 lib
-rw-r--r-- 1 peterv peterv 3149 2011-09-28 22:55 LICENSE
-rw-r--r-- 1 peterv peterv  441 2011-09-28 22:55 main.rb
drwxr-xr-x 6 peterv peterv 4096 2011-09-28 22:55 public
-rw-r--r-- 1 peterv peterv  179 2011-09-28 22:55 Rakefile
-rw-r--r-- 1 peterv peterv 4531 2011-09-28 22:55 README.md
drwxr-xr-x 4 peterv peterv 4096 2011-09-28 22:55 spec

peterv@ASUS:~/b/github/hybridgroup/kidsruby$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

peterv@ASUS:~/b/github/hybridgroup/kidsruby$ ruby main.rb 
/home/peterv/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- Qt (LoadError)
    from /home/peterv/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from main.rb:3:in `
' peterv@ASUS:~/b/github/hybridgroup/kidsruby$ rvm gemset create kidsruby 'kidsruby' gemset created (/home/peterv/.rvm/gems/ruby-1.9.2-p290@kidsruby). peterv@ASUS:~/b/github/hybridgroup/kidsruby$ rvm gemset use kidsruby peterv@ASUS:~/b/github/hybridgroup/kidsruby$ gem list *** LOCAL GEMS *** rake (0.8.7) peterv@ASUS:~/b/github/hybridgroup/kidsruby$ gem install bundler Fetching: bundler-1.0.20.gem (100%) Successfully installed bundler-1.0.20 1 gem installed peterv@ASUS:~/b/github/hybridgroup/kidsruby$ bundle install Fetching source index for http://rubygems.org/ Using rake (0.8.7) Installing htmlentities (4.2.3) Installing mime-types (1.16) Installing mocha (0.9.10) Installing qtbindings (4.6.3.4) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/peterv/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb make mkdir ext/build mkdir bin/1.8 mkdir bin/1.9 mkdir bin/plugins mkdir bin/plugins/accessible mkdir bin/plugins/codecs mkdir bin/plugins/designer mkdir bin/plugins/graphicssystems mkdir bin/plugins/iconengines mkdir bin/plugins/imageformats mkdir bin/plugins/phonon_backend mkdir bin/plugins/sqldrivers mkdir lib/1.8 mkdir lib/1.9 cd ext/build; rm -rf CMakeFiles cd ext/build; rm -rf generator cd ext/build; rm -rf smoke cd ext/build; rm -rf ruby cd ext/build; rm * rm: cannot remove `*': No such file or directory make: [clean] Error 1 (ignored) cd ext/build; \ cmake \ -G "Unix Makefiles" \ -Wno-dev \ -DENABLE_SMOKE=on \ -DENABLE_QTCORE_SMOKE=on \ -DENABLE_QTNETWORK_SMOKE=on \ -DENABLE_QTDBUS_SMOKE=on \ -DENABLE_QTGUI_SMOKE=on \ -DENABLE_QTSVG_SMOKE=on \ -DENABLE_QTSQL_SMOKE=on \ -DENABLE_QTXML_SMOKE=on \ -DENABLE_QTXMLPATTERNS_SMOKE=on \ -DENABLE_QTOPENGL_SMOKE=on \ -DENABLE_QTWEBKIT_SMOKE=on \ -DENABLE_QTSCRIPT_SMOKE=on \ -DENABLE_QTUITOOLS_SMOKE=on \ -DENABLE_QTTEST_SMOKE=on \ -DENABLE_QTMULTIMEDIA_SMOKE=on \ -DENABLE_QTRUBY=on \ -DENABLE_QTWEBKIT_RUBY=on \ -DENABLE_QTUITOOLS_RUBY=on \ -DENABLE_QTSCRIPT=on \ -DENABLE_QTTEST=on \ .. /bin/sh: cmake: not found make: [build] Error 127 (ignored) cd ext/build; make make[1]: Entering directory `/home/peterv/.rvm/gems/ruby-1.9.2-p290@kidsruby/gems/qtbindings-4.6.3.4/ext/build' make[1]: *** No targets specified and no makefile found. Stop. make[1]: Leaving directory `/home/peterv/.rvm/gems/ruby-1.9.2-p290@kidsruby/gems/qtbindings-4.6.3.4/ext/build' make: *** [build] Error 2 Gem files will remain installed in /home/peterv/.rvm/gems/ruby-1.9.2-p290@kidsruby/gems/qtbindings-4.6.3.4 for inspection. Results logged to /home/peterv/.rvm/gems/ruby-1.9.2-p290@kidsruby/gems/qtbindings-4.6.3.4/./gem_make.out An error occured while installing qtbindings (4.6.3.4), and Bundler cannot continue. Make sure that `gem install qtbindings -v '4.6.3.4'` succeeds before bundling. peterv@ASUS:~/b/github/hybridgroup/kidsruby$ sudo apt-get install cmake [sudo] password for peterv: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cmake-data The following NEW packages will be installed: cmake cmake-data 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 6,627kB of archives. After this operation, 16.4MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://be.archive.ubuntu.com/ubuntu/ lucid/main cmake-data 2.8.0-5ubuntu1 [1,937kB] Get:2 http://be.archive.ubuntu.com/ubuntu/ lucid/main cmake 2.8.0-5ubuntu1 [4,690kB] Fetched 6,627kB in 4s (1,480kB/s) Selecting previously deselected package cmake-data. (Reading database ... 396329 files and directories currently installed.) Unpacking cmake-data (from .../cmake-data_2.8.0-5ubuntu1_all.deb) ... Selecting previously deselected package cmake. Unpacking cmake (from .../cmake_2.8.0-5ubuntu1_i386.deb) ... Processing triggers for man-db ... Setting up cmake-data (2.8.0-5ubuntu1) ... emacsen-common: Handling install of emacsen flavor emacs emacsen-common: Handling install of emacsen flavor emacs23 emacsen-common: byte-compiling for emacs23 Wrote /etc/emacs23/site-start.d/00debian-vars.elc In debian-run-directories: debian-startup.el:131:25:Warning: `mapcar' called for effect; use `mapc' or `dolist' instead Wrote /usr/share/emacs23/site-lisp/debian-startup.elc install/cmake-data: Byte-compiling for emacs23 Wrote /usr/share/emacs23/site-lisp/cmake-data/cmake-mode.elc Setting up cmake (2.8.0-5ubuntu1) ...
phlipper commented 12 years ago

Hello,

The readme has been updated thanks to your pull request #11. Thanks!