Opened 4 years ago
Closed 4 years ago
#6081 closed defect (worksforme)
Fedora 29 compilation fails
Reported by: | Owned by: | John Tinnerholm | |
---|---|---|---|
Priority: | high | Milestone: | never |
Component: | OMSens | Version: | |
Keywords: | Cc: |
Description
Hello,
Starting from a base fedora 29 docker image I do:
dnf install -y git gcc gcc-c++ gcc-gfortran autoconf automake make libtool cmake hwloc java-1.8.0-openjdk-devel blas-devel lapack-devel lpsolve-devel expat-devel glibc-devel sqlite-devel xerces-c-devel libarchive-devel zlib-devel doxygen doxygen-latex qt-devel gettext patch wget python-devel clang llvm-devel ncurses-devel readline-devel unzip perl-Digest-MD5 vim gcovr python-pip python-psutil boost-devel lcov gtest-devel gmock-devel xz rsync python-lxml graphviz clang-devel OpenSceneGraph-devel qtwebkit qtwebkit-devel qt5-qtwebkit qt5-qtwebkit-devel qwt python-sphinx qwt-devel OpenSceneGraph-qt-devel OpenSceneGraph-devel OpenSceneGraph-libs OpenSceneGraph-qt OpenSceneGraph-qt-devel qwt5-qt4-devel glibc-static libstdc++-static omniORB-devel poppler-devel flex bison maven uuid-devel
autoconf
./configure CC=clang CXX=clang++ --with-omniORB
make
I get the error:
make[2]: Entering directory '/opt/OpenModelica/Source/OMSens_Qt'
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Igeneratedfiles/moc -o ImageViewerDialog.o dialogs/general/ImageViewerDialog.cpp
dialogs/general/ImageViewerDialog.cpp:5:10: fatal error: QGuiApplication: No such file or directory
#include <QGuiApplication>
compilation terminated.
The header is there on my system but qt4 is dtected instead of qt5 so it does not find the header. Could you help me ?
Thanks
Change History (9)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
I added this 3 dependencies qt5-linguist qt5-qtsvg-devel qt5-qtxmlpatterns-devel, and now have the following error:
make[3]: Entering directory '/opt/OpenModelica/Source/OMNotebook/OMNotebook/OMNotebookGUI'
clang++ -c -O2 -w -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_PRINTSUPPORT_LIB -DQT_WEBKITWIDGETS_LIB -DQT_WIDGETS_LIB -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I../../../build/include/omplot/qwt -I../../../build/include/omplot -I../../../build/include/omc/c -I../.. -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtWebKitWidgets -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtWebKit -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtCore -I../generatedfiles/moc -isystem /usr/include/libdrm -I../generatedfiles/ui -I/usr/lib64/qt5/mkspecs/linux-g++ -o notebook.o notebook.cpp
In file included from notebook.cpp:84:
In file included from ./imagesizedlg.h:44:
../generatedfiles/ui/ui_ImageSizeDlg.h:129:111: error: no member named 'UnicodeUTF8' in 'QApplication'
ImageDialog->setWindowTitle(QApplication::translate("ImageDialog", "Set Image Size", 0, QApplication::UnicodeUTF8));
comment:3 by , 4 years ago
That's a bit odd considering we do have builds for fc29:
It's using a docker image: docker.openmodelica.org/build-deps:fc29.amd64
comment:5 by , 4 years ago
https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5
The error is not that odd according to this
comment:6 by , 4 years ago
You might need to fully clean your sources if you played with some dependencies or Qt4/5 stuff. We pretty much only build qt4 on MacOS.
As for the Dockerfile, there is none. The image is built by an internal Jenkins job. But the generated internal code for it looks like:
FROM ${image} COPY rpmbuild/RPMS/x86_64/${rpmFile.split("/")[1]} /root RUN ${OS.startsWith("el") ? "curl -s -O https://build.openmodelica.org/rpm/fake/fakeprovide-omlib-all.noarch.rpm && rpm -i fakeprovide-omlib-all.noarch.rpm && " : ""}rpm -i /root/${rpmFile.split("/")[1]}
comment:7 by , 4 years ago
Starting from scratch it worked (it means make clean does not really clean well all targets).
I had another issue not related to OpenModelica but rather building it in a docker version less than 18.04 with Qt and rcc, I mention it if someone would fall in the same issue. This link https://stackoverflow.com/questions/51195528/rcc-error-in-resource-qrc-cannot-find-file-png explained me the issue.
Thanks for the help
comment:8 by , 4 years ago
Yes, qt generates the makefile which does make clean
. It frequently does not clean all its own stuff, and that's especially true if qt4/qt5 is mixed.
And we do build with privileged mode on newer OS versions. It's more than just qt messing with some stuff. You also need a newer OS version on the base system to provide all system calls.
comment:9 by , 4 years ago
Milestone: | Future → never |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Set the QTDIR env.var to force qt5 instead of qt4?
https://github.com/OpenModelica/OpenModelicaBuildScripts/blob/49cfd40/rpm/SPECS/openmodelica.spec.tpl#L145