Compilation fail due to Qt


Git master of High Fidelity fails to compile near the end. My OS is Linux openSUSE Tumbleweed, whereas my version of Qt is 5.9.2. This is the error I get in the console output:

[ 91%] Building CXX object interface/CMakeFiles/interface.dir/interface_autogen/EJRQKI7XPS/qrc_qml.cpp.o
[ 91%] Linking CXX executable interface
../libraries/ui/libui.a(mocs_compilation.cpp.o): In function `ModalDialogListener::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/ui_autogen/UVLADIE3JM/moc_OffscreenUi.cpp:75: multiple definition of `ModalDialogListener::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)'
../libraries/ui/libui.a(OffscreenUi.cpp.o):/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/OffscreenUi.moc:237: first defined here
../libraries/ui/libui.a(mocs_compilation.cpp.o):( multiple definition of `ModalDialogListener::staticMetaObject'
../libraries/ui/libui.a(OffscreenUi.cpp.o):( first defined here
../libraries/ui/libui.a(mocs_compilation.cpp.o): In function `ModalDialogListener::metaObject() const':
/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/ui_autogen/UVLADIE3JM/moc_OffscreenUi.cpp:104: multiple definition of `ModalDialogListener::metaObject() const'
../libraries/ui/libui.a(OffscreenUi.cpp.o):/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/OffscreenUi.moc:256: first defined here
../libraries/ui/libui.a(mocs_compilation.cpp.o): In function `ModalDialogListener::qt_metacast(char const*)':
/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/ui_autogen/UVLADIE3JM/moc_OffscreenUi.cpp:109: multiple definition of `ModalDialogListener::qt_metacast(char const*)'
../libraries/ui/libui.a(OffscreenUi.cpp.o):/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/OffscreenUi.moc:261: first defined here
../libraries/ui/libui.a(mocs_compilation.cpp.o): In function `ModalDialogListener::qt_metacall(QMetaObject::Call, int, void**)':
/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/ui_autogen/UVLADIE3JM/moc_OffscreenUi.cpp:117: multiple definition of `ModalDialogListener::qt_metacall(QMetaObject::Call, int, void**)'
../libraries/ui/libui.a(OffscreenUi.cpp.o):/home/mircea/Games/SecondLife/HighFidelity_GIT/build/libraries/ui/OffscreenUi.moc:269: first defined here
../libraries/ui/libui.a(OffscreenUi.cpp.o): In function `AssetDialogListener::AssetDialogListener(QQuickItem*)':
OffscreenUi.cpp:(.text._ZN19AssetDialogListenerC2EP10QQuickItem[_ZN19AssetDialogListenerC5EP10QQuickItem]+0x27): undefined reference to `vtable for AssetDialogListener'
../libraries/ui/libui.a(OffscreenUi.cpp.o): In function `AssetDialogListener::~AssetDialogListener()':
OffscreenUi.cpp:(.text._ZN19AssetDialogListenerD2Ev[_ZN19AssetDialogListenerD5Ev]+0xf): undefined reference to `vtable for AssetDialogListener'
collect2: error: ld returned 1 exit status
make[2]: *** [interface/CMakeFiles/interface.dir/build.make:3402: interface/interface] Error 1
make[1]: *** [CMakeFiles/Makefile2:3192: interface/CMakeFiles/interface.dir/all] Error 2
make: *** [Makefile:152: all] Error 2


A quick look around on google seems to indicate this is often caused by stale build files being around… just in case, delete your build directory and start fresh with a new cmake + make cycle. Unless, of course, you’ve already tried that.


Just in case you do get it to compile you will likely run into issues trying to run. libnvtt etc etc etc. I created a clean Tumbleweed install on a VM, figured out all the packages, compiled and see all the carnage that ensues even if you succeed. Yes - there’s solutions to all, but, it’s now 12:23AM and sleep calls. Will add some more tomorrow on how to work around.


I will try with a fresh build directory next. I only attempted a ‘make clean’ followed by deleting CMakeCache.txt, I remember now that this might not always be enough.

I remember when Hifi last compiled (months ago) that it froze and / or crashed on startup. I have no idea if those issues were fixed since, but from what you’re describing that’s a negative. This is sad, I miss being able to run it on my Linux machine with free video drivers (Mesa)… still compiling it successfully is the first step in getting closer to that.


High Fidelity compiles successfully with a fresh build directory. Obviously interface doesn’t run due to various other issues, but at least compilation is now solved.


I’ll try to give some info on how to fix remainder later - keep in mind, you probably won’t love my hacky methods to fix up library references, but, after fighting with making this work consistently on Linux for 3 years… it’s what works and works despite HiFi constantly making subtle to not so subtle changes to how compiles work that routinely break things.


Thank you. You can send me the info in PM if you wish. I’d rather not open another thread until I make sure I’m not missing something I could solve.


Take a look at;

There’s a “generic” build script in there that should answer any remaining issues. I’ve gotten Interface, assignment-client and domain-server to compile/run under Tumbleweed. Now… as to whether or not Interface will actually be usable with your hardware/driver setup, no clue and outside what I have anything to do with.