Bug#922453: cernlib: fortran modules must be compiled with no stronger optimization than -O1 (aka -O)

Gilles Filippini pini at debian.org
Sat Feb 16 09:27:43 GMT 2019


Source: cernlib
Version: 20061220+dfsg3-4.3
Severity: grave
Justification: renders package unusable
Tags: patch


-------- Message transféré --------
Sujet : cernlib (20061220+dfsg3-4.3build1) misbehaves on x86_64
Date : Mon, 4 Feb 2019 00:52:08 +0100
De : Jacek M. Holeczek <jacek.m.holeczek at gmail.com>
Pour : Matthias Klose <doko at ubuntu.com>, Gilles Filippini <pini at debian.org>

Hi,
I tried to use the cernlib related executables on an Ubuntu 18.04 /
x86_64 / gcc 7.3.0.
I have found that the "pawX11" misbehaves.
The problem is related to the used fortran optimization flag.
By default it is now "-O3" but this is producing misbehaving libraries.
I tried to rebuild everything using "-O2" but they still misbehaved.
Finally, after I switched to "-O" (i.e. "-O1"), they started to behave
properly.
Please find attached a small patch file which tries to ensure that the
fortran source code will be compiled with "-O" (and not "-O3" nor "-O2").
Hope it helps,
Best regards,
Jacek.

-------------- next part --------------
diff -Naur cernlib-20061220+dfsg3.original/debian/patches/102-dont-optimize-some-code.dpatch cernlib-20061220+dfsg3/debian/patches/102-dont-optimize-some-code.dpatch
--- cernlib-20061220+dfsg3.original/debian/patches/102-dont-optimize-some-code.dpatch	2017-08-06 19:23:39.000000000 +0000
+++ cernlib-20061220+dfsg3/debian/patches/102-dont-optimize-some-code.dpatch	2019-02-03 21:49:52.638404057 +0000
@@ -20,7 +20,7 @@
 +#endif
 +
 +/* GCC 7 on 64bit targets, see https://gcc.gnu.org/PR81723 */
-+SpecialFortranLibObjectRule(cwerf64,cwerf64,-O2,NullParameter)
++SpecialFortranLibObjectRule(cwerf64,cwerf64,-O,NullParameter)
 diff -urNad cernlib-2006.dfsg.2~/src/mathlib/gen/d/Imakefile cernlib-2006.dfsg.2/src/mathlib/gen/d/Imakefile
 --- cernlib-2006.dfsg.2~/src/mathlib/gen/d/Imakefile	1996-06-12 08:25:38.000000000 -0700
 +++ cernlib-2006.dfsg.2/src/mathlib/gen/d/Imakefile	2008-02-22 12:06:26.000000000 -0800
diff -Naur cernlib-20061220+dfsg3.original/debian/patches/126-fix-patchy-compile-flags.dpatch cernlib-20061220+dfsg3/debian/patches/126-fix-patchy-compile-flags.dpatch
--- cernlib-20061220+dfsg3.original/debian/patches/126-fix-patchy-compile-flags.dpatch	2013-08-24 09:16:07.000000000 +0000
+++ cernlib-20061220+dfsg3/debian/patches/126-fix-patchy-compile-flags.dpatch	2019-02-03 21:48:36.151806615 +0000
@@ -76,7 +76,7 @@
  
 -      PARAMETER   (CHPOF = '-c -O -fno-automatic')
 -      PARAMETER   (CHPOC = '-c -O2 -m486')
-+      PARAMETER   (CHPOF = '-c -g -O2 -fno-automatic')
++      PARAMETER   (CHPOF = '-c -g -O -fno-automatic')
 +      PARAMETER   (CHPOC = '-c -g -O2')
        PARAMETER   (CHPOA = ' ')
  
diff -Naur cernlib-20061220+dfsg3.original/debian/patches/304-update-Imake-config-files.dpatch cernlib-20061220+dfsg3/debian/patches/304-update-Imake-config-files.dpatch
--- cernlib-20061220+dfsg3.original/debian/patches/304-update-Imake-config-files.dpatch	2015-09-09 01:24:30.000000000 +0000
+++ cernlib-20061220+dfsg3/debian/patches/304-update-Imake-config-files.dpatch	2019-02-03 21:47:38.208869466 +0000
@@ -1794,7 +1794,7 @@
 +
 +#ifdef AMD64Architecture
 +# ifndef OptimizationLevel
-+#  define OptimizationLevel	-O3
++#  define OptimizationLevel	-O
 +# endif
 +# ifndef OptimizedCDebugFlags
 +#  define OptimizedCDebugFlags  OptimizationLevel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20190216/6f501624/attachment.sig>


More information about the debian-science-maintainers mailing list