Home   Manual

I'm creating Flatpak for Avogadro2, need help on spglib

Hello,

I attempt to create Flatpak for Avogadro2.
Relate: What platforms would you like Avo release binaries?

Flatpak is a binary software distribution deplyment for Linux. If I successfully Flatpak Avogadro2, I can submit it to FLathub (Flatpak apps store). Which Avogadro2 can be easily installed in any Linux distro that support Flatpak. Majority of Linux distro support Flatpak already.

This is a repo I working on.

I already install spglib 1.16.1 with commands below. (this can be found in .yaml file in my repo)

  - cmake .
  - cmake --build .
  - cd python && python3.8 setup.py build
  - cd python && python3.8 setup.py install --skip-build --force --prefix=/app

But when avogadrolibs build, this happen.

/run/build/avogadrolibs/avogadro/core/avospglib.cpp:28:10: fatal error: spglib/spglib.h: No such file or directory
   28 | #include "spglib/spglib.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

However, it said that it found spglib earlier.

CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
The package name passed to find_package_handle_standard_args (SPGLIB)
does not match the name of the calling package (Spglib). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindSpglib.cmake:15 (find_package_handle_standard_args)
avogadro/core/CMakeLists.txt:7 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found SPGLIB: /app/include
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
– Found MMTF: /app/include
– Found HDF5: /app/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version “1.12.0”) found components: C
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindOpenGL.cmake:293 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run “cmake --help-policy CMP0072” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to “GLVND” or “LEGACY”, so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
avogadro/rendering/CMakeLists.txt:6 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
– Found GLEW: /app/include
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.8.8”, minimum required is “3”)
Avogadro Generators not found at /run/build/avogadrolibs/…/avogadrogenerators!
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
The package name passed to find_package_handle_standard_args (LIBARCHIVE)
does not match the name of the calling package (LibArchive). This can lead
to problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindLibArchive.cmake:17 (find_package_handle_standard_args)
avogadro/qtplugins/plugindownloader/CMakeLists.txt:3 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found LIBARCHIVE: /usr/include
msym include dir /app/lib/cmake/libmsym/…/…/…/include
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindOpenGL.cmake:293 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run “cmake --help-policy CMP0072” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to “GLVND” or “LEGACY”, so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
avogadro/qtplugins/overlayaxes/CMakeLists.txt:3 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version “3.8.8”, minimum required is “3”)
CMake Warning at /app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/pybind11Common.cmake:167 (message):
CMAKE_CXX_STANDARD=17 does not match PYBIND11_CPP_STANDARD=-std=c++11,
please remove PYBIND11_CPP_STANDARD from your cache
Call Stack (most recent call first):
/app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/pybind11Config.cmake:249 (include)
python/CMakeLists.txt:5 (find_package)

Any clue? Thanks.

1 Like

I think I forgot
cmake --install .
for spglib

Edit: spglib.h exist in /app/include but avogadrolibs still does not see it.
This is avogadrolibs cmake flags.

  • -DENABLE_TRANSLATIONS:BOOL=ON
  • -DUSE_HDF5:BOOL=ON
  • -DUSE_PYTHON:BOOL=ON
  • -DUSE_QT:BOOL=ON
  • -DUSE_LIBMSYM:BOOL=ON
  • -DUSE_SPGLIB:BOOL=ON
  • -DUSE_MMTF:BOOL=ON
  • -DUSE_MOLEQUEUE:BOOL=ON
  • -DUSE_PROTOCALL:BOOL=OFF
  • -DUSE_VTK:BOOL=OFF
  • -DBUILD_GPL_PLUGINS:BOOL=ON
  • -DBUILD_STATIC_PLUGINS:BOOL=ON
  • -Dlibmsym_DIR:PATH=/app/lib/cmake/libmsym
  • -DSPGLIB_INCLUDE_DIR:PATH=/app/include
  • -DSPGLIB_LIBRARY:PATH=/app/lib
  • -Dpybind11_DIR:PATH=/app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/

-DSPGLIB_INCLUDE_DIR:PATH=/app/include does not seems to help.

Note: For Flatpak, /app kinda replace /usr.

Does the cmake warning

The package name passed to find_package_handle_standard_args (SPGLIB)
does not match the name of the calling package (Spglib). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindSpglib.cmake:15 (find_package_handle_standard_args)
avogadro/core/CMakeLists.txt:7 (find_package)

relevant?

Or because path for spglib in avogadrolib was hard coded?

Full log

