Package: src:ghostscript
Version: 8.70~dfsg-2
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
Hi,
as shown on [1], ghostscript fails to build on GNU/Hurd, because of a symbol
specified in the symbols file which is not compiled on GNU/Hurd.
The reason is basically the implementation of the gs_realloc() function: in
base/malloc_.h there is:
[...]
/* (At least some versions of) Linux don't have a working realloc */
#ifdef linux
# define malloc__need_realloc
void *gs_realloc(void *, size_t, size_t);
#else
# define gs_realloc(ptr, old_size, new_size) realloc(ptr, new_size)
#endif
[...]
which means gs_realloc() is a proper function only on Linux.
The proposed solution is to slightly change the symbol files, introducing a new
file with common Linux-only symbols, including it on Linux-only archs.
Tested, appears working on GNU/Hurd (obviously), and on current Squeeze.
[1]
http://buildd.debian-ports.org/fetch.php?pkg=ghostscript&arch=hurd-i386&ver=8.70~dfsg-2&stamp=1251071245&file=log&as=raw
--
Pino Toscano
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.alpha
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.alpha 2009-09-10 15:30:50.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.alpha 2009-09-10 15:31:18.0 +0200
@@ -1,2 +1,3 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_le"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.amd64
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.amd64 2009-09-10 15:30:50.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.amd64 2009-09-10 15:31:21.0 +0200
@@ -1,2 +1,3 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_le"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.arm
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.arm 2009-09-10 15:30:50.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.arm 2009-09-10 15:31:30.0 +0200
@@ -1,3 +1,4 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_32bit"
#include "symbols.common_le"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.armel
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.armel 2009-09-10 15:30:51.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.armel 2009-09-10 15:31:34.0 +0200
@@ -1,3 +1,4 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_32bit"
#include "symbols.common_le"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.hppa
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.hppa 2009-09-10 15:30:51.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.hppa 2009-09-10 15:31:38.0 +0200
@@ -1,2 +1,3 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_32bit"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.i386
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.i386 2009-09-10 15:30:52.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.i386 2009-09-10 15:31:45.0 +0200
@@ -1,3 +1,4 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_32bit"
#include "symbols.common_le"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.ia64
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.ia64 2009-09-10 15:30:53.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.ia64 2009-09-10 15:31:48.0 +0200
@@ -1,2 +1,3 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_le"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.m68k
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.m68k 2009-09-10 15:30:53.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.m68k 2009-09-10 15:31:50.0 +0200
@@ -1,2 +1,3 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_32bit"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.mips
===
--- ghostscript-8.70~dfsg.orig/debian/libgs8.symbols.mips 2009-09-10 15:30:53.0 +0200
+++ ghostscript-8.70~dfsg/debian/libgs8.symbols.mips 2009-09-10 15:31:52.0 +0200
@@ -1,2 +1,3 @@
#include "symbols.common"
+#include "symbols.common_linux"
#include "symbols.common_32bit"
Index: ghostscript-8.70~dfsg/debian/libgs8.symbols.mipsel