Hi,
I’m trying to work out the absolute minimum steps and dependencies required to build Avogadro successfully, so that @brockdyer03 and I can (informed by our recent experiences trying to compile the project) improve the documentation on building to help newcomers.
So to start with:
- I’m attempting to build with the submodules
avogadroapp
,avogadrolibs
,crystals
,fragments
, andmolecules
only ./thirdparty/
is empty for now other than theCMakeLists.txt
file and the empty directories ofpybind11
/qttesting
/VTK
/yaehmop
molequeue
,avogadrodata
, andavogadrogenerators
are absentavogadro-i18n
wasn’t present but after attempting to build it seems to have been automatically downloaded- Working out the necessary dependencies is a challenge but so far I’ve identified
QtCore
,QtWidgets
,QtGui
,QtOpenGL
,QtConcurrent
, andQtNetwork
as being necessary (obviously the way these are packaged varies by system – I will add notes for openSUSE to the docs) - It also seems I need to have
glew
installed on the system so I have done so openbabel
is not installed on my system
That’s just so you have an idea what the base I’m building on is.
I’m then building using:
cmake -D QT_VERSION=5 -D BUILD_MOLEQUEUE=OFF -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -S . -B ./b
uild
cmake --build ./build
Which gets fairly far, then stops just at the end of compiling avogadrolibs
with:
[ 91%] Building CXX object src/formats/CMakeFiles/chemdoodlejsonformat.dir/json/chemdoodlejsonformat.cpp.o
In file included from /home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/include/openbabel
/json.h:22,
from /home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/src/formats/json/
chemdoodlejsonformat.cpp:19:
/home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/external/rapidjson-1.1.0/include/rapidj
son/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::op
erator=(const rapidjson::GenericStringRef<CharType>&)’:
/home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/external/rapidjson-1.1.0/include/rapidj
son/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
| ~~~~~~~^~~~~~~~~~~~
In file included from /home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/include/openbabel
/atom.h:35,
from /home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/src/formats/json/
chemdoodlejsonformat.cpp:22:
/home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/include/openbabel/math/vector3.h: In me
mber function ‘bool OpenBabel::vector3::operator!=(const OpenBabel::vector3&) const’:
/home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/include/openbabel/math/vector3.h:281:29
: warning: ‘bool OpenBabel::vector3::operator==(const OpenBabel::vector3&) const’ is deprecated: Use vector3::IsAppr
ox() instead. [-Wdeprecated-declarations]
281 | return ! ( (*this) == other );
| ^~~~~
/home/matt/avo/openchemistry/build/thirdparty/openbabel-prefix/src/openbabel/include/openbabel/math/vector3.h:274:10
: note: declared here
274 | bool operator== ( const vector3& ) const;
| ^~~~~~~~
gmake[5]: *** [src/formats/CMakeFiles/chemdoodlejsonformat.dir/build.make:76: src/formats/CMakeFiles/chemdoodlejsonf
ormat.dir/json/chemdoodlejsonformat.cpp.o] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:3904: src/formats/CMakeFiles/chemdoodlejsonformat.dir/all] Error 2
gmake[3]: *** [Makefile:136: all] Error 2
gmake[2]: *** [thirdparty/CMakeFiles/openbabel.dir/build.make:86: thirdparty/openbabel-prefix/src/openbabel-stamp/op
enbabel-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:355: thirdparty/CMakeFiles/openbabel.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
It’s not immediately obvious to me how this should be fixed. Any ideas?