go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

error while linking on osx with qt5 (brew) #135

Open morriswinkler opened 9 years ago

morriswinkler commented 9 years ago
/usr/local/go/pkg/tool/darwin_amd64/6l -o $WORK/gopkg.in/qml.v1/examples/painting/_obj/exe/a.out -L $WORK -L /Users/user/go/pkg/darwin_amd64 -extld=g++ $WORK/gopkg.in/qml.v1/examples/painting.a
# gopkg.in/qml.v1/examples/painting
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv117__class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv117__class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv121__vmi_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTI19QQuickImageProvider
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE
gopkg.in/qml%2ev1(__DATA/__const_coal): unexpected reloc for dynamic symbol _ZTVN10__cxxabiv120__si_class_type_infoE

any idea wher that could come from,

$ brew info qt5
qt5: stable 5.3.2 (bottled), HEAD
http://qt-project.org/

This formula is keg-only.
Qt 5 conflicts Qt 4 (which is currently much more widely used).

/usr/local/Cellar/qt5/5.2.1 (5475 files, 172M)
  Poured from bottle
/usr/local/Cellar/qt5/5.3.2 (5737 files, 179M) *
  Poured from bottle
From: https://github.com/mxcl/homebrew/blob/master/Library/Formula/qt5.rb
==> Dependencies
Build: pkg-config ✔
Optional: d-bus ✘
==> Options
--developer
    Build and link with developer options
--universal
    Build a universal binary
--with-d-bus
    Build with d-bus support
--with-docs
    Build documentation
--with-examples
    Build examples
--with-mysql
    Build with mysql support
--with-oci
    Build with Oracle OCI plugin
--HEAD
    install HEAD version
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
$ pkg-config --cflags Qt5Core Qt5Widgets Qt5Quick
-I/usr/local/Cellar/qt5/5.3.2/include/QtWidgets -I/usr/local/Cellar/qt5/5.3.2/include -I/usr/local/Cellar/qt5/5.3.2/include/QtQuick -I/usr/local/Cellar/qt5/5.3.2/include -I/usr/local/Cellar/qt5/5.3.2/include/QtGui -I/usr/local/Cellar/qt5/5.3.2/include -I/usr/local/Cellar/qt5/5.3.2/include/QtQml -I/usr/local/Cellar/qt5/5.3.2/include -I/usr/local/Cellar/qt5/5.3.2/include/QtNetwork -I/usr/local/Cellar/qt5/5.3.2/include -I/usr/local/Cellar/qt5/5.3.2/include/QtCore -I/usr/local/Cellar/qt5/5.3.2/include
morriswinkler commented 9 years ago

So i will answer this myself, i figured it is a problem with the c linker, i had to rebuild go, i used the OSX binary tarball from golang.org and than i used /src/all.bash to rebuild go, after that symbols get resolved.

sadly i just run into the next problem, it looks like QT5.1.1 is only supported till OSX 10.8

rawberg commented 9 years ago

Qt 5.4.2 installed via brew works great on OSX 10.10.3 with Go 1.4.2 (also installed with brew)