Page 1 of 1

[SOLVED] ruby-qml installation

PostPosted: Apr 28th, '20, 18:07
by nwtmg
Attempting to add the qml gem ruby using the command as regular user

Code: Select all
gem install qml


getting following error

Code: Select all
current directory: /home/USER/.gem/ruby/2.5.0/gems/qml-1.0.2/ext/qml
/usr/bin/ruby -r ./siteconf20200428-17005-1nticnd.rb extconf.rb
checking for qmake... yes
  >>> building libqmlbind...
Project MESSAGE: Warning: unknown QT: qml
Project MESSAGE: Warning: unknown QT: quick
Project MESSAGE: Warning: unknown QT: core-private
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQMLBIND_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iinclude -I. -o api_application.o src/api_application.cpp
make: g++: Command not found
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQMLBIND_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iinclude -I. -o api_engine.o src/api_engine.cpp
make: g++: Command not found
make: *** [Makefile:270: api_application.o] Error 127
make: *** Waiting for unfinished jobs....
make: *** [Makefile:278: api_engine.o] Error 127
ERROR: Failed to build libqmlbind
*** 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)
   --with-qmake
   --without-qmake
   --enable-debug
   --disable-debug
   --enable-clean
   --disable-clean

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/USER/.gem/ruby/2.5.0/extensions/x86-linux/2.5.0/qml-1.0.2/mkmf.log

extconf failed, exit code 1




I feeel that Ia mmissing some qt5 files. Thanks for your help.

Re: ruby-qml installation

PostPosted: Apr 28th, '20, 18:51
by doktor5000
nwtmg wrote:make: g++: Command not found

That one is pretty obvious, at first you would need to install gcc-c++

Then you probably need to install the necessary devel packages, so as root do

Code: Select all
urpmi gcc-c++ qt5qml-devel qt5quick-devel qt5core-devel

Re: ruby-qml installation

PostPosted: Apr 29th, '20, 20:32
by nwtmg
THanks for your response.

Getting a new error

Code: Select all
current directory: /home/USER/.gem/ruby/2.5.0/gems/qml-1.0.2/ext/qml
/usr/bin/ruby -r ./siteconf20200429-17176-1bcg85i.rb extconf.rb
checking for qmake... yes
  >>> building libqmlbind...
Info: creating stash file /home/USER/.gem/ruby/2.5.0/gems/qml-1.0.2/ext/qml/lib/libqmlbind/qmlbind/.qmake.stash
Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!
g++ -c -pipe -std=gnu++0x -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQMLBIND_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Iinclude -I/usr/lib/qt5/include -I/usr/lib/qt5/include/QtWidgets -I/usr/lib/qt5/include/QtQuick -I/usr/lib/qt5/include/QtGui -I/usr/lib/qt5/include/QtQml -I/usr/lib/qt5/include/QtNetwork -I/usr/lib/qt5/include/QtCore/5.12.6 -I/usr/lib/qt5/include/QtCore/5.12.6/QtCore -I/usr/lib/qt5/include/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt5/mkspecs/linux-g++ -o api_application.o src/api_application.cpp
g++ -c -pipe -std=gnu++0x -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQMLBIND_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Iinclude -I/usr/lib/qt5/include -I/usr/lib/qt5/include/QtWidgets -I/usr/lib/qt5/include/QtQuick -I/usr/lib/qt5/include/QtGui -I/usr/lib/qt5/include/QtQml -I/usr/lib/qt5/include/QtNetwork -I/usr/lib/qt5/include/QtCore/5.12.6 -I/usr/lib/qt5/include/QtCore/5.12.6/QtCore -I/usr/lib/qt5/include/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt5/mkspecs/linux-g++ -o api_engine.o src/api_engine.cpp
g++ -c -pipe -std=gnu++0x -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQMLBIND_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Iinclude -I/usr/lib/qt5/include -I/usr/lib/qt5/include/QtWidgets -I/usr/lib/qt5/include/QtQuick -I/usr/lib/qt5/include/QtGui -I/usr/lib/qt5/include/QtQml -I/usr/lib/qt5/include/QtNetwork -I/usr/lib/qt5/include/QtCore/5.12.6 -I/usr/lib/qt5/include/QtCore/5.12.6/QtCore -I/usr/lib/qt5/include/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt5/mkspecs/linux-g++ -o api_iterator.o src/api_iterator.cpp
g++ -c -pipe -std=gnu++0x -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DPIC -fPIC -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQMLBIND_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Iinclude -I/usr/lib/qt5/include -I/usr/lib/qt5/include/QtWidgets -I/usr/lib/qt5/include/QtQuick -I/usr/lib/qt5/include/QtGui -I/usr/lib/qt5/include/QtQml -I/usr/lib/qt5/include/QtNetwork -I/usr/lib/qt5/include/QtCore/5.12.6 -I/usr/lib/qt5/include/QtCore/5.12.6/QtCore -I/usr/lib/qt5/include/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/qt5/mkspecs/linux-g++ -o api_value.o src/api_value.cpp
src/api_application.cpp:4:10: fatal error: QApplication: No such file or directory
 #include <QApplication>
          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:630: api_application.o] Error 1
