Bug#919308: scotch: do not use mpicc
Helmut Grohne
helmut at subdivi.de
Mon Jan 14 19:47:16 GMT 2019
Source: scotch
Version: 6.0.6-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap
Please stop using mpicc. You may ask, why replace something that has
worked for years. The issue is that mpicc replaces the compiler and
that's something we routinely do for cross compilation. Also if you want
to use multiple compiler replacers (e.g. mpicc, cgcc, clang) you get
into problems as you can only replace it once. So what to do instead?
Practically, all that mpicc does is add some compiler flags. We've got a
solution for that problem and that's pkg-config. The attached patch
makes scotch stop using mpicc and start using pkg-config. Please
consider applying it.
Helmut
-------------- next part --------------
diff --minimal -Nru scotch-6.0.6/debian/Makefile_int.inc scotch-6.0.6/debian/Makefile_int.inc
--- scotch-6.0.6/debian/Makefile_int.inc 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/Makefile_int.inc 2019-01-14 20:20:18.000000000 +0100
@@ -5,17 +5,18 @@
LIB = .a
OBJ = .o
+PKG_CONFIG = @DEB_HOST_GNU_TYPE at -pkg-config
MAKE = make
AR = ar
ARFLAGS = -ruv
CAT = cat
-CCS = mpicc
-CCP = mpicc
-CCD = mpicc
+CCS = @DEB_HOST_GNU_TYPE at -gcc
+CCP = @DEB_HOST_GNU_TYPE at -gcc
+CCD = @DEB_HOST_GNU_TYPE at -gcc
CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS)
-CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS)
-CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON)
-LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON)
+CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS) $(shell $(PKG_CONFIG) --cflags mpi-cxx)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) $(shell $(PKG_CONFIG) --cflags mpi-c)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON) $(shell $(PKG_CONFIG) --libs mpi-c)
CP = cp
LEX = flex -Pscotchyy -olex.yy.c
LN = ln
diff --minimal -Nru scotch-6.0.6/debian/Makefile_int32.inc scotch-6.0.6/debian/Makefile_int32.inc
--- scotch-6.0.6/debian/Makefile_int32.inc 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/Makefile_int32.inc 2019-01-14 20:20:17.000000000 +0100
@@ -5,17 +5,18 @@
LIB = .a
OBJ = .o
+PKG_CONFIG = @DEB_HOST_GNU_TYPE at -pkg-config
MAKE = make
AR = ar
ARFLAGS = -ruv
CAT = cat
-CCS = mpicc
-CCP = mpicc
-CCD = mpicc
+CCS = @DEB_HOST_GNU_TYPE at -gcc
+CCP = @DEB_HOST_GNU_TYPE at -gcc
+CCD = @DEB_HOST_GNU_TYPE at -gcc
CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS)
-CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS)
-CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) -DINTSIZE32
-LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON)
+CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS) $(shell $(PKG_CONFIG) --cflags mpi-cxx)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) -DINTSIZE32 $(shell $(PKG_CONFIG) --cflags mpi-c)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON) $(shell $(PKG_CONFIG) --libs mpi-c)
CP = cp
LEX = flex -Pscotchyy -olex.yy.c
LN = ln
diff --minimal -Nru scotch-6.0.6/debian/Makefile_int64.inc scotch-6.0.6/debian/Makefile_int64.inc
--- scotch-6.0.6/debian/Makefile_int64.inc 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/Makefile_int64.inc 2019-01-14 20:20:16.000000000 +0100
@@ -5,17 +5,18 @@
LIB = .a
OBJ = .o
+PKG_CONFIG = @DEB_HOST_GNU_TYPE at -pkg-config
MAKE = make
AR = ar
ARFLAGS = -ruv
CAT = cat
-CCS = mpicc
-CCP = mpicc
-CCD = mpicc
+CCS = @DEB_HOST_GNU_TYPE at -gcc
+CCP = @DEB_HOST_GNU_TYPE at -gcc
+CCD = @DEB_HOST_GNU_TYPE at -gcc
CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS)
-CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS)
-CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) -DINTSIZE64
-LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON)
+CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS) $(shell $(PKG_CONFIG) --cflags mpi-cxx)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) -DINTSIZE64 $(shell $(PKG_CONFIG) --cflags mpi-c)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON) $(shell $(PKG_CONFIG) --libs mpi-c)
CP = cp
LEX = flex -Pscotchyy -olex.yy.c
LN = ln
diff --minimal -Nru scotch-6.0.6/debian/Makefile_long.inc scotch-6.0.6/debian/Makefile_long.inc
--- scotch-6.0.6/debian/Makefile_long.inc 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/Makefile_long.inc 2019-01-14 20:20:12.000000000 +0100
@@ -5,17 +5,18 @@
LIB = .a
OBJ = .o
+PKG_CONFIG = @DEB_HOST_GNU_TYPE at -pkg-config
MAKE = make
AR = ar
ARFLAGS = -ruv
CAT = cat
-CCS = mpicc
-CCP = mpicc
-CCD = mpicc
+CCS = @DEB_HOST_GNU_TYPE at -gcc
+CCP = @DEB_HOST_GNU_TYPE at -gcc
+CCD = @DEB_HOST_GNU_TYPE at -gcc
CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS)
-CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS)
-CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) -DLONG
-LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON)
+CXXFLAGS= $(shell dpkg-buildflags --get CXXFLAGS) $(shell $(PKG_CONFIG) --cflags mpi-cxx)
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CFLAGS_COMMON) -DLONG $(shell $(PKG_CONFIG) --cflags mpi-c)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) $(LDFLAGS_COMMON) $(shell $(PKG_CONFIG) --libs mpi-c)
CP = cp
LEX = flex -Pscotchyy -olex.yy.c
LN = ln
diff --minimal -Nru scotch-6.0.6/debian/changelog scotch-6.0.6/debian/changelog
--- scotch-6.0.6/debian/changelog 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/changelog 2019-01-14 20:21:23.000000000 +0100
@@ -1,3 +1,10 @@
+scotch (6.0.6-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Do not use mpicc. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Mon, 14 Jan 2019 20:21:23 +0100
+
scotch (6.0.6-2) unstable; urgency=medium
* Team upload.
diff --minimal -Nru scotch-6.0.6/debian/control scotch-6.0.6/debian/control
--- scotch-6.0.6/debian/control 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/control 2019-01-14 20:17:00.000000000 +0100
@@ -5,6 +5,7 @@
Uploaders: "Adam C. Powell, IV" <hazelsct at debian.org>,
Andreas Tille <tille at debian.org>
Build-Depends: debhelper (>= 11),
+ pkg-config,
quilt,
bison, flex,
zlib1g-dev,
diff --minimal -Nru scotch-6.0.6/debian/rules scotch-6.0.6/debian/rules
--- scotch-6.0.6/debian/rules 2018-09-23 23:26:55.000000000 +0200
+++ scotch-6.0.6/debian/rules 2019-01-14 20:21:23.000000000 +0100
@@ -96,7 +96,7 @@
set -e; \
for v in $(INTSIZE_VERS); do \
echo "compiling for $$v"; \
- cp debian/Makefile_$$v.inc src/Makefile.inc; \
+ sed 's/@DEB_HOST_GNU_TYPE@/$(DEB_HOST_GNU_TYPE)/' < debian/Makefile_$$v.inc > src/Makefile.inc; \
(cd src && $(MAKE) realclean prefix=$(CURDIR)/$$v); \
(cd src && $(MAKE) scotch ptscotch prefix=$(CURDIR)/$$v); \
(cd src && $(MAKE) esmumps ptesmumps prefix=$(CURDIR)/$$v); \
More information about the debian-science-maintainers
mailing list