ryanmelt / qtbindings

An easy to install gem version of the Ruby bindings to Qt
http://github.com/ryanmelt/qtbindings
Other
340 stars 63 forks source link

Native code compile fails on Mint 17.3 MATE #142

Closed dwilde1 closed 8 years ago

dwilde1 commented 8 years ago

Mint is a derivative of Ubuntu 14.04 LTS. Gem installed as sudo gem install qtbindings. Intent is to compile for QT4 although there are some Qt5 packages installed. Ruby 2.2.5 compiled from Source. Qt libraries installed as .deb packages from Synaptic. gem_make.out.txt

jmthomas commented 8 years ago

It looks like you have a ruby installation in /opt/ruby-2.2.5 which is conflicting with your built against copy in /usr/local/lib/ruby.

dwilde1 commented 8 years ago

It's the same installation. The sources are built in /opt/ruby and it puts the gem repos in /usr/local/lib/ruby. The binary goes in /usr/local/bin. It's been this way in every ruby since they included gem in the distro.

I'll try cleaning out the /opt/ruby binariy.

On 6/8/16, Jason Thomas notifications@github.com wrote:

It looks like you have a ruby installation in /opt/ruby-2.2.5 which is conflicting with your built against copy in /usr/local/lib/ruby.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/ryanmelt/qtbindings/issues/142#issuecomment-224721079

Don Wilde

dwilde1 commented 8 years ago

Getting further...

Linking CXX shared library libqtruby4shared.so /usr/local/lib/libruby-static.a(sprintf.o): In function rb_str_catf': /opt/ruby-2.2.5/sprintf.c:1423: multiple definition ofrb_str_catf' CMakeFiles/qtruby4shared.dir/Qt.o:Qt.cpp:(.text+0x1503): first defined here /usr/bin/ld: /usr/local/lib/libruby-static.a(array.o): relocation R_X86_64_PC32 against symbol rb_ary_entry' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make[3]: *** [ruby/qtruby/src/libqtruby4shared.so.2.0.0] Error 1 make[3]: Leaving directory /usr/local/lib/ruby/gems/2.2.0/gems/qtbindings-4.8.6.2/ext/build' make[2]: * [ruby/qtruby/src/CMakeFiles/qtruby4shared.dir/all] Error 2 make[2]: Leaving directory `/usr/local/lib/ruby/gems/2.2.0/gems/qtbindings-4.8.6.2/ext/build' make[1]: * [all] Error 2 make[1]: Leaving directory `/usr/local/lib/ruby/gems/2.2.0/gems/qtbindings-4.8.6.2/ext/build' make: *\ [build] Error 2

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.2.0/gems/qtbindings-4.8.6.2 for inspection. Results logged to /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/qtbindings-4.8.6.2/gem_make.out din@Synergy00008 /opt/ruby $ cd /usr/local/lib/ruby/gems/2.2.0/gems/qtbindings-4.8.6.2

That's after removing every SMOKE module...

On 6/9/16, Don Wilde dwilde1@gmail.com wrote:

It's the same installation. The sources are built in /opt/ruby and it puts the gem repos in /usr/local/lib/ruby. The binary goes in /usr/local/bin. It's been this way in every ruby since they included gem in the distro.

I'll try cleaning out the /opt/ruby binariy.

On 6/8/16, Jason Thomas notifications@github.com wrote:

It looks like you have a ruby installation in /opt/ruby-2.2.5 which is conflicting with your built against copy in /usr/local/lib/ruby.


You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/ryanmelt/qtbindings/issues/142#issuecomment-224721079

Don Wilde

Don Wilde

ryanmelt commented 8 years ago

From the readme:

Ruby installed and in your path (Ruby must be compiled with --enable-shared on all platforms and with --with-gcc=clang on OSX)

It looks like your ruby was not compiled with --enable-shared

dwilde1 commented 8 years ago

Yay, got it.

Thank you for your patience, Jason! Although I started with FreeBSD in 1992, the admonition to 'RTFM' has inevitably given way to expectations that things will 'just work'. I've been in this biz long enough to know the complexities behind packages as complex as marrying Qt and Ruby.

My next project is marrying Ruby to the Open Dynamics Engine through libFFI, and you've helped me immensely by helping me to prepare for my GUI once I get the acceleration simulator flying. (literally; I'm making a drone automated flight path optimizer)

Don Wilde

jmthomas commented 8 years ago

I hope Ruby and Qt serve you well. Good luck!