Closed kuznetsovin closed 8 years ago
I have a same issue.
And I assume that libqmlrswrapper.a
wasn't linked correctly during build.rs
step, however it's ignored.
$ nm -u libqmlrswrapper.a
libqmlrswrapper.a(libqmlrswrapper.cpp.o):
__Unwind_Resume
__ZN10QArrayData10deallocateEPS_mm
__ZN10QByteArray11fromRawDataEPKci
__ZN10QByteArray11reallocDataEj6QFlagsIN10QArrayData16AllocationOptionEE
__ZN11QMetaObject12invokeMethodEP7QObjectPKcN2Qt14ConnectionTypeE22QGenericReturnArgument16QGenericArgumentS7_S7_S7_S7_S7_S7_S7_S7_S7_
__ZN11QQmlContext18setContextPropertyERK7QStringP7QObject
__ZN15QGuiApplication4execEv
__ZN15QGuiApplicationC1ERiPPci
__ZN16QCoreApplication4selfE
__ZN16QCoreApplicationC1ERiPPci
__ZN21QQmlApplicationEngine11rootObjectsEv
__ZN21QQmlApplicationEngine4loadERK4QUrl
__ZN21QQmlApplicationEngine8loadDataERK10QByteArrayRK4QUrl
__ZN21QQmlApplicationEngineC2EP7QObject
__ZN4QUrlC1ERK7QStringNS_11ParsingModeE
__ZN4QUrlC1Ev
__ZN4QUrlD1Ev
__ZN7QString13toUtf8_helperERKS_
__ZN7QString15fromUtf8_helperEPKci
__ZN8QVariantC1ERK7QString
__ZN8QVariantC1ERKS_
__ZN8QVariantC1Eb
__ZN8QVariantC1Ex
__ZN8QVariantD1Ev
__ZN8QVariantaSERKS_
__ZN9QListData11detach_growEPii
__ZN9QListData11shared_nullE
__ZN9QListData6appendEv
__ZN9QListData6detachEi
__ZN9QListData7disposeEPNS_4DataE
__ZNK10QQmlEngine11rootContextEv
__ZNK14QMessageLogger5fatalEPKcz
__ZNK8QVariant10canConvertEi
__ZNK8QVariant10toLongLongEPb
__ZNK8QVariant4typeEv
__ZNK8QVariant6toBoolEv
__ZNK8QVariant8toStringEv
__ZSt9terminatev
__ZTV20QrsApplicationEngine
__ZdlPv
__Znwm
___cxa_begin_catch
___cxa_end_catch
___cxa_rethrow
___gxx_personality_v0
_malloc
_memcpy
_strlen
libqmlrswrapper.a(qrsdynamicobject.cpp.o):
__Unwind_Resume
__Z9qBadAllocv
__ZN10QArrayData10deallocateEPS_mm
__ZN10QArrayData11shared_nullE
__ZN10QArrayData8allocateEmmm6QFlagsINS_16AllocationOptionEE
__ZN10QByteArray11reallocDataEj6QFlagsIN10QArrayData16AllocationOptionEE
__ZN10QByteArray6appendERKS_
__ZN10QByteArray6appendEc
__ZN11QMetaObject8activateEP7QObjectPKS_iPPv
__ZN7QObject10childEventEP11QChildEvent
__ZN7QObject10timerEventEP11QTimerEvent
__ZN7QObject11customEventEP6QEvent
__ZN7QObject11eventFilterEPS_P6QEvent
__ZN7QObject11qt_metacallEN11QMetaObject4CallEiPPv
__ZN7QObject13connectNotifyERK11QMetaMethod
__ZN7QObject16disconnectNotifyERK11QMetaMethod
__ZN7QObject16staticMetaObjectE
__ZN7QObject5eventEP6QEvent
__ZN7QObjectC2EPS_
__ZN7QObjectD2Ev
__ZN7QString13toUtf8_helperERKS_
__ZN7QString15fromUtf8_helperEPKci
__ZN7QString16fromAscii_helperEPKci
__ZN9QListData11detach_growEPii
__ZN9QListData11shared_nullE
__ZN9QListData5eraseEPPv
__ZN9QListData6appendEv
__ZN9QListData6detachEi
__ZN9QListData7disposeEPNS_4DataE
__ZNK14QMessageLogger7warningEPKcz
__ZNK7QString3argExii5QChar
__ZSt9terminatev
__ZTI7QObject
__ZTVN10__cxxabiv117__class_type_infoE
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZdlPv
__Znam
__Znwm
___bzero
___cxa_begin_catch
___cxa_end_catch
___cxa_rethrow
___gxx_personality_v0
_memcpy
libqmlrswrapper.a(qrsdynamicobject_capi.cpp.o):
__Unwind_Resume
__ZN10QArrayData10deallocateEPS_mm
__ZN16QrsDynamicObject10emitSignalEi
__ZN20QrsDynamicMetaObject6createEPFPvS0_iPP8QVariantES0_
__ZN20QrsDynamicMetaObjectC1Ev
__ZN7QString15fromUtf8_helperEPKci
__ZN9QListData11detach_growEPii
__ZN9QListData6appendEv
__ZN9QListData7disposeEPNS_4DataE
__ZNK14QMessageLogger5fatalEPKcz
__ZSt9terminatev
__ZdlPv
__Znwm
___cxa_begin_catch
___cxa_end_catch
___cxa_rethrow
___gxx_personality_v0
_strlen
libqmlrswrapper.a(qmlrswrapper_automoc.cpp.o):
__Unwind_Resume
__ZN10QArrayData10deallocateEPS_mm
__ZN10QQmlEngine5eventEP6QEvent
__ZN20QrsApplicationEngine13invokeQmlSlotE7QString5QListI8QVariantE
__ZN21QQmlApplicationEngine11qt_metacallEN11QMetaObject4CallEiPPv
__ZN21QQmlApplicationEngine11qt_metacastEPKc
__ZN21QQmlApplicationEngine16staticMetaObjectE
__ZN21QQmlApplicationEngineD2Ev
__ZN7QObject10childEventEP11QChildEvent
__ZN7QObject10timerEventEP11QTimerEvent
__ZN7QObject11customEventEP6QEvent
__ZN7QObject11eventFilterEPS_P6QEvent
__ZN7QObject13connectNotifyERK11QMetaMethod
__ZN7QObject16disconnectNotifyERK11QMetaMethod
__ZN8QVariantC1ERKS_
__ZN8QVariantD1Ev
__ZN8QVariantaSERKS_
__ZN9QListData6detachEi
__ZN9QListData7disposeEPNS_4DataE
__ZNK11QObjectData17dynamicMetaObjectEv
__ZSt9terminatev
__ZTI21QQmlApplicationEngine
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZdlPv
__Znwm
___cxa_begin_catch
___cxa_end_catch
___cxa_rethrow
___gxx_personality_v0
_strcmp
The fixes from #25 are allready integrated in current qmlrs, so they won't be of any help.
@tpickett66 or maybe @jxs, @SirVer anybody else on MacOSX who had it working before, can you reproduce this or look into this? I don't think I can help much without being able to try this out.
All of my systems are running 10.10 and I can't afford the downtime associated with an update right now. Let me look into getting a VM running with 10.11.
It's a bug of pkg-config 0.3.7, and not related to the version of OS X. Here is the explanation:
(I've added panic!()
to the last line of main()
in build.rs
, to inspect the stdout)
$ cargo clean && rm -r ext/libqmlrswrapper/build && cargo build
Compiling pkg-config v0.3.7
Compiling libc v0.2.7
Compiling qmlrs v0.1.0 (file:///Volumes/Secondary/workspace/qmlrs)
failed to run custom build command for `qmlrs v0.1.0 (file:///Volumes/Secondary/workspace/qmlrs)`
Process didn't exit successfully: `/Volumes/Secondary/workspace/qmlrs/target/debug/build/qmlrs-65e8affe1a257700/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=static=qmlrswrapper
cargo:rustc-link-lib=dylib=stdc++
cargo:rustc-link-search=native=/Volumes/Secondary/workspace/qmlrs/ext/libqmlrswrapper/build
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:cargo:rustc-link-lib=framework=QtQuick
cargo:cargo:rustc-link-lib=framework=QtGui
cargo:cargo:rustc-link-lib=framework=QtQml
cargo:cargo:rustc-link-lib=framework=QtNetwork
cargo:cargo:rustc-link-lib=framework=QtCore
--- stderr
thread '<main>' panicked at 'explicit panic', build.rs:80
As shown above, pkg_config::find_library()
prints invalid build output like cargo:cargo:rustc-link-lib=framework=QtQuick
.
It can be avoidable by fixing the build dependency to pkg_config = "=0.3.6"
.
$ cargo clean && rm -r ext/libqmlrswrapper/build && cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling pkg-config v0.3.6
Compiling libc v0.2.7
Compiling qmlrs v0.1.0 (file:///Volumes/Secondary/workspace/qmlrs)
failed to run custom build command for `qmlrs v0.1.0 (file:///Volumes/Secondary/workspace/qmlrs)`
Process didn't exit successfully: `/Volumes/Secondary/workspace/qmlrs/target/debug/build/qmlrs-65e8affe1a257700/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=static=qmlrswrapper
cargo:rustc-link-lib=dylib=stdc++
cargo:rustc-link-search=native=/Volumes/Secondary/workspace/qmlrs/ext/libqmlrswrapper/build
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-search=framework=/usr/local/Cellar/qt5/5.5.1_2/lib
cargo:rustc-link-lib=framework=QtQuick
cargo:rustc-link-lib=framework=QtGui
cargo:rustc-link-lib=framework=QtQml
cargo:rustc-link-lib=framework=QtNetwork
cargo:rustc-link-lib=framework=QtCore
--- stderr
thread '<main>' panicked at 'explicit panic', build.rs:80
@Kroisse thanks alot for your concise investigation and fixes! :+1: :grin:
e.g. @kuznetsovin, as I can't test this, could you verify that a downgrade of pkg-config to 0.3.6
via #40 fixes your problem? As soon as there's an independent confirmation, I'd publish a 0.1.1
version of qmlrs to fix this. Or maybe the upstream fix is faster with a pkg-config 0.3.8
? Let's see.
It's a pitty pkg-config-rs
doesn't have a proper changelog to see what the differences between the versions are… :confused:
@florianjacob fix #40 resolve the problem. Now all working fine. Thanks all.
Just released qmlrs 0.1.1 which pulls in pkg-config ^0.3.8
and should fix the problem.
…
Oh, you were 16 seconds faster closing this, not bad. Glad to see it works now. :smile:
Hi. I can't run factorial example on Mac OS X. When I try exec command
cargo run --verbose --example factorial
, I see error:QT5 I installed with homebrew. I tryning all recommendation from issue #25, but no results.