mitsuba icon indicating copy to clipboard operation
mitsuba copied to clipboard

mtsgui compilation issue caused by qt5

Open liuyang12 opened this issue 3 years ago • 3 comments

I got compilation issues while trying to compile mitsuba 0.6 on Ubuntu 18.04.

The first issue is the Qt5xxx vs Qtxxx issue as stated in #32 and is solved by either modifying the corresponding names in data/scons/qt5.py as suggested in #38 or modifying the link mappings as in #125.

The second issue is the -std=c++11 issue (solved by changing it to -std=gnu++11) as posted by @SilvioJin in #32.

The third issue is the mtsgui compilation issue directly caused by qt5, which I have no solution yet. Everything seems to be okay after the above two steps. But when it began to compile mtsgui, it started to throw errors and then terminated.

The error message is like this

build/release/mtsgui/moc_acknowledgmentdlg.cc:65:1: error: ‘QT_INIT_METAOBJECT’
does not name a type; did you mean ‘Q_INIT_RESOURCE’?
 QT_INIT_METAOBJECT const QMetaObject AcknowledgmentDialog::staticMetaObject = {
 {
 ^~~~~~~~~~~~~~~~~~
 Q_INIT_RESOURCE
build/release/mtsgui/moc_addserverdlg.cc:87:1: error: ‘QT_INIT_METAOBJECT’ does
not name a type; did you mean ‘Q_INIT_RESOURCE’?
 QT_INIT_METAOBJECT const QMetaObject AddServerDialog::staticMetaObject = { {
 ^~~~~~~~~~~~~~~~~~
 Q_INIT_RESOURCE
build/release/mtsgui/moc_importdlg.cc:106:1: error: ‘QT_INIT_METAOBJECT’ does no
t name a type; did you mean ‘Q_INIT_RESOURCE’?
 QT_INIT_METAOBJECT const QMetaObject ImportDialog::staticMetaObject = { {
 ^~~~~~~~~~~~~~~~~~
 Q_INIT_RESOURCE
build/release/mtsgui/moc_aboutdlg.cc:78:1: error: ‘QT_INIT_METAOBJECT’ does not
name a type; did you mean ‘Q_INIT_RESOURCE’?
 QT_INIT_METAOBJECT const QMetaObject AboutDialog::staticMetaObject = { {
 ^~~~~~~~~~~~~~~~~~
 Q_INIT_RESOURCE
build/release/mtsgui/moc_glwidget.cc:260:1: error: ‘QT_INIT_METAOBJECT’ does not
 name a type; did you mean ‘Q_INIT_RESOURCE’?
 QT_INIT_METAOBJECT const QMetaObject GLWidget::staticMetaObject = { {
 ^~~~~~~~~~~~~~~~~~
 Q_INIT_RESOURCE
scons: *** [build/release/mtsgui/moc_acknowledgmentdlg.o] Error 1
scons: *** [build/release/mtsgui/moc_addserverdlg.o] Error 1
scons: *** [build/release/mtsgui/moc_importdlg.o] Error 1
scons: *** [build/release/mtsgui/moc_aboutdlg.o] Error 1
scons: *** [build/release/mtsgui/moc_glwidget.o] Error 1
scons: building terminated because of errors.

I also tried to compile mitsuba without mtsgui since it led to failure following #131. Unfortunately, it failed with error message like dist/mtsgui is required.

liuyang12 avatar Jul 24 '20 03:07 liuyang12

For me, the issue seems to be fixed after following the changes in pr #38, as long as I didn't also try to follow #125 . Make sure your qt4 and qt5 are compatible and don't have name conflicts. However, I found it simplest to just build mitsuba 0.5 without the qt5 changes, if you cherry-pick the right changes from after the 0.5 release. I made a guide here: https://docs.google.com/document/d/1W-g23kfUGqOgmczd-hKbiMdtf_yA48BeQngrchio4b8/edit?usp=sharing

I noticed that it's been 4 months. Please update me on what you found that helped you compile, if you found the problem and solution to this!

antequ avatar Nov 16 '20 01:11 antequ

I too am getting the same error as @liuyang12 . Any solutions?

nitinagarwal avatar Nov 17 '20 20:11 nitinagarwal

I’m sorry, I wasn’t able to build mtsgui either. I’ve been using the command line version.

antequ avatar Nov 17 '20 22:11 antequ