Note: switching to ‘9123e3837ab0d819677ec8e2ed3c46875054382f’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 9123e38 Merge pull request #528 from weblate/weblate-avogadro-avogadrolibs
– The C compiler identification is GNU 10.2.0
– The CXX compiler identification is GNU 10.2.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Setting build type to ‘Debug’ as none was specified.
– Performing Test HAVE_GCC_ERROR_RETURN_TYPE
– Performing Test HAVE_GCC_ERROR_RETURN_TYPE - Success
– Found Git: /usr/bin/git (found version “2.30.1”)
– Could not use git to determine source version, using version 1.93.0
– Found Eigen3: /app/include/eigen3 (Required is at least version “2.91.0”)
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
The package name passed to find_package_handle_standard_args (SPGLIB)
does not match the name of the calling package (Spglib). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindSpglib.cmake:15 (find_package_handle_standard_args)
avogadro/core/CMakeLists.txt:7 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found SPGLIB: /app/include
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
– Found MMTF: /app/include
– Found HDF5: /app/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version “1.12.0”) found components: C
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindOpenGL.cmake:293 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run “cmake --help-policy CMP0072” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to “GLVND” or “LEGACY”, so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
avogadro/rendering/CMakeLists.txt:6 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
– Found GLEW: /app/include
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.8.8”, minimum required is “3”)
Avogadro Generators not found at /run/build/avogadrolibs/…/avogadrogenerators!
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
The package name passed to find_package_handle_standard_args (LIBARCHIVE)
does not match the name of the calling package (LibArchive). This can lead
to problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindLibArchive.cmake:17 (find_package_handle_standard_args)
avogadro/qtplugins/plugindownloader/CMakeLists.txt:3 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found LIBARCHIVE: /usr/include
msym include dir /app/lib/cmake/libmsym/…/…/…/include
CMake Warning (dev) at /usr/share/cmake-3.19/Modules/FindOpenGL.cmake:293 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run “cmake --help-policy CMP0072” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to “GLVND” or “LEGACY”, so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
avogadro/qtplugins/overlayaxes/CMakeLists.txt:3 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version “3.8.8”, minimum required is “3”)
CMake Warning at /app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/pybind11Common.cmake:167 (message):
CMAKE_CXX_STANDARD=17 does not match PYBIND11_CPP_STANDARD=-std=c++11,
please remove PYBIND11_CPP_STANDARD from your cache
Call Stack (most recent call first):
/app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/pybind11Config.cmake:249 (include)
python/CMakeLists.txt:5 (find_package)

– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so
– Performing Test HAS_FLTO
– Performing Test HAS_FLTO - Success
– Found pybind11: /app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/include (found version “2.6.2” )
– Configuring done
WARNING: Target “AvogadroCore” requests linking to directory “/app/lib”. Targets may link only to libraries. CMake is dropping the item.
– Generating done
– Build files have been written to: /run/build/avogadrolibs
Scanning dependencies of target bodrparse
Scanning dependencies of target encodefile
Scanning dependencies of target resdataparse
Scanning dependencies of target struct
Scanning dependencies of target AvogadroCore
Scanning dependencies of target gwavi
[ 0%] Building CXX object utilities/encodefile/CMakeFiles/encodefile.dir/encodefile.cxx.o
[ 1%] Building CXX object utilities/bodr/CMakeFiles/bodrparse.dir/bodrparse.cxx.o
[ 1%] Building C object thirdparty/libgwavi/CMakeFiles/gwavi.dir/gwavi.c.o
[ 1%] Building CXX object utilities/resdata/CMakeFiles/resdataparse.dir/resdataparse.cxx.o
[ 1%] Building C object thirdparty/struct/CMakeFiles/struct.dir/struct_endian.c.o
[ 1%] Building C object thirdparty/libgwavi/CMakeFiles/gwavi.dir/fileio.c.o
[ 1%] Building C object thirdparty/struct/CMakeFiles/struct.dir/struct.c.o
[ 1%] Building C object thirdparty/libgwavi/CMakeFiles/gwavi.dir/avi-utils.c.o
[ 1%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/crystaltools.cpp.o
[ 1%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/coordinateblockgenerator.cpp.o
[ 1%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/cube.cpp.o
[ 1%] Linking C static library libgwavi.a
[ 1%] Built target gwavi
[ 1%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/elements.cpp.o
[ 2%] Linking C static library libstruct.a
[ 2%] Built target struct
[ 2%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/gaussianset.cpp.o
[ 2%] Linking CXX executable …/…/bin/encodefile
[ 2%] Built target encodefile
[ 2%] Encoding /run/build/avogadrolibs/avogadro/rendering/textlabelbase_vs.glsl
[ 2%] Encoding /run/build/avogadrolibs/avogadro/rendering/arrow_vs.glsl
[ 2%] Encoding /run/build/avogadrolibs/avogadro/rendering/cylinders_fs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/cylinders_vs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/linestrip_fs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/linestrip_vs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/mesh_fs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/mesh_vs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/sphere_ao_bake_fs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/sphere_ao_bake_vs.glsl
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx: In function ‘int main(int, char**)’:
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:129:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
129 | for (i = 0; i < atoms.size(); ++i) {
| ^~~~~~~~~~~~
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:131:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
131 | if (i != atoms.size() - 1)
| ^~~~~~~~~~~~~~~~~
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:136:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<std::__cxx11::basic_string, std::__cxx11::basic_string > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
136 | for (i = 0; i < singleBonds.size(); ++i) {
| ^~~~~~~~~~~~~~~~~~
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:139:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<std::__cxx11::basic_string, std::__cxx11::basic_string > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
139 | if (i != singleBonds.size() - 1)
| ^~~~~~~~~~~~~~~~~~~~~~~
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:144:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<std::__cxx11::basic_string, std::__cxx11::basic_string > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
144 | for (i = 0; i < doubleBonds.size(); ++i) {
| ^~~~~~~~~~~~~~~~~~
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:147:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<std::__cxx11::basic_string, std::__cxx11::basic_string > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
147 | if (i != doubleBonds.size() - 1)
| ^~~~~~~~~~~~~~~~~~~~~~~
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/sphere_ao_depth_fs.glsl
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:181:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
181 | for (int j = 0; j < residueClassNames.size(); ++j) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
/run/build/avogadrolibs/utilities/resdata/resdataparse.cxx:184:11: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
184 | if (j != residueClassNames.size() - 1)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/sphere_ao_depth_vs.glsl
[ 3%] Encoding /run/build/avogadrolibs/avogadro/rendering/sphere_ao_render_fs.glsl
[ 4%] Encoding /run/build/avogadrolibs/avogadro/rendering/sphere_ao_render_vs.glsl
[ 5%] Encoding /run/build/avogadrolibs/avogadro/rendering/spheres_fs.glsl
[ 5%] Encoding /run/build/avogadrolibs/avogadro/rendering/spheres_vs.glsl
[ 5%] Encoding /run/build/avogadrolibs/avogadro/rendering/textlabelbase_fs.glsl
Scanning dependencies of target AvogadroRendering
[ 5%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/arrowgeometry.cpp.o
[ 6%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/gaussiansettools.cpp.o
[ 6%] Linking CXX executable …/…/bin/resdataparse
[ 6%] Built target resdataparse
[ 6%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/graph.cpp.o
[ 6%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/mesh.cpp.o
[ 6%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/molecule.cpp.o
[ 6%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/mutex.cpp.o
[ 7%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/nameatomtyper.cpp.o
[ 7%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/residue.cpp.o
[ 8%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/bufferobject.cpp.o
[ 8%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/ringperceiver.cpp.o
[ 8%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/slaterset.cpp.o
[ 8%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/slatersettools.cpp.o
[ 8%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/camera.cpp.o
[ 9%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/spacegroups.cpp.o
[ 9%] Linking CXX executable …/…/bin/bodrparse
[ 9%] Built target bodrparse
[ 9%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/symbolatomtyper.cpp.o
/run/build/avogadrolibs/avogadro/core/ringperceiver.cpp:62:8: warning: ‘std::size_t Avogadro::Core::{anonymous}::DistanceMatrix::operator()(std::size_t, std::size_t) const’ defined but not used [-Wunused-function]
62 | size_t DistanceMatrix::operator()(size_t i, size_t j) const
| ^~~~~~~~~~~~~~
[ 9%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/unitcell.cpp.o
[ 9%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/variantmap.cpp.o
[ 9%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/version.cpp.o
[ 10%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/sharedmutex.cpp.o
[ 10%] Building CXX object avogadro/core/CMakeFiles/AvogadroCore.dir/avospglib.cpp.o
/run/build/avogadrolibs/avogadro/core/avospglib.cpp:28:10: fatal error: spglib/spglib.h: No such file or directory
28 | #include “spglib/spglib.h”
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [avogadro/core/CMakeFiles/AvogadroCore.dir/build.make:355: avogadro/core/CMakeFiles/AvogadroCore.dir/avospglib.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…
[ 10%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/cylindergeometry.cpp.o
[ 10%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/drawable.cpp.o
[ 10%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/geometrynode.cpp.o
[ 11%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/geometryvisitor.cpp.o
[ 11%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/groupnode.cpp.o
[ 11%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/glrenderer.cpp.o
[ 11%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/glrendervisitor.cpp.o
[ 11%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/linestripgeometry.cpp.o
[ 12%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/meshgeometry.cpp.o
[ 12%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/node.cpp.o
[ 12%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/povrayvisitor.cpp.o
[ 12%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/scene.cpp.o
[ 12%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/shader.cpp.o
/run/build/avogadrolibs/avogadro/rendering/povrayvisitor.cpp: In member function ‘virtual void Avogadro::Rendering::POVRayVisitor::visit(Avogadro::Rendering::Drawable&)’:
/run/build/avogadrolibs/avogadro/rendering/povrayvisitor.cpp:123:37: warning: unused parameter ‘geometry’ [-Wunused-parameter]
123 | void POVRayVisitor::visit(Drawable& geometry)
| ~~~~^~
/run/build/avogadrolibs/avogadro/rendering/povrayvisitor.cpp: In member function ‘virtual void Avogadro::Rendering::POVRayVisitor::visit(Avogadro::Rendering::AmbientOcclusionSphereGeometry&)’:
/run/build/avogadrolibs/avogadro/rendering/povrayvisitor.cpp:139:59: warning: unused parameter ‘geometry’ [-Wunused-parameter]
139 | void POVRayVisitor::visit(AmbientOcclusionSphereGeometry& geometry)
| ~~~~~~~~~~~~^~
/run/build/avogadrolibs/avogadro/rendering/povrayvisitor.cpp: In member function ‘virtual void Avogadro::Rendering::POVRayVisitor::visit(Avogadro::Rendering::LineStripGeometry&)’:
/run/build/avogadrolibs/avogadro/rendering/povrayvisitor.cpp:194:46: warning: unused parameter ‘geometry’ [-Wunused-parameter]
194 | void POVRayVisitor::visit(LineStripGeometry& geometry)
| ~^~
[ 13%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/shaderprogram.cpp.o
[ 13%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/spheregeometry.cpp.o
[ 13%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/textlabel2d.cpp.o
[ 13%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/textlabel3d.cpp.o
[ 13%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/textlabelbase.cpp.o
[ 14%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/textproperties.cpp.o
[ 14%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/textrenderstrategy.cpp.o
[ 14%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/texture2d.cpp.o
[ 14%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/transformnode.cpp.o
[ 14%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/visitor.cpp.o
[ 15%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/volumegeometry.cpp.o
[ 15%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/vrmlvisitor.cpp.o
[ 15%] Building CXX object avogadro/rendering/CMakeFiles/AvogadroRendering.dir/ambientocclusionspheregeometry.cpp.o
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp: In member function ‘void Avogadro::Rendering::VRMLVisitor::begin()’:
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:76:12: warning: variable ‘cameraX’ set but not used [-Wunused-but-set-variable]
76 | Vector3f cameraX =
| ^

/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:78:12: warning: variable ‘cameraY’ set but not used [-Wunused-but-set-variable]
78 | Vector3f cameraY =
| ^

/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:80:12: warning: variable ‘cameraZ’ set but not used [-Wunused-but-set-variable]
80 | Vector3f cameraZ =
| ^

/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:85:12: warning: variable ‘light0pos’ set but not used [-Wunused-but-set-variable]
85 | Vector3f light0pos =
| ^

/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp: In member function ‘virtual void Avogadro::Rendering::VRMLVisitor::visit(Avogadro::Rendering::Drawable&)’:
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:105:35: warning: unused parameter ‘geometry’ [-Wunused-parameter]
105 | void VRMLVisitor::visit(Drawable& geometry)
| ~~~~^~
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp: In member function ‘virtual void Avogadro::Rendering::VRMLVisitor::visit(Avogadro::Rendering::AmbientOcclusionSphereGeometry&)’:
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:127:57: warning: unused parameter ‘geometry’ [-Wunused-parameter]
127 | void VRMLVisitor::visit(AmbientOcclusionSphereGeometry& geometry)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp: In member function ‘virtual void Avogadro::Rendering::VRMLVisitor::visit(Avogadro::Rendering::LineStripGeometry&)’:
/run/build/avogadrolibs/avogadro/rendering/vrmlvisitor.cpp:229:44: warning: unused parameter ‘geometry’ [-Wunused-parameter]
229 | void VRMLVisitor::visit(LineStripGeometry& geometry)
| ~~~~~~~~~~~~~^~
[ 15%] Linking CXX shared library …/…/lib/libAvogadroRendering.so
[ 15%] Built target AvogadroRendering
make[1]: *** [CMakeFiles/Makefile2:1626: avogadro/core/CMakeFiles/AvogadroCore.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
Error: module avogadrolibs: Child process exited with code 2

Edit: Possible relate bug?

To summarized.
spglib 1.16.1 was installed like this.

  # Delete easy-install.pth that spglib previously install because pybind11 clash with it.
  - rm -r /app/lib/python3.8/site-packages/easy-install.pth
  - cmake -DCMAKE_INSTALL_INCLUDEDIR:PATH=/app/include -DCMAKE_INSTALL_LIBDIR:PATH=/app/lib .
  - cmake --build .
  - cmake --install .
  - cd python && python3.8 setup.py build
  - cd python && python3.8 setup.py install --skip-build --force --prefix=/app

Avogadrolibs master branch

  - -DCMAKE_BUILD_TYPE:STRING=Release
  - -DCMAKE_INSTALL_DATAROOTDIR:PATH=/app/share
  - -DCMAKE_INSTALL_BIRDIR:PATH=/app/bin
  - -DCMAKE_INSTALL_INCLUDEDIR:PATH=/app/include
  - -DCMAKE_INSTALL_LIBDIR:PATH=/app/lib
  - -DCMAKE_INSTALL_PREFIX:PATH=/app
  - -DENABLE_TRANSLATIONS:BOOL=ON
  - -DUSE_HDF5:BOOL=ON
  - -DUSE_PYTHON:BOOL=ON
  - -DUSE_QT:BOOL=ON
  - -DUSE_LIBMSYM:BOOL=ON
  - -DUSE_SPGLIB:BOOL=ON
  - -DUSE_MMTF:BOOL=ON
  - -DUSE_MOLEQUEUE:BOOL=ON
  - -DUSE_PROTOCALL:BOOL=OFF
  - -DUSE_VTK:BOOL=ON
  - -DBUILD_GPL_PLUGINS:BOOL=ON
  - -DBUILD_STATIC_PLUGINS:BOOL=ON
  - -Dlibmsym_DIR:PATH=/app/lib/cmake/libmsym
  - -DSPGLIB_INCLUDE_DIR:PATH=/app/include
  - -DSPGLIB_LIBRARY:PATH=/app/lib
  - -Dpybind11_DIR:PATH=/app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/      - -DCMAKE_BUILD_TYPE:STRING=Release
  - -DCMAKE_INSTALL_DATAROOTDIR:PATH=/app/share
  - -DCMAKE_INSTALL_BIRDIR:PATH=/app/bin
  - -DCMAKE_INSTALL_INCLUDEDIR:PATH=/app/include
  - -DCMAKE_INSTALL_LIBDIR:PATH=/app/lib
  - -DCMAKE_INSTALL_PREFIX:PATH=/app
  - -DENABLE_TRANSLATIONS:BOOL=ON
  - -DUSE_HDF5:BOOL=ON
  - -DUSE_PYTHON:BOOL=ON
  - -DUSE_QT:BOOL=ON
  - -DUSE_LIBMSYM:BOOL=ON
  - -DUSE_SPGLIB:BOOL=ON
  - -DUSE_MMTF:BOOL=ON
  - -DUSE_MOLEQUEUE:BOOL=ON
  - -DUSE_PROTOCALL:BOOL=OFF
  - -DUSE_VTK:BOOL=ON
  - -DBUILD_GPL_PLUGINS:BOOL=ON
  - -DBUILD_STATIC_PLUGINS:BOOL=ON
  - -Dlibmsym_DIR:PATH=/app/lib/cmake/libmsym
  - -DSPGLIB_INCLUDE_DIR:PATH=/app/include
  - -DSPGLIB_LIBRARY:PATH=/app/lib
  - -Dpybind11_DIR:PATH=/app/lib/python3.8/site-packages/pybind11-2.6.2-py3.8.egg/pybind11/share/cmake/pybind11/

Does something like -Dspglib_DIR exist? I tried it, does not work.

I decided to use Avogadro super build instead.

However, the issue is that it attempt to download dependencies. Which Flatpak-builder does not allow. It must be manually downloaded and put into some directory.

Where should I put the dependencies?
Does it have some kind of check sum?
What archive name should it have?

Thanks.

Thank you! Having a Flatpak build would be really awesome.

All the superbuild dependencies can be found in cmake/projects.cmake including checksums:

IIRC, the archive names are the same in the projects.cmake - they’re just passed to curl via cmake/download_all.cmake

Directories for the dependencies are defined in cmake/download_dir.cmake:

if(NOT DEFINED download_dir)
  if(NOT "$ENV{HOME}" STREQUAL "" AND EXISTS "$ENV{HOME}/Downloads")
    set(download_dir "$ENV{HOME}/Downloads")
  elseif(NOT "$ENV{USERPROFILE}" STREQUAL "" AND EXISTS "$ENV{USERPROFILE}/Downl
    set(download_dir "$ENV{USERPROFILE}/Downloads")
  elseif(NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "")
    set(download_dir "${CMAKE_CURRENT_BINARY_DIR}/Downloads")
  else()

There was also some work on this here:

Hi,

Thanks for reply.
I did found the cmake/projects.cmake with all the URL and md5.
But not much luck.
I could pre-download the dependencies, but there are some internal stuff relate to what is called “stamps” that track if the archives were downloaded.
I attempt to get avogadro-superbuild to use pre-downloaded libarchive.
I use touch command to create stamp files, I was able to skip download step, but it will not unpack the archive, leaving it un-patch and empty libarchive-src folder which it cannot be build.

I think I would rather try to improve spglib detection.

1 Like

Okay, I have two related patches:

Assuming nothing weird happens in the test, I’ll merge these and I think you should be good with the spglib.h header.

Let me know if the new HEAD works better. It should have spglib.h as you requested.

Yes, it worked.
I can build avogadrolibs now.
I am trying to build avogadroapps, I will let you know if it work soon.

I can build and run avogadroapp now.
I did some testing, optimize geometry does not work, maybe because I build openbabel incorrectly.
I take the build flag from avogadro superbuild and apply it to openbabel in flatpak, now it seems to work fine.

I did not build protocall because it seems to have issue with newer cmake.

Any way, I can submit it to Flathub, but I think I would wait for the next release version of avogadrolibs, since Flathub prefer stable release.

So you have some screenshots of Avogadro you want to be presented in the app store?

1 Like

Fantastic news, thank you!!

I’ll design some screenshots for the store.

If you can provide some script / process, we can also integrate into the GitHub actions to build the flatpak as part of the release build.

I don’t know how to implement it into github action. But Flathub have this Flathubbot that build Flatpak.

The basic process is to build flatpak with flatpak-builder
flatpak-builder --install --user build org.openchemistry.Avogadro2 --force-clean

1 Like

Thanks, I’ll check it out.

Can you point me at the manifest file or submit it as a pull request (e.g., to avogadroapp)

Thanks!

The manifest file is here with appdata file.

I have not submit a pull request yet because it use master branch of avogadrolib at the moment.
But I can submit it as a work in progress for now.

I just submit to Flathub here: WIP: Add org.openchemistry.avogadro2 by kevinsmia1939 · Pull Request #2234 · flathub/flathub · GitHub
You will noticed a Flathubbot in the comment building the manifest.

Which directory you want this to go to avogadroapp?

I just submit it here: Initial Flatpak package by kevinsmia1939 · Pull Request #132 · OpenChemistry/avogadroapp · GitHub

2 Likes

Hi,

The Flathubbout complain about missing Avogadro logo 128x128 icon. Was the 128x128 icon installed by default?

zgrep "<icon type=\"remote\">" builddir/*/share/app-info/xmls/org.openchemistry.Avogadro2.xml.gz || test -f builddir/*/share/app-info/icons/flatpak/128x128/org.openchemistry.Avogadro2.png

in dir /srv/buildbot/worker/build-x86_64-4/build (timeout 1200 secs)

watching logfiles {}

argv: b'zgrep "<icon type=\\"remote\\">" builddir/*/share/app-info/xmls/org.openchemistry.Avogadro2.xml.gz || test -f builddir/*/share/app-info/icons/flatpak/128x128/org.openchemistry.Avogadro2.png'

using PTY: False

program finished with exit code 1

elapsedTime=0.013782

I don’t know if the icon was installed by default - I use Mac as my main development and my students generally use Windows.

The icons should be in avogadroapp/avogadro/icons/avogadro2*.png

If it’s not installed, let me know the path it should get and we can fix the CMakeLists.txt for avogadroapp.