Autoconf issue in mpqc

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Autoconf issue in mpqc

Andreas Tille-5
Control: tags -1 help

Hi,

while Nilesh has fixed the MPI-3.0 issue of mpqc in Git[1] the package
does not build any more due to an autoconf issue:

...
configure.in:1802: error: possibly undefined macro: AC_CHECK_CCA
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:1833: error: possibly undefined macro: AC_DEFINE_DIR
autoreconf: /usr/bin/autoconf failed with exit status: 1
...

The macro AC_CHECK_CCA is defined in

   lib/autoconf/cca.m4

but it seems it is not found any more by recent autotools.

Any help would be appreciated.

Kind regards

    Andreas.

[1] https://salsa.debian.org/debichem-team/mpqc

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Jeremy Sowden
On 2020-04-05, at 08:18:30 +0200, Andreas Tille wrote:

> while Nilesh has fixed the MPI-3.0 issue of mpqc in Git[1] the package
> does not build any more due to an autoconf issue:
>
> ...
> configure.in:1802: error: possibly undefined macro: AC_CHECK_CCA
>       If this token and others are legitimate, please use
> m4_pattern_allow.
>       See the Autoconf documentation.
> configure.in:1833: error: possibly undefined macro: AC_DEFINE_DIR
> autoreconf: /usr/bin/autoconf failed with exit status: 1
> ...
>
> The macro AC_CHECK_CCA is defined in
>
>    lib/autoconf/cca.m4
>
> but it seems it is not found any more by recent autotools.
>
> Any help would be appreciated.
>
> Kind regards
>
>     Andreas.
>
> [1] https://salsa.debian.org/debichem-team/mpqc
Adding AC_CONFIG_MACRO_DIR to configure.in appears to fix it (patch
attached).

J.

diff --git a/configure.in b/configure.in
index ee82977e4931..d615d3854a6c 100644
--- a/configure.in
+++ b/configure.in
@@ -9,6 +9,7 @@ AC_INIT(src/lib/util/ref/ref.h)
 AC_PREREQ(2.55)
 AC_CONFIG_HEADER(src/lib/scconfig.h)
 AC_CONFIG_AUX_DIR(bin)
+AC_CONFIG_MACRO_DIR([lib/autoconf])
 
 AC_CANONICAL_SYSTEM
 

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Andreas Tille-5
Hi Jeremy,

On Sun, Apr 05, 2020 at 10:14:58AM +0100, Jeremy Sowden wrote:
> > Any help would be appreciated.
> >
> > [1] https://salsa.debian.org/debichem-team/mpqc
>
> Adding AC_CONFIG_MACRO_DIR to configure.in appears to fix it (patch
> attached).

Thanks a lot for the promising patch I have commited to Git[1].
Unfortunately the build does not yet succeed in a pbuilder chroot.
I've attached the part or the build log that seems to be autoconf
relevant.  I admit I'm a bit astonished since I can only see
warnings but no error ...

Kind regards

     Andreas.

--
http://fam-tille.de

