Error related to missing qtgui files in avogadroapp

I’m attempting to build the OpenChemisty supermodule, as the packages on Ubuntu 20.04 seem to be a bit out of date from what I can tell. Unfortunately, I’m running into a problem with qtgui files missing when it gets to avogadroapp, namely that posted in a github issue here.

I’m following the build guide from the Open Chemistry site. Any advice would be greatly appreciated! Thank you.

avogadroapp-1.95.0/avogadro/mainwindow.cpp:34:10: fatal error: avogadro/qtgui/layermodel.h: No such file or directory
   34 | #include <avogadro/qtgui/layermodel.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [avogadro/CMakeFiles/avogadro.dir/build.make:163: avogadro/CMakeFiles/avogadro.dir/mainwindow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: avogadro/CMakeFiles/avogadro.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Environment Information

Avogadro version: development
Operating system and version: Ubuntu 20.04.4
Kernel: 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

Openchemistry supermodule compiles submodlues successfully.

Actual Behavior

Openchemisty returns error 2 as outlined above.

Steps to Reproduce

Following the build guide from the beginning to the final console step in the Build section.

First off, we have both flatpak and nightly AppImage builds.

I asked you in the GitHub issue to mention exactly what you did. Because avogadroapp-1.95.0 would not be a path from the build guide. If you’re downloading via Git, it would normally show up as avogadroapp without any sort of version suffix.

So I’ll ask again. What commands did you run to grab the Git repository and build? Thanks.

My apologies, this is true, that is the console output from the github issue, here is mine from the last run:

[  4%] Built target avogadro_autogen
[  8%] Building CXX object avogadro/CMakeFiles/avogadro.dir/mainwindow.cpp.o
/home/thellinger/openchemistry/avogadroapp/avogadro/mainwindow.cpp:24:10: fatal error: avogadro/qtgui/layermodel.h: No such file or directory
   24 | #include <avogadro/qtgui/layermodel.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [avogadro/CMakeFiles/avogadro.dir/build.make:145: avogadro/CMakeFiles/avogadro.dir/mainwindow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:117: avogadro/CMakeFiles/avogadro.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Here is what I have done. So I’ve checked the dependencies (gcc-9 package covers C++ 11, libopengl0 package along with qt packages for OpenGL, I have a whole host of packages for qt (I can post those if it would be helpful), cmake and python 3.7. From my user directory (/home/thellinger) I entered the following commands:

git clone --recursive https://github.com/OpenChemistry/openchemistry.git
git pull # May have skipped this and the git update command, I'll need to check when I have a moment to run the build process
git submodule update --init
 mkdir openchemistry-build
 cd openchemistry-build
 cmake ../openchemistry
 cmake --build .

In past attempts, before I noticed that it was for windows only, I included --config Release on the last command, but I think the result was the same. I’ve also tried building in QtCreator, but I get the same result.

If there is anything else I can add here to help with the investigation, such as libraries I have installed, please let me know. I appreciate your support, thank you!

From the openchemistry directory, please do the following before building:

cd avogadrolibs
git pull origin master
cd ../avogadroapp
git pull origin master
cd ../openchemistry-build
cmake --build .

I suspect the current tags in the openchemistry repository may be old - they are certainly older than the current HEAD in both avogadrolibs and avogadroapp.

Give it a try and see if it works for you, thanks.

1 Like

Yup! That did it! Thank you very much!

1 Like