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

Cannot install gem on OS X 10.11.1 (El Capitan) #128

Closed krzysztof-magosa closed 8 years ago

krzysztof-magosa commented 8 years ago

Hi.

I'm trying to do gem install qtbindings, unfortunately without success.

Environment: OS X 10.11.1 (El Capitan) Apple LLVM version 7.0.0 (clang-700.0.72) cmake version 3.3.2 qt: stable 4.8.7 ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-darwin15.0.0]

Errors:

Scanning dependencies of target qtruby4shared
[ 79%] Building CXX object ruby/qtruby/src/CMakeFiles/qtruby4shared.dir/Qt.o
In file included from /Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/Qt.cpp:64:
In file included from /Users/hexio/.rbenv/versions/2.0.0-p647/include/ruby-2.0.0/ruby.h:33:
In file included from /Users/hexio/.rbenv/versions/2.0.0-p647/include/ruby-2.0.0/ruby/ruby.h:24:
/Users/hexio/.rbenv/versions/2.0.0-p647/include/ruby-2.0.0/x86_64-darwin15.0.0/ruby/config.h:17:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
#define _GNU_SOURCE 1
        ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/Qt.cpp:19:9: note: previous definition is here
#define _GNU_SOURCE
        ^
1 warning generated.
[ 80%] Building CXX object ruby/qtruby/src/CMakeFiles/qtruby4shared.dir/handlers.o
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/handlers.cpp:2413:72: error: use of undeclared identifier 'QSslCertificate'
DEF_VALUELIST_MARSHALLER( QSslCertificateList, QList<QSslCertificate>, QSslCertificate )
                                                                       ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/marshall_macros.h:41:75: note: expanded from macro 'DEF_VALUELIST_MARSHALLER'
        Marshall::HandlerFn marshall_##ListIdent = marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
                                                                          ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/handlers.cpp:2413:1: error: expected ';' after top level declarator
DEF_VALUELIST_MARSHALLER( QSslCertificateList, QList<QSslCertificate>, QSslCertificate )
^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/marshall_macros.h:41:103: note: expanded from macro 'DEF_VALUELIST_MARSHALLER'
        Marshall::HandlerFn marshall_##ListIdent = marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
                                                                                                      ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/handlers.cpp:2414:62: error: use of undeclared identifier 'QSslCipher'
DEF_VALUELIST_MARSHALLER( QSslCipherList, QList<QSslCipher>, QSslCipher )
                                                             ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/marshall_macros.h:41:75: note: expanded from macro 'DEF_VALUELIST_MARSHALLER'
        Marshall::HandlerFn marshall_##ListIdent = marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
                                                                          ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/handlers.cpp:2414:1: error: expected ';' after top level declarator
DEF_VALUELIST_MARSHALLER( QSslCipherList, QList<QSslCipher>, QSslCipher )
^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/marshall_macros.h:41:103: note: expanded from macro 'DEF_VALUELIST_MARSHALLER'
        Marshall::HandlerFn marshall_##ListIdent = marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
                                                                                                      ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/handlers.cpp:2415:60: error: use of undeclared identifier 'QSslError'
DEF_VALUELIST_MARSHALLER( QSslErrorList, QList<QSslError>, QSslError )
                                                           ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/marshall_macros.h:41:75: note: expanded from macro 'DEF_VALUELIST_MARSHALLER'
        Marshall::HandlerFn marshall_##ListIdent = marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
                                                                          ^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/handlers.cpp:2415:1: error: expected ';' after top level declarator
DEF_VALUELIST_MARSHALLER( QSslErrorList, QList<QSslError>, QSslError )
^
/Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/ext/ruby/qtruby/src/marshall_macros.h:41:103: note: expanded from macro 'DEF_VALUELIST_MARSHALLER'
        Marshall::HandlerFn marshall_##ListIdent = marshall_ValueListItem<Item,ItemList,ListIdent##STR>;
                                                                                                      ^
6 errors generated.
make[3]: *** [ruby/qtruby/src/CMakeFiles/qtruby4shared.dir/handlers.o] Error 1
make[2]: *** [ruby/qtruby/src/CMakeFiles/qtruby4shared.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [build] Error 2

Gem files will remain installed in /Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2 for inspection.
Results logged to /Users/hexio/.rbenv/versions/2.0.0-p647/lib/ruby/gems/2.0.0/gems/qtbindings-4.8.6.2/./gem_make.out

Any ideas how to avoid that? Thank you.

chrisst commented 8 years ago

I was able to install 4.8.6.2 on El Capitan with the following: cmake: 3.3.2 Apple LLVM version 7.0.0 (clang-700.0.72) qt: 4.8.7 ruby: 2.1.5p273

You can try and move to a newer ruby version and see if that works. Either way be sure you have a version of ruby that is compiled with all of the following CONFIGURE_OPTS: --with-gcc=clang --enable-shared. To check which configure options your current ruby install is built with you can run ruby -rrbconfig -e 'puts Config::CONFIG["configure_args"]' in the console.

ghost commented 8 years ago

@krzysztof-magosa check this out: https://github.com/ryanmelt/qtbindings/issues/45#issuecomment-12257885

krzysztof-magosa commented 8 years ago

I already tried with --enable-shared (I'm also using rbenv). It didn't change anything at all.

krzysztof-magosa commented 8 years ago

After update of Qt from 4.8.7 to 4.8.7_1 I'm able to install QtBindings.