evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
225 stars 95 forks source link

LIBINT2_MAX_AM_default1 and LIBINT2_MAX_AM_default2 not defined #192

Closed susilehtola closed 2 years ago

susilehtola commented 3 years ago

I'm trying to build the Fedora package with boost, but the build fails with

/bin/sh   ../libtool --quiet --mode=link --tag=CXX      g++ -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O1  -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O1  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -L../lib -lint2 -lm   -L/usr/lib/gcc/x86_64-redhat-linux/10 -L/usr/lib/gcc/x86_64-redhat-linux/10/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/10/../../.. -lgfortran -lm -lquadmath -o fortran_example fortran_example.o libint_f.o
CXX test.o
In file included from /usr/include/boost/preprocessor/detail/auto_rec.hpp:21,
                 from /usr/include/boost/preprocessor/control/while.hpp:20,
                 from /usr/include/boost/preprocessor/arithmetic/add.hpp:20,
                 from /usr/include/boost/preprocessor/arithmetic.hpp:17,
                 from /usr/include/boost/preprocessor/library.hpp:16,
                 from /usr/include/boost/preprocessor.hpp:17,
                 from ../include/libint2/./engine.impl.h:35,
                 from ../include/libint2/engine.h:988,
                 from ../include/libint2/cxxapi.h:41,
                 from ../include/libint2.hpp:24,
                 from test.cc:24:
../include/libint2/./engine.impl.h: In member function 'void libint2::Engine::_initialize()':
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default1' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/libint2/./engine.impl.h:627:3: error: 'LIBINT2_MAX_AM_default2' was not declared in this scope; did you mean 'LIBINT2_MAX_AM_default'?
  627 |   BOOST_PP_LIST_FOR_EACH_PRODUCT(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/builddir/build/BUILD/libint-2.6.0/fortran'
make[1]: *** [../MakeSuffixRules:8: test.o] Error 1
make: *** [Makefile:38: fortran] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.DHvKNX (%install)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.DHvKNX (%install)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 776, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/libint2.spec
loriab commented 3 years ago

fwiw, one set of BOOST_PP_LIST errors that I used to get was a real error that got fixed in the source. More commonly, I got such errors when trying to tweak and resume in the generation-export-library progression rather than starting afresh for each edit. Of course, my experience was with cmake+cmake and C++, not libtool+cmake and Fortran, so mentioning on the off chance of relevance.

evaleev commented 3 years ago

@susilehtola , this was fixed by @loriab (THANKS!) via https://github.com/evaleev/libint/pull/149 and included in 2.7.0-beta.2 ... I am working on preparing final 2.7.0 release (PR 148 is the big prereq for that)

susilehtola commented 3 years ago

@evaleev good to know; I'll try to update the Fedora packages to the latest prerelease.

Hoping to see you shortly in Blacksburg!

mbanck commented 3 years ago

@susilehtola , this was fixed by @loriab (THANKS!) via #149 and included in 2.7.0-beta.2 ... I am working on preparing final 2.7.0 release (PR 148 is the big prereq for that)

Still, would this be a good candidate for a 2.6.1 release? It seems to break things pretty badly...

susilehtola commented 3 years ago

Yup, would be nice to get this fixed since e.g. eT doesn't build without it

evaleev commented 2 years ago

should release 2.7.0 this week