Closed kostrzewa closed 3 years ago
The problem is one of include order and what other autoconf-based packages do with defines like PACKAGE_VERSION
. C-lime, for example, undefs these and then they are gone.
Now, one would think that one could simply include lime.h
first and then tmlqcd_config.h
, but unfortunately, that doesn't always help because tmlqcd_config.h
might have been included somewhere, where lime.h
was NOT included. As a result, _CONFIG_H
is now defined. When the compiler then gets to a file wherelime.h
is actually included, the PACKAGE_*
definitions will be undeffed by lime.h
and won't be available anymore.
Hence the deferral to an include file without header guards and the redefinition.
Using gcc 9.2.0 revealed some issues with circular dependencies in header files as well as problems dealing with manipulations that https://github.com/usqcd-software/c-lime does to preprocessor macros coming from its own
AC_INIT
and which are included vialime.h
. (basically things likePACKAGE_VERSION
are undef'ed).I've cleaned up many of the include satements in the code and have attempted a workaround for the problem with c-lime.