make: *** Waiting for unfinished jobs....
src/api_engine.cpp:8:10: fatal error: QApplication: No such file or directory
 #include <QApplication>
          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:735: api_engine.o] Error 1
ERROR: Failed to build libqmlbind
*** 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)
   --with-qmake
   --without-qmake
   --enable-debug
   --disable-debug
   --enable-clean
   --disable-clean

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/USER/.gem/ruby/2.5.0/extensions/x86-linux/2.5.0/qml-1.0.2/mkmf.log

extconf failed, exit code 1



THanks in advance.

Re: ruby-qml installation

PostPosted: Apr 30th, '20, 00:48
by doktor5000
According to the linker flags, you should probably install at least
Code: Select all
urpmi qt5widgets-devel qt5gui-devel qt5network-devel

Re: ruby-qml installation

PostPosted: Apr 30th, '20, 21:15
by nwtmg
Running gem install qml as user with new error.

Code: Select all
current directory: /home/USER/.gem/ruby/2.5.0/gems/qml-1.0.2/ext/qml
/usr/bin/ruby -r ./siteconf20200430-10602-1dqf0wn.rb extconf.rb
checking for qmake... yes
  >>> building libqmlbind...
Project ERROR: Cannot run compiler 'g++'. Output:
===================
===================
Maybe you forgot to setup the environment?
make: *** No targets specified and no makefile found.  Stop.
ERROR: Failed to build libqmlbind
*** 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)
   --with-qmake
   --without-qmake
   --enable-debug
   --disable-debug
   --enable-clean
   --disable-clean

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/USER/.gem/ruby/2.5.0/extensions/x86-linux/2.5.0/qml-1.0.2/mkmf.log

extconf failed, exit code 1



Made all the installations of packages you suggested.

Re: ruby-qml installation

PostPosted: Apr 30th, '20, 22:27
by doktor5000
nwtmg wrote:Project ERROR: Cannot run compiler 'g++'. Output:

[...]

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/home/USER/.gem/ruby/2.5.0/extensions/x86-linux/2.5.0/qml-1.0.2/mkmf.log


If you really have g++ installed, then I'd suggest you read and do what the compile process recommends.

Re: ruby-qml installation

PostPosted: May 1st, '20, 21:15
by nwtmg
output from mkmf.log

Code: Select all
find_executable: checking for qmake... -------------------- yes

--------------------


output from gem_make.out

Code: Select all
current directory: /home/USER/.gem/ruby/2.5.0/gems/qml-1.0.2/ext/qml
/usr/bin/ruby -r ./siteconf20200501-21560-4cbqhq.rb extconf.rb
checking for qmake... yes
  >>> building libqmlbind...
Project ERROR: Cannot run compiler 'g++'. Output:
===================
===================
Maybe you forgot to setup the environment?
make: *** No targets specified and no makefile found.  Stop.
ERROR: Failed to build libqmlbind
*** 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)
   --with-qmake
   --without-qmake
   --enable-debug
   --disable-debug
   --enable-clean
   --disable-clean

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/USER/.gem/ruby/2.5.0/extensions/x86-linux/2.5.0/qml-1.0.2/mkmf.log

