Bug#663902: ghostscript: FTBFS on hurd-i386: extra gs_realloc in symbols file

2012-03-14 Thread Jonathan Nieder
Jonathan Nieder wrote:
> Pino Toscano wrote:

>> [Date: Thu, 10 Sep 2009 19:59:44 +0200]
>
> Please reset your clock.

Oh, my bad.  Looks like this was just a stuck mail and this
was fixed in 8.71~dfsg-1.

Sorry for the noise,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-printing-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120314220417.GD31686@burratino



Bug#663902: ghostscript: FTBFS on hurd-i386: extra gs_realloc in symbols file

2012-03-14 Thread Jonathan Nieder
Hi,

Pino Toscano wrote:

> [Date: Thu, 10 Sep 2009 19:59:44 +0200]

Please reset your clock. :)

[...]
> 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

It seems unlikely that ghostscript's assumptions about glibc on Linux
would fail while they would succeed on Hurd, so I would prefer a fix
that just gets rid of the "#ifdef linux" block.

Based on the vcs history, the gs_realloc hack is from 1998 or earlier,
so it might be from "Linux libc" days.

What do you think?

Thanks,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-printing-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120314220150.GC31686@burratino



Bug#663902: ghostscript: FTBFS on hurd-i386: extra gs_realloc in symbols file

2012-03-14 Thread Pino Toscano
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