tag 533246 pending
tag 522007 pending
thanks

Petr Salinger <petr.salin...@seznam.cz> (16/06/2009):
> The current code does not use functions exposed by
> <termios.h>, but tries to guess implementation of these functions.
> Please stick to <termios.h> interface specified by POSIX.
> http://www.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
>
> There is also need of  -D_GNU_SOURCE in mpid/mpd/ part.
>
> Please find attached patch with those fixes.

No reaction to those FTBFSes in months, prepared a fixed package (see
attached source debdiff), uploaded to DELAYED/1. Short delay because
mpich is needed for various other packages on kfreebsd-*.

Thanks to Petr & Peter.

Mraw,
KiBi.
diff -u mpich-1.2.7/debian/changelog mpich-1.2.7/debian/changelog
--- mpich-1.2.7/debian/changelog
+++ mpich-1.2.7/debian/changelog
@@ -1,3 +1,15 @@
+mpich (1.2.7-9.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS by adding “-D_GNU_SOURCE” to the CFLAGS in mpid/mpd as
+    suggested by Peter Green and Petr Salinger (Closes: #522007):
+     - 24_use_gnu_source_for_mpd.dpatch
+  * Fix FTBFS on GNU/kFreeBSD by sticking to <termios.h> as specified by
+    POSIX, as suggested by Petr Salinger (Closes: #533246):
+     - 25_use_posix_termios_interface.dpatch
+
+ -- Cyril Brulebois <k...@debian.org>  Fri, 03 Jul 2009 22:14:10 +0200
+
 mpich (1.2.7-9) unstable; urgency=low
 
   * Package is now team-maintained by pkg-scicomp (closes:#447678)
diff -u mpich-1.2.7/debian/patches/00list mpich-1.2.7/debian/patches/00list
--- mpich-1.2.7/debian/patches/00list
+++ mpich-1.2.7/debian/patches/00list
@@ -19,0 +20,2 @@
+24_use_gnu_source_for_mpd.dpatch
+25_use_posix_termios_interface.dpatch
only in patch2:
unchanged:
--- mpich-1.2.7.orig/debian/patches/25_use_posix_termios_interface.dpatch
+++ mpich-1.2.7/debian/patches/25_use_posix_termios_interface.dpatch
@@ -0,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_use_posix_termios_interface.dpatch by Cyril Brulebois <k...@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Stick to POSIX <termios.h> interface as suggested by Petr Salinger.
+## DP: That fixes the FTBFS on GNU/kFreeBSD.
+
+...@dpatch@
+--- mpich-1.2.7.orig/mpid/ch_p4/p4/lib/p4_secure.c
++++ mpich-1.2.7/mpid/ch_p4/p4/lib/p4_secure.c
+@@ -450,7 +450,7 @@
+ {
+     struct termios tty_new;
+
+-    if (ioctl(0, TIOCGETA, &tty_orig) < 0)
++    if (tcgetattr(0, &tty_orig) < 0)
+     {
+        fprintf(stderr, "tcgetattr failed: %s\n", strerror(errno));
+        return -1;
+@@ -460,7 +460,7 @@
+
+     tty_new.c_lflag &= ~(ECHO);
+
+-    if (ioctl(0, TIOCSETA, &tty_new) < 0)
++    if (tcsetattr(0, TCSANOW, &tty_new) < 0)
+     {
+        fprintf(stderr, "tcsetattr failed: %s\n", strerror(errno));
+        return -1;
+@@ -470,7 +470,7 @@
+
+ static int echo_on (void)
+ {
+-    if (ioctl(0, TIOCSETA, &tty_orig) < 0)
++    if (tcsetattr(0, TCSANOW, &tty_orig) < 0)
+     {
+        fprintf(stderr, "tcsetattr failed: %s\n", strerror(errno));
+        return -1;
only in patch2:
unchanged:
--- mpich-1.2.7.orig/debian/patches/24_use_gnu_source_for_mpd.dpatch
+++ mpich-1.2.7/debian/patches/24_use_gnu_source_for_mpd.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 24_use_gnu_source_for_mpd.dpatch by Peter Green <plugw...@p10link.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: with latest glibc _GNU_SOURCE must be defined to use h_addr from
+## DP: struct hostent. This patch defines it for stuff in the mpid/mpd
+## DP: directory
+
+...@dpatch@
+diff -urNad mpich-1.2.7~/mpid/mpd/Makefile.in mpich-1.2.7/mpid/mpd/Makefile.in
+--- mpich-1.2.7~/mpid/mpd/Makefile.in	      2003-02-04 21:05:59.000000000 +0000
++++ mpich-1.2.7/mpid/mpd/Makefile.in	      2009-04-05 23:41:39.000000000 +0100
+@@ -16,7 +16,7 @@
+ LDFLAGS   = @LDFLAGS@
+ LIBS	     = @LIBS@ 
+ GDB       = @GDB@
+-CFLAGS    = @CFLAGS@
++CFLAGS    = @CFLAGS@ -D_GNU_SOURCE
+ 
+ C_COMPILE = ${CC} ${INCLUDES} ${CFLAGS} ${COPTIONS}
+ C_LINK	     = ${CLINKER} ${CFLAGS} ${COPTIONS} ${LDFLAGS}

Reply via email to