Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obenergy.cpp:11:10: fatal error: openbabel/babelconfig.h #1633

Open
kevinsmia1939 opened this issue Feb 23, 2024 · 2 comments
Open

obenergy.cpp:11:10: fatal error: openbabel/babelconfig.h #1633

kevinsmia1939 opened this issue Feb 23, 2024 · 2 comments

Comments

@kevinsmia1939
Copy link

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: commit: 509ca48
  • Qt: 5.15.10

Desktop version: (please complete the following information):
Build from source with Flatpak.
Avogadrolib commit: 509ca48
cmake version 3.27.9
gcc (GCC) 12.2.0
flatpak-builder-1.4.0

Operating System: openSUSE Tumbleweed 20240216
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0

Describe the bug
I am building Avogadro 2 as Flatpak but Avogadrolib failed to build.
The build flag -DBUILD_GPL_PLUGINS:BOOL=ON cause the error when trying to build the plugins.

[ 66%] Linking CXX static library ../../../lib/avogadro2/staticplugins/PropertyTables.a
[ 67%] Automatic MOC for target ColorOpacityMap
[ 67%] Automatic MOC for target Spectra
In file included from /run/build/avogadrolibs/avogadrolibs/avogadro/qtplugins/forcefield/obmmenergy.h:9,
                 from /run/build/avogadrolibs/avogadrolibs/avogadro/qtplugins/forcefield/forcefield.cpp:8:
/run/build/avogadrolibs/avogadrolibs/avogadro/calc/energycalculator.h: In member function ‘virtual bool Avogadro::Calc::EnergyCalculator::setConfiguration(Avogadro::Core::VariantMap&)’:
/run/build/avogadrolibs/avogadrolibs/avogadro/calc/energycalculator.h:54:51: warning: unused parameter ‘config’ [-Wunused-parameter]
   54 |   virtual bool setConfiguration(Core::VariantMap& config) { return true; }
      |                                 ~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /run/build/avogadrolibs/avogadrolibs/avogadro/qtplugins/forcefield/obmmenergy.h:9,
                 from /run/build/avogadrolibs/avogadrolibs/avogadro/qtplugins/forcefield/obmmenergy.cpp:6:
/run/build/avogadrolibs/avogadrolibs/avogadro/calc/energycalculator.h: In member function ‘virtual bool Avogadro::Calc::EnergyCalculator::setConfiguration(Avogadro::Core::VariantMap&)’:
/run/build/avogadrolibs/avogadrolibs/avogadro/calc/energycalculator.h:54:51: warning: unused parameter ‘config’ [-Wunused-parameter]
   54 |   virtual bool setConfiguration(Core::VariantMap& config) { return true; }
      |                                 ~~~~~~~~~~~~~~~~~~^~~~~~
[ 67%] Automatic MOC for target PlotPdf
/run/build/avogadrolibs/avogadrolibs/avogadro/qtplugins/forcefield/obenergy.cpp:11:10: fatal error: openbabel/babelconfig.h: No such file or directory
   11 | #include <openbabel/babelconfig.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

However, at the beginning, the log say that it found openbabel.


-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.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.43.0") 
-- Could not use git to determine source version, using version 1.99.0
-- Component omp of Spglib: NOT FOUND
-- Component fortran of Spglib: FOUND
-- Found package: Spglib
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- 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 OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Found GLEW: /app/include (found version "2.2.0") 
CMake Warning (dev) at avogadro/qtgui/CMakeLists.txt:22 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.13", minimum required is "3") 
-- Found OpenBabel3: /app/include  
Avogadro Generators not found at /run/build/avogadrolibs/avogadrolibs/../avogadrogenerators!
-- Found LibArchive: /usr/lib/x86_64-linux-gnu/libarchive.so (found version "3.7.2") 
-- Configuring done (2.4s)
-- Generating done (0.5s)
-- Build files have been written to: /run/build/avogadrolibs/avogadrolibs/_flatpak_build
@ghutchis
Copy link
Member

ghutchis commented Mar 3, 2024

Somehow the include directory isn't set properly for openbabel - can you post the resulting CMakeCache file?

@kevinsmia1939
Copy link
Author

CMakeCache.txt

Hi,
This is the file.
To make sure, the actual babelconfig.h is in app/include/openbabel3/openbabel/ .

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants