#error "This file was generated using the moc from 5.9.5. It"

Discussion about building and installing Elmer
Post Reply
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

#error "This file was generated using the moc from 5.9.5. It"

Post by Gary R »

What, do tell, does this mean and how do I fix it. I have managed to compile the latest version of Elmer with Contrib,ElmerGUI, LAU, MATC, MPI, mumps, OpenMP, Paraview, Trilinos, QWT and PythonQT. But as soon as I try to include VTK or OpenCascade the software configures and generates with CMakeGUI fine but errors out when I try to run make. A truncated version of the error messages are:

Code: Select all

In file included from /opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/mocs_compilation.cpp:2:0:
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadpreferences.cpp:15:2: error: #error "This file was generated using the moc from 5.9.5. It"
 #error "This file was generated using the moc from 5.9.5. It"
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadpreferences.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadpreferences.cpp:17:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^~~~~
In file included from /opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/mocs_compilation.cpp:3:0:
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadview.cpp:15:2: error: #error "This file was generated using the moc from 5.9.5. It"
 #error "This file was generated using the moc from 5.9.5. It"
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadview.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadview.cpp:17:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^~~~~
In file included from /opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/mocs_compilation.cpp:4:0:
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/UVLADIE3JM/moc_bodypropertyeditor.cpp:15:2: error: #error "This file was generated using the moc from 5.9.5. It"
 #error "This file was generated using the moc from 5.9.5. It"
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/UVLADIE3JM/moc_bodypropertyeditor.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/UVLADIE3JM/moc_bodypropertyeditor.cpp:17:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/UVLADIE3JM/moc_dynamiceditor.cpp:124:24: note: suggested alternative: ‘QByteArray’
         - idx * sizeof(QByteArrayData)) \
                        ^
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/UVLADIE3JM/moc_dynamiceditor.cpp:124:24: note: in definition of macro ‘QT_MOC_LITERAL’
         - idx * sizeof(QByteArrayData)) \
                        ^~~~~~~~~~~~~~
 
OS Debian Buster Host QEMU/KVE virtual machine and Kubuntu 18.04 Guest
AMD -64 x 4 processor.

I have tried switching between Qt4 and Qt5 with no success . I am finally very close to the ideal system for the work that I wish to do but am very frustrated that I can't get the last step to work. Any help will be sincerely appreciated.

Gary R
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: #error "This file was generated using the moc from 5.9.5. It"

Post by KaiMartin »

Gary R wrote: 05 Apr 2020, 03:49

Code: Select all

In file included from /opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/mocs_compilation.cpp:2:0:
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadpreferences.cpp:15:2: error: #error "This file was generated using the moc from 5.9.5. It"
 #error "This file was generated using the moc from 5.9.5. It"
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadpreferences.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^~~~~
/opt/elmerfem/build/ElmerGUI/Application/ElmerGUI_autogen/ENFHDYJSRV/moc_cadpreferences.cpp:17:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^~~~~
Last summer I ran into the same error. Building the QT4 version of ElmerGUI would abort with the above errors. And the QT5 version would not even configure. At this point I gave up and put elmer in the virtual drawer.
My desktop operates on Debian/testing. Packages have been upgraded a lot recently. So I figured to try again - Lo and behold, now elmerGUI compiles fine with cmake configurd to use QT5 ("WITH_QT5=true"). I was able to do some of the tutorials. Not everything is perfectly smooth, though. See the build report I wrote in a separate thread.

All the best,

-<)kmk(>-
---<)kaimartin(>---
Post Reply