extconf failed, exit code 1



I ran all the updates you suggested. If I need a configuration option I do not know which one and also the correct value. Thanks.

Re: ruby-qml installation

PostPosted: May 2nd, '20, 09:44
by doktor5000
Please show the output of
Code: Select all
rpm -q gcc-c++
which g++

Re: ruby-qml installation

PostPosted: May 7th, '20, 12:47
by nwtmg
output from rpm -q gcc-c++

Code: Select all
rpm -q gcc-c++


output from rpm -q gcc-c++

Code: Select all
rpm -q gcc-c++


reran qem install qml and still getting same error. thnks.

Re: ruby-qml installation

PostPosted: May 7th, '20, 22:23
by doktor5000
FWIW, you copied only the command four times, but without any output. There were two commands, and you'd also get either an error message that the package is not installed, or a package name+version.

Re: ruby-qml installation

PostPosted: May 9th, '20, 21:29
by nwtmg
Oops!

Output from rpm -q gcc-c++

Code: Select all
gcc-c++-8.4.0-1.mga7


Output from which g++

Code: Select all
/usr/bin/g++


Thanks.

Re: ruby-qml installation

PostPosted: May 9th, '20, 22:25
by doktor5000
Well, can't really help you any further with the logs you posted, those don't indicate any further issues.
You should probably ask upstream on how to find out what's wrong: https://github.com/seanchas116/ruby-qml/issues


Apart from that, it works just fine here, cannot reproduce your issue. In a VM, installed the following packages:

gcc-c++ qt5qml-devel qt5quick-devel qt5core-devel qt5widgets-devel qt5gui-devel qt5network-devel ruby ruby-devel

and then afterwards gem install worked just fine:

Code: Select all
[doktor5000@Mageia7VM ~]$ gem install qml
Building native extensions.  This could take a while...
Successfully installed qml-1.0.2
Parsing documentation for qml-1.0.2
Installing ri documentation for qml-1.0.2
Done installing documentation for qml after 0 seconds
1 gem installed
[doktor5000@Mageia7VM ~]$

Re: ruby-qml installation

PostPosted: May 12th, '20, 13:21
by nwtmg
THanks for all your assistance in this matter. Ran the following command as root

Code: Select all
urpmi gcc-c++ qt5qml-devel qt5quick-devel qt5core-devel qt5widgets-devel qt5gui-devel qt5network-devel ruby ruby-devel


Returned following message.

Code: Select all
Packages libqt5network-devel-5.12.6-2.mga7.i586, libqt5qml-devel-5.12.6-1.mga7.i586, libqt5quick-devel-5.12.6-1.mga7.i586, libqt5widgets-devel-5.12.6-2.mga7.i586, ruby-2.5.7-20.mga7.i586, gcc-c++-8.4.0-1.mga7.i586, libqt5core-devel-5.12.6-2.mga7.i586, ruby-devel-2.5.7-20.mga7.i586, libqt5gui-devel-5.12.6-2.mga7.i586 are already installed


THen executed gem install qml as ROOT. Normally run command as user.

Code: Select all
Fetching: qml-1.0.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed qml-1.0.2
Parsing documentation for qml-1.0.2
Installing ri documentation for qml-1.0.2
Done installing documentation for qml after 3 seconds
1 gem installed


Now that this has been installed as root what will this mean for regular user? Thanks.

Re: ruby-qml installation

PostPosted: May 12th, '20, 18:12
by doktor5000
nwtmg wrote:Now that this has been installed as root what will this mean for regular user? Thanks.

I don't know, I don't use ruby gems.

AFAICT installing as user will install the gems into ~/.gem/ruby/ and if you install as root you install it for all users below /usr/share/gems/gems

You may want to read up on that: https://guides.rubygems.org/faqs

Re: [SOLVED] ruby-qml installation

PostPosted: May 12th, '20, 18:49
by nwtmg
MArked this as solved. Seems that I needed to install this one as root to have it available for all.