mpqc_2.3.1-20_amd64.build_part (33K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Jeremy Sowden
On 2020-04-05, at 12:45:47 +0200, Andreas Tille wrote:

> Hi Jeremy,
>
> On Sun, Apr 05, 2020 at 10:14:58AM +0100, Jeremy Sowden wrote:
> > > Any help would be appreciated.
> > >
> > > [1] https://salsa.debian.org/debichem-team/mpqc
> >
> > Adding AC_CONFIG_MACRO_DIR to configure.in appears to fix it (patch
> > attached).
>
> Thanks a lot for the promising patch I have commited to Git[1].
> Unfortunately the build does not yet succeed in a pbuilder chroot.
> I've attached the part or the build log that seems to be autoconf
> relevant.  I admit I'm a bit astonished since I can only see
> warnings but no error ...
Here's a patch that fixes the autoheader warnings.  autoreconf is still
failing.

J.

> [...]
> autoheader: warning: missing template: ALWAYS_USE_MPI
> autoheader: Use AC_DEFINE([ALWAYS_USE_MPI], [], [Description])
> autoheader: warning: missing template: CXX_RESTRICT
> autoheader: warning: missing template: DEFAULT_ARMCI
> autoheader: warning: missing template: DEFAULT_MPI
> autoheader: warning: missing template: DEFAULT_MTMPI
> autoheader: warning: missing template: DEFAULT_SC_MEMORY
> autoheader: warning: missing template: EXPLICIT_TEMPLATE_INSTANTIATION
> autoheader: warning: missing template: HAVE_ARMCI
> autoheader: warning: missing template: HAVE_BACKTRACE
> autoheader: warning: missing template: HAVE_CCA_CHEM_HEADERS
> autoheader: warning: missing template: HAVE_CCA_SPEC_BABEL_HEADERS
> autoheader: warning: missing template: HAVE_FCHDIR
> autoheader: warning: missing template: HAVE_IOS_FMTFLAGS
> autoheader: warning: missing template: HAVE_ISNAN
> autoheader: warning: missing template: HAVE_LIBDERIV
> autoheader: warning: missing template: HAVE_LIBINT
> autoheader: warning: missing template: HAVE_LIBR12
> autoheader: warning: missing template: HAVE_LONG_LONG
> autoheader: warning: missing template: HAVE_MPI
> autoheader: warning: missing template: HAVE_MPIIO
> autoheader: warning: missing template: HAVE_MPIPP
> autoheader: warning: missing template: HAVE_MPI_INIT_THREAD
> autoheader: warning: missing template: HAVE_NIAMA
> autoheader: warning: missing template: HAVE_PERF
> autoheader: warning: missing template: HAVE_PTHREAD
> autoheader: warning: missing template: HAVE_PUBSEEKOFF
> autoheader: warning: missing template: HAVE_SCALABLE_BLAS
> autoheader: warning: missing template: HAVE_SEEKOFF
> autoheader: warning: missing template: HAVE_SGETN
> autoheader: warning: missing template: HAVE_SIDL_HEADERS
> autoheader: warning: missing template: HAVE_SYSV_IPC
> autoheader: warning: missing template: HAVE_TYPENAME
> autoheader: warning: missing template: HOST_ARCH
> autoheader: warning: missing template: INSTALLED_SCLIBDIR
> autoheader: warning: missing template: REF_OPTIMIZE
> autoheader: warning: missing template: SCDATADIR
> autoheader: warning: missing template: SC_BUILDID
> autoheader: warning: missing template: SC_MAJOR_VERSION
> autoheader: warning: missing template: SC_MICRO_VERSION
> autoheader: warning: missing template: SC_MINOR_VERSION
> autoheader: warning: missing template: SC_MPI_THREAD_LEVEL
> autoheader: warning: missing template: SC_VERSION
> autoheader: warning: missing template: SEMCTL_REQUIRES_SEMUN
> autoheader: warning: missing template: SIGHASELLIP
> autoheader: warning: missing template: SRC_SCLIBDIR
> autoheader: warning: missing template: TARGET_ARCH
> autoheader: warning: missing template: USING_NAMESPACE_STD
> autoheader: warning: missing template: WORDS_BIGENDIAN
> autoreconf: /usr/bin/autoheader failed with exit status: 1
> [...]

diff --git a/configure.in b/configure.in
index ee82977e4931..5a77f343331e 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,9 @@ AC_INIT(src/lib/util/ref/ref.h)
 AC_PREREQ(2.55)
 AC_CONFIG_HEADER(src/lib/scconfig.h)
 AC_CONFIG_AUX_DIR(bin)
 AC_CONFIG_MACRO_DIR([lib/autoconf])
+
+AC_DEFINE_HEADER_TEMPLATES
 
 AC_CANONICAL_SYSTEM
 
diff --git a/lib/autoconf/templates.m4 b/lib/autoconf/templates.m4
new file mode 100644
index 000000000000..693d54289326
--- /dev/null
+++ b/lib/autoconf/templates.m4
@@ -0,0 +1,50 @@
+AC_DEFUN([AC_DEFINE_HEADER_TEMPLATES],[
+AH_TEMPLATE([ALWAYS_USE_MPI], [])
+AH_TEMPLATE([CXX_RESTRICT], [])
+AH_TEMPLATE([DEFAULT_ARMCI], [])
+AH_TEMPLATE([DEFAULT_MPI], [])
+AH_TEMPLATE([DEFAULT_MTMPI], [])
+AH_TEMPLATE([DEFAULT_SC_MEMORY], [])
+AH_TEMPLATE([EXPLICIT_TEMPLATE_INSTANTIATION], [])
+AH_TEMPLATE([HAVE_ARMCI], [])
+AH_TEMPLATE([HAVE_BACKTRACE], [])
+AH_TEMPLATE([HAVE_CCA_CHEM_HEADERS], [])
+AH_TEMPLATE([HAVE_CCA_SPEC_BABEL_HEADERS], [])
+AH_TEMPLATE([HAVE_FCHDIR], [])
+AH_TEMPLATE([HAVE_IOS_FMTFLAGS], [])
+AH_TEMPLATE([HAVE_ISNAN], [])
+AH_TEMPLATE([HAVE_LIBDERIV], [])
+AH_TEMPLATE([HAVE_LIBINT], [])
+AH_TEMPLATE([HAVE_LIBR12], [])
+AH_TEMPLATE([HAVE_LONG_LONG], [])
+AH_TEMPLATE([HAVE_MPI], [])
+AH_TEMPLATE([HAVE_MPIIO], [])
+AH_TEMPLATE([HAVE_MPIPP], [])
+AH_TEMPLATE([HAVE_MPI_INIT_THREAD], [])
+AH_TEMPLATE([HAVE_NIAMA], [])
+AH_TEMPLATE([HAVE_PERF], [])
+AH_TEMPLATE([HAVE_PTHREAD], [])
+AH_TEMPLATE([HAVE_PUBSEEKOFF], [])
+AH_TEMPLATE([HAVE_SCALABLE_BLAS], [])
+AH_TEMPLATE([HAVE_SEEKOFF], [])
+AH_TEMPLATE([HAVE_SGETN], [])
+AH_TEMPLATE([HAVE_SIDL_HEADERS], [])
+AH_TEMPLATE([HAVE_SYSV_IPC], [])
+AH_TEMPLATE([HAVE_TYPENAME], [])
+AH_TEMPLATE([HOST_ARCH], [])
+AH_TEMPLATE([INSTALLED_SCLIBDIR], [])
+AH_TEMPLATE([REF_OPTIMIZE], [])
+AH_TEMPLATE([SCDATADIR], [])
+AH_TEMPLATE([SC_BUILDID], [])
+AH_TEMPLATE([SC_MAJOR_VERSION], [])
+AH_TEMPLATE([SC_MICRO_VERSION], [])
+AH_TEMPLATE([SC_MINOR_VERSION], [])
+AH_TEMPLATE([SC_MPI_THREAD_LEVEL], [])
+AH_TEMPLATE([SC_VERSION], [])
+AH_TEMPLATE([SEMCTL_REQUIRES_SEMUN], [])
+AH_TEMPLATE([SIGHASELLIP], [])
+AH_TEMPLATE([SRC_SCLIBDIR], [])
+AH_TEMPLATE([TARGET_ARCH], [])
+AH_TEMPLATE([USING_NAMESPACE_STD], [])
+AH_TEMPLATE([WORDS_BIGENDIAN], [])
+])

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Jeremy Sowden
On 2020-04-05, at 12:13:45 +0100, Jeremy Sowden wrote:

> On 2020-04-05, at 12:45:47 +0200, Andreas Tille wrote:
> > On Sun, Apr 05, 2020 at 10:14:58AM +0100, Jeremy Sowden wrote:
> > > > Any help would be appreciated.
> > > >
> > > > [1] https://salsa.debian.org/debichem-team/mpqc
> > >
> > > Adding AC_CONFIG_MACRO_DIR to configure.in appears to fix it
> > > (patch attached).
> >
> > Thanks a lot for the promising patch I have commited to Git[1].
> > Unfortunately the build does not yet succeed in a pbuilder chroot.
> > I've attached the part or the build log that seems to be autoconf
> > relevant.  I admit I'm a bit astonished since I can only see
> > warnings but no error ...
>
> Here's a patch that fixes the autoheader warnings.
Whoops.  That version doesn't seem to apply.  The patch I've attached to
this message I have actually tested properly.

> autoreconf is still failing.

That's not quite right: "autoreconf" fails, but  "autoreconf -f -i"
(which is what dh_autoreconf does) succeeds.  Now dh_auto_configure
fails.

J.

diff --git a/debian/patches/autoheader.patch b/debian/patches/autoheader.patch
new file mode 100644
index 000000000000..f00d772e29ef
--- /dev/null
+++ b/debian/patches/autoheader.patch
@@ -0,0 +1,69 @@
+diff --git a/configure.in b/configure.in
+index 99a09d38b3c2..c183ac3ef252 100644
+--- a/configure.in
++++ b/configure.in
+@@ -11,6 +11,8 @@ AC_CONFIG_HEADER(src/lib/scconfig.h)
+ AC_CONFIG_AUX_DIR(bin)
+ AC_CONFIG_MACRO_DIR([lib/autoconf])
+
++AC_DEFINE_HEADER_TEMPLATES
++
+ AC_CANONICAL_SYSTEM
+
+ AC_DEFINE_UNQUOTED(HOST_ARCH, "$host")
+diff --git a/lib/autoconf/templates.m4 b/lib/autoconf/templates.m4
+new file mode 100644
+index 000000000000..693d54289326
+--- /dev/null
++++ b/lib/autoconf/templates.m4
+@@ -0,0 +1,50 @@
++AC_DEFUN([AC_DEFINE_HEADER_TEMPLATES],[
++AH_TEMPLATE([ALWAYS_USE_MPI], [])
++AH_TEMPLATE([CXX_RESTRICT], [])
++AH_TEMPLATE([DEFAULT_ARMCI], [])
++AH_TEMPLATE([DEFAULT_MPI], [])
++AH_TEMPLATE([DEFAULT_MTMPI], [])
++AH_TEMPLATE([DEFAULT_SC_MEMORY], [])
++AH_TEMPLATE([EXPLICIT_TEMPLATE_INSTANTIATION], [])
++AH_TEMPLATE([HAVE_ARMCI], [])
++AH_TEMPLATE([HAVE_BACKTRACE], [])
++AH_TEMPLATE([HAVE_CCA_CHEM_HEADERS], [])
++AH_TEMPLATE([HAVE_CCA_SPEC_BABEL_HEADERS], [])
++AH_TEMPLATE([HAVE_FCHDIR], [])
++AH_TEMPLATE([HAVE_IOS_FMTFLAGS], [])
++AH_TEMPLATE([HAVE_ISNAN], [])
++AH_TEMPLATE([HAVE_LIBDERIV], [])
++AH_TEMPLATE([HAVE_LIBINT], [])
++AH_TEMPLATE([HAVE_LIBR12], [])
++AH_TEMPLATE([HAVE_LONG_LONG], [])
++AH_TEMPLATE([HAVE_MPI], [])
++AH_TEMPLATE([HAVE_MPIIO], [])
++AH_TEMPLATE([HAVE_MPIPP], [])
++AH_TEMPLATE([HAVE_MPI_INIT_THREAD], [])
++AH_TEMPLATE([HAVE_NIAMA], [])
++AH_TEMPLATE([HAVE_PERF], [])
++AH_TEMPLATE([HAVE_PTHREAD], [])
++AH_TEMPLATE([HAVE_PUBSEEKOFF], [])
++AH_TEMPLATE([HAVE_SCALABLE_BLAS], [])
++AH_TEMPLATE([HAVE_SEEKOFF], [])
++AH_TEMPLATE([HAVE_SGETN], [])
++AH_TEMPLATE([HAVE_SIDL_HEADERS], [])
++AH_TEMPLATE([HAVE_SYSV_IPC], [])
++AH_TEMPLATE([HAVE_TYPENAME], [])
++AH_TEMPLATE([HOST_ARCH], [])
++AH_TEMPLATE([INSTALLED_SCLIBDIR], [])
++AH_TEMPLATE([REF_OPTIMIZE], [])
++AH_TEMPLATE([SCDATADIR], [])
++AH_TEMPLATE([SC_BUILDID], [])
++AH_TEMPLATE([SC_MAJOR_VERSION], [])
++AH_TEMPLATE([SC_MICRO_VERSION], [])
++AH_TEMPLATE([SC_MINOR_VERSION], [])
++AH_TEMPLATE([SC_MPI_THREAD_LEVEL], [])
++AH_TEMPLATE([SC_VERSION], [])
++AH_TEMPLATE([SEMCTL_REQUIRES_SEMUN], [])
++AH_TEMPLATE([SIGHASELLIP], [])
++AH_TEMPLATE([SRC_SCLIBDIR], [])
++AH_TEMPLATE([TARGET_ARCH], [])
++AH_TEMPLATE([USING_NAMESPACE_STD], [])
++AH_TEMPLATE([WORDS_BIGENDIAN], [])
++])
diff --git a/debian/patches/series b/debian/patches/series
index d700ae497e80..db79d4fb8ff5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@
 g++6-constexpr.patch
 Fix_mpi.patch
 autoconf.patch
+autoheader.patch

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Andreas Tille-5
On Sun, Apr 05, 2020 at 12:34:55PM +0100, Jeremy Sowden wrote:

> > > I've attached the part or the build log that seems to be autoconf
> > > relevant.  I admit I'm a bit astonished since I can only see
> > > warnings but no error ...
> >
> > Here's a patch that fixes the autoheader warnings.
>
> Whoops.  That version doesn't seem to apply.  The patch I've attached to
> this message I have actually tested properly.
>
> > autoreconf is still failing.
>
> That's not quite right: "autoreconf" fails, but  "autoreconf -f -i"
> (which is what dh_autoreconf does) succeeds.  Now dh_auto_configure
> fails.

I confirm it fails with

...
checking if semctl requires semun... no
checking if fortran compiler works... no
configure: error: in `/build/mpqc-2.3.1':
configure: error: fortran compiler does not work
 

I've updated Git with your patch - thanks a lot so far.

Kind regards

      Andreas.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Jeremy Sowden
On 2020-04-05, at 14:32:16 +0200, Andreas Tille wrote:

> On Sun, Apr 05, 2020 at 12:34:55PM +0100, Jeremy Sowden wrote:
> > > > I've attached the part or the build log that seems to be
> > > > autoconf relevant.  I admit I'm a bit astonished since I can
> > > > only see warnings but no error ...
> > >
> > > Here's a patch that fixes the autoheader warnings.
> >
> > Whoops.  That version doesn't seem to apply.  The patch I've
> > attached to this message I have actually tested properly.
> >
> > > autoreconf is still failing.
> >
> > That's not quite right: "autoreconf" fails, but  "autoreconf -f -i"
> > (which is what dh_autoreconf does) succeeds.  Now dh_auto_configure
> > fails.
>
> I confirm it fails with
>
> ...
> checking if semctl requires semun... no
> checking if fortran compiler works... no
> configure: error: in `/build/mpqc-2.3.1':
> configure: error: fortran compiler does not work
>
>
> I've updated Git with your patch - thanks a lot so far.
In my case, the problem was:

  ./configure: line 4287: mpicc: command not found

IOW, missing build-deps.  Once I installed those, dh_auto_configure was
happy, but there were compilation failures because autoheader clobbered
src/lib/scconfig.h.in.  I've attached two patches which fix those.

J.

From 179ea7ad88afe65c49976fe713e7e061692d51cf Mon Sep 17 00:00:00 2001
From: Jeremy Sowden <[hidden email]>
Date: Sun, 5 Apr 2020 20:22:51 +0100
Subject: [PATCH 1/2] shmtype fix.

---
 debian/patches/series        |  1 +
 debian/patches/shmtype.patch | 45 ++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 debian/patches/shmtype.patch

diff --git a/debian/patches/series b/debian/patches/series
index db79d4fb8ff5..c5ef93ff27ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ g++6-constexpr.patch
 Fix_mpi.patch
 autoconf.patch
 autoheader.patch
+shmtype.patch
diff --git a/debian/patches/shmtype.patch b/debian/patches/shmtype.patch
new file mode 100644
index 000000000000..0a8273be680a
--- /dev/null
+++ b/debian/patches/shmtype.patch
@@ -0,0 +1,45 @@
+diff --git a/src/lib/scconfig.h.in b/src/lib/scconfig.h.in
+index 81510ae39834..8ca70c95073d 100644
+--- a/src/lib/scconfig.h.in
++++ b/src/lib/scconfig.h.in
+@@ -156,10 +156,6 @@
+ /* Define to the type used for shared memory.  */
+ /* #undef SHMTYPE */
+
+-#ifndef SHMTYPE
+-#define SHMTYPE char*
+-#endif
+-
+ /* Define if you have the <fcntl.h> header file.  */
+ #undef HAVE_FCNTL_H
+
+diff --git a/src/lib/util/group/memshm.cc b/src/lib/util/group/memshm.cc
+index 91964682b7f0..1314e43f01ec 100644
+--- a/src/lib/util/group/memshm.cc
++++ b/src/lib/util/group/memshm.cc
+@@ -41,6 +41,10 @@
+ using namespace std;
+ using namespace sc;
+
++#ifndef SHMTYPE
++#define SHMTYPE char*
++#endif
++
+ #ifndef SHMMAX
+ // glibc 2.0.3 isn't defining SHMMAX so make set it here
+ #  ifdef __linux__
+diff --git a/src/lib/util/group/messshm.cc b/src/lib/util/group/messshm.cc
+index f07fe1a79fde..34ee31e1ddbf 100644
+--- a/src/lib/util/group/messshm.cc
++++ b/src/lib/util/group/messshm.cc
+@@ -40,6 +40,10 @@
+ using namespace std;
+ using namespace sc;
+
++#ifndef SHMTYPE
++#define SHMTYPE char*
++#endif
++
+ //#define DEBUG
+
+ #ifndef SEM_A
--
2.25.1


From 4d6bd8fc829d385bc05d696780429a03d915b18f Mon Sep 17 00:00:00 2001
From: Jeremy Sowden <[hidden email]>
Date: Sun, 5 Apr 2020 20:58:57 +0100
Subject: [PATCH 2/2] restrictxx fix.

---
 debian/patches/restrictxx.patch | 102 ++++++++++++++++++++++++++++++++
 debian/patches/series           |   1 +
 2 files changed, 103 insertions(+)
 create mode 100644 debian/patches/restrictxx.patch

diff --git a/debian/patches/restrictxx.patch b/debian/patches/restrictxx.patch
new file mode 100644
index 000000000000..e86d7d1a95e3
--- /dev/null
+++ b/debian/patches/restrictxx.patch
@@ -0,0 +1,102 @@
+diff --git a/src/lib/scconfig.h.in b/src/lib/scconfig.h.in
+index 81510ae39834..3eaea90920ab 100644
+--- a/src/lib/scconfig.h.in
++++ b/src/lib/scconfig.h.in
+@@ -14,12 +14,6 @@
+ /* Define if the C++ restrict keyword extension exists.  */
+ #undef CXX_RESTRICT
+
+-#ifdef CXX_RESTRICT
+-#define restrictxx restrict
+-#else
+-#define restrictxx
+-#endif
+-
+ #endif
+
+ /* Define if you want to optimize the reference counting code.  */
+diff --git a/src/lib/chemistry/qc/intv3/build2e.cc b/src/lib/chemistry/qc/intv3/build2e.cc
+index 1179f9dcb6d2..fec356986d33 100644
+--- a/src/lib/chemistry/qc/intv3/build2e.cc
++++ b/src/lib/chemistry/qc/intv3/build2e.cc
+@@ -36,6 +36,12 @@
+ #include <chemistry/qc/intv3/utils.h>
+ #include <chemistry/qc/intv3/int2e.h>
+
++#ifdef CXX_RESTRICT
++#define restrictxx restrict
++#else
++#define restrictxx
++#endif
++
+ using namespace std;
+ using namespace sc;
+
+diff --git a/src/lib/chemistry/qc/intv3/shift2e.cc b/src/lib/chemistry/qc/intv3/shift2e.cc
+index 97d9f24df6a0..5a01bff73894 100644
+--- a/src/lib/chemistry/qc/intv3/shift2e.cc
++++ b/src/lib/chemistry/qc/intv3/shift2e.cc
+@@ -29,6 +29,12 @@
+ #include <chemistry/qc/intv3/macros.h>
+ #include <chemistry/qc/intv3/int2e.h>
+
++#ifdef CXX_RESTRICT
++#define restrictxx restrict
++#else
++#define restrictxx
++#endif
++
+ using namespace std;
+ using namespace sc;
+
+diff --git a/src/lib/chemistry/qc/oint3/build.h b/src/lib/chemistry/qc/oint3/build.h
+index 6f82fca57bbb..f05de7835e56 100644
+--- a/src/lib/chemistry/qc/oint3/build.h
++++ b/src/lib/chemistry/qc/oint3/build.h
+@@ -8,6 +8,12 @@
+ #include <scconfig.h>
+ #include <chemistry/qc/intv3/array.h>
+
++#ifdef CXX_RESTRICT
++#define restrictxx restrict
++#else
++#define restrictxx
++#endif
++
+ namespace sc {
+
+ #define MG 3
+diff --git a/src/lib/chemistry/qc/scf/clhftmpl.h b/src/lib/chemistry/qc/scf/clhftmpl.h
+index cba1c9d425a6..910f04192a08 100644
+--- a/src/lib/chemistry/qc/scf/clhftmpl.h
++++ b/src/lib/chemistry/qc/scf/clhftmpl.h
+@@ -10,6 +10,12 @@
+ #define CHECK(ival,pval,ij,kl,con)
+ #endif
+
++#ifdef CXX_RESTRICT
++#define restrictxx restrict
++#else
++#define restrictxx
++#endif
++
+ namespace sc {
+
+ class LocalCLHFContribution {
+diff --git a/src/lib/chemistry/qc/scf/lgbuild.h b/src/lib/chemistry/qc/scf/lgbuild.h
+index 9ebec6e3debd..a561c3ee762d 100644
+--- a/src/lib/chemistry/qc/scf/lgbuild.h
++++ b/src/lib/chemistry/qc/scf/lgbuild.h
+@@ -39,6 +39,12 @@
+ #include <scconfig.h>
+ #include <chemistry/qc/scf/gbuild.h>
+
++#ifdef CXX_RESTRICT
++#define restrictxx restrict
++#else
++#define restrictxx
++#endif
++
+ namespace sc {
+
+ template<class T>
diff --git a/debian/patches/series b/debian/patches/series
index c5ef93ff27ed..9662a2c679b6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ Fix_mpi.patch
 autoconf.patch
 autoheader.patch
 shmtype.patch
+restrictxx.patch
--
2.25.1


signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autoconf issue in mpqc

Jeremy Sowden
On 2020-04-05, at 22:38:39 +0100, Jeremy Sowden wrote:

> On 2020-04-05, at 14:32:16 +0200, Andreas Tille wrote:
> > On Sun, Apr 05, 2020 at 12:34:55PM +0100, Jeremy Sowden wrote:
> > > > > I've attached the part or the build log that seems to be
> > > > > autoconf relevant.  I admit I'm a bit astonished since I can
> > > > > only see warnings but no error ...
> > > >
> > > > Here's a patch that fixes the autoheader warnings.
> > >
> > > Whoops.  That version doesn't seem to apply.  The patch I've
> > > attached to this message I have actually tested properly.
> > >
> > > > autoreconf is still failing.
> > >
> > > That's not quite right: "autoreconf" fails, but  "autoreconf -f
> > > -i" (which is what dh_autoreconf does) succeeds.  Now
> > > dh_auto_configure fails.
> >
> > I confirm it fails with
> >
> > ...
> > checking if semctl requires semun... no
> > checking if fortran compiler works... no
> > configure: error: in `/build/mpqc-2.3.1':
> > configure: error: fortran compiler does not work
> >
> >
> > I've updated Git with your patch - thanks a lot so far.
>
> In my case, the problem was:
>
>   ./configure: line 4287: mpicc: command not found
>
> IOW, missing build-deps.  Once I installed those, dh_auto_configure
> was happy, but there were compilation failures because autoheader
> clobbered src/lib/scconfig.h.in.  I've attached two patches which fix
> those.
Having re-read the autoconf and autoheader doc's this evening, I think
the attached fixes are an improvement over yesterday's.

J.

From cb556d820337b9e2b24cdc70049e9bca1967c7af Mon Sep 17 00:00:00 2001
From: Jeremy Sowden <[hidden email]>
Date: Sun, 5 Apr 2020 20:22:51 +0100
Subject: [PATCH v2 1/2] shmtype fix.

---
 debian/patches/series        |  1 +
 debian/patches/shmtype.patch | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 debian/patches/shmtype.patch

diff --git a/debian/patches/series b/debian/patches/series
index db79d4fb8ff5..c5ef93ff27ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ g++6-constexpr.patch
 Fix_mpi.patch
 autoconf.patch
 autoheader.patch
+shmtype.patch
diff --git a/debian/patches/shmtype.patch b/debian/patches/shmtype.patch
new file mode 100644
index 000000000000..273b16a9dec6
--- /dev/null
+++ b/debian/patches/shmtype.patch
@@ -0,0 +1,21 @@
+diff --git a/configure.in b/configure.in
+index 8ebd2fa89c95..96e7fb7039da 100644
+--- a/configure.in
++++ b/configure.in
+@@ -8,6 +8,7 @@ define([AC_CACHE_SAVE], )dnl for debugging configure.in
+ AC_INIT(src/lib/util/ref/ref.h)
+ AC_PREREQ(2.55)
+ AC_CONFIG_HEADER(src/lib/scconfig.h)
++AH_BOTTOM([#include "shm_type.h"])
+ AC_CONFIG_AUX_DIR(bin)
+ AC_CONFIG_MACRO_DIR([lib/autoconf])
+
+diff --git a/src/lib/shm_type.h b/src/lib/shm_type.h
+new file mode 100644
+index 000000000000..8c62fb392b34
+--- /dev/null
++++ b/src/lib/shm_type.h
+@@ -0,0 +1,3 @@
++#ifndef SHMTYPE
++#define SHMTYPE char*
++#endif
--
2.25.1


From 758970c9d0b5928b60b000acd3485cc666827591 Mon Sep 17 00:00:00 2001
From: Jeremy Sowden <[hidden email]>
Date: Sun, 5 Apr 2020 20:58:57 +0100
Subject: [PATCH v2 2/2] restrictxx fix.

---
 debian/patches/restrictxx.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 debian/patches/restrictxx.patch

diff --git a/debian/patches/restrictxx.patch b/debian/patches/restrictxx.patch
new file mode 100644
index 000000000000..3730918e8701
--- /dev/null
+++ b/debian/patches/restrictxx.patch
@@ -0,0 +1,27 @@
+diff --git a/configure.in b/configure.in
+index 96e7fb7039da..040b475941c7 100644
+--- a/configure.in
++++ b/configure.in
+@@ -8,7 +8,10 @@ define([AC_CACHE_SAVE], )dnl for debugging configure.in
+ AC_INIT(src/lib/util/ref/ref.h)
+ AC_PREREQ(2.55)
+ AC_CONFIG_HEADER(src/lib/scconfig.h)
+-AH_BOTTOM([#include "shm_type.h"])
++AH_BOTTOM([
++#include "shm_type.h"
++#include "restrictxx.h"
++])
+ AC_CONFIG_AUX_DIR(bin)
+ AC_CONFIG_MACRO_DIR([lib/autoconf])
+
+diff --git a/src/lib/restrictxx.h b/src/lib/restrictxx.h
+new file mode 100644
+index 000000000000..cacfea3b7db5
+--- /dev/null
++++ b/src/lib/restrictxx.h
+@@ -0,0 +1,5 @@
++#ifdef CXX_RESTRICT
++#define restrictxx restrict
++#else
++#define restrictxx
++#endif
diff --git a/debian/patches/series b/debian/patches/series
index c5ef93ff27ed..9662a2c679b6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ Fix_mpi.patch
 autoconf.patch
 autoheader.patch
 shmtype.patch
+restrictxx.patch
--
2.25.1


signature.asc (673 bytes) Download Attachment