Bug#766482: cernlib: FTBFS on arm64

2015-09-08 Thread Edmund Grimley Evans
Control: tag -1 patch

> Then those two changes can be turned into a patch that can be
> installed at debian/patches/140-arm64.dpatch

Perhaps they can, but I can't now see how to do it. I don't understand
the package's patch management system.

However, the changes described above belong quite logically together
with the other changes in
debian/patches/304-update-Imake-config-files.dpatch so the easy thing
to do is to modify that file, as done by the attached patch.
--- cernlib-20061220+dfsg3.orig/debian/patches/304-update-Imake-config-files.dpatch
+++ cernlib-20061220+dfsg3/debian/patches/304-update-Imake-config-files.dpatch
@@ -941,7 +941,7 @@
  #endif /* DGUX */
  
  #ifdef __convex__
-@@ -366,101 +735,446 @@
+@@ -366,101 +735,452 @@
  # define ConvexArchitecture
  #endif /* _convex_ */
  
@@ -1272,6 +1272,12 @@
 +#   define AMD64Architecture
 +#  endif
 +# endif
++# if defined(__aarch64__)
++#  undef __aarch64__
++#  ifndef ARM64Architecture
++#   define ARM64Architecture
++#  endif
++# endif
 +#endif /* linux || __GLIBC__ */
 +
 +#if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc))
@@ -1495,7 +1501,7 @@
  #endif
  #define HasPutenv		YES
  #define HasShm			YES
-@@ -97,38 +97,308 @@
+@@ -97,38 +97,320 @@
  #define NeedVarargsPrototypes	YES
  #define NeedWidePrototypes	NO
  
@@ -1800,6 +1806,18 @@
 +# define CERNLIB_QMLXIA64
 +#endif /* AMD64Architecture */
 +
++#ifdef ARM64Architecture
++# ifndef OptimizationLevel
++#  define OptimizationLevel	-O3
++# endif
++# ifndef OptimizedCDebugFlags
++#  define OptimizedCDebugFlags  OptimizationLevel
++# endif
++# define LinuxMachineDefines-D__aarch64__
++# define ServerOSDefinesXFree86ServerOSDefines -DDDXTIME -DPART_NET
++# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
++#endif /* ARM64Architecture */
++
 +#ifndef StandardDefines
 +# define StandardDefines-Dlinux LinuxMachineDefines LinuxSourceDefines
 +#endif


Bug#766482: cernlib: FTBFS on arm64

2014-10-23 Thread Edmund Grimley Evans
Source: cernlib
Version: 20061220+dfsg3-4.1

It failed to build on arm64:

http://buildd.debian.org/status/package.php?p=cernlibsuite=sid

The error was:

gcc -g OptimizationLevel -D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security
-I/«BUILDDIR»/cernlib-20061220+dfsg3/build/packlib/kuip
-I/«BUILDDIR»/cernlib-20061220+dfsg3/src/packlib/kuip
-I/«BUILDDIR»/cernlib-20061220+dfsg3/src/packlib/kuip/programs/kuipc
-I/«BUILDDIR»/cernlib-20061220+dfsg3/src/include-DFUNCPROTO=15
-DCERNLIB_LINUX -DCERNLIB_UNIX -DCERNLIB_LNX
-DCERNLIB_QMGLIBC  -DCERNLIB_VERBOSE
-DCERNLIB_DEBIAN -DDEBIAN_VERSION=\20061220+dfsg3-4.1\
-DCERNLIB_QGETCWD -DCERNLIB_GFORTRAN   -c -o kuipcc.o
/«BUILDDIR»/cernlib-20061220+dfsg3/src/packlib/kuip/programs/kuipc/kuipcc.c
gcc: error: OptimizationLevel: No such file or directory

I believe this can be fixed as follows:

In src/config/Imake.cf, in the linux section, at line 1022, add 6
lines that are identical to the preceding 7 lines for amd64 except
that you test for and undef just __aarch64__ and set ARM64Architecture.

In src/config/linux.cf, at line 386, add 11 non-empty lines that are
identical to the preceding 13 non-empty lines for AMD64 except that
AMD64 is replaced by ARM64, __x86_64__ is replaced by
__aarch64__, and the lines that mention CERNLIB_QMLXIA64 are
deleted.

Then those two changes can be turned into a patch that can be
installed at debian/patches/140-arm64.dpatch, say, if that's how the
patch numbering scheme is supposed to work.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org