[SOLVED] ruby-qml installation

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] ruby-qml installation

Postby nwtmg » Apr 28th, '20, 18:07

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.
Last edited by nwtmg on May 12th, '20, 18:48, edited 1 time in total.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » Apr 28th, '20, 18:51

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: ruby-qml installation

Postby nwtmg » Apr 29th, '20, 20:32

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.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » Apr 30th, '20, 00:48

According to the linker flags, you should probably install at least
Code: Select all
urpmi qt5widgets-devel qt5gui-devel qt5network-devel
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: ruby-qml installation

Postby nwtmg » Apr 30th, '20, 21:15

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.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » Apr 30th, '20, 22:27

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: ruby-qml installation

Postby nwtmg » May 1st, '20, 21:15

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.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » May 2nd, '20, 09:44

Please show the output of
Code: Select all
rpm -q gcc-c++
which g++
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: ruby-qml installation

Postby nwtmg » May 7th, '20, 12:47

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.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » May 7th, '20, 22:23

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: ruby-qml installation

Postby nwtmg » May 9th, '20, 21:29

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.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » May 9th, '20, 22:25

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 ~]$
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: ruby-qml installation

Postby nwtmg » May 12th, '20, 13:21

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.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14

Re: ruby-qml installation

Postby doktor5000 » May 12th, '20, 18:12

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] ruby-qml installation

Postby nwtmg » May 12th, '20, 18:49

MArked this as solved. Seems that I needed to install this one as root to have it available for all.
nwtmg
 
Posts: 175
Joined: Jun 2nd, '15, 22:14


Return to Basic support

Who is online

Users browsing this forum: Google [Bot] and 1 guest