[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Autoconf issue in mpqc



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 <jeremy@azazel.net>
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 <jeremy@azazel.net>
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

Attachment: signature.asc
Description: PGP signature


Reply to: