Bug#639073: ghostscript: FTBFS: ./base/time_.h:49:8: error: redefinition of 'struct timeval'

2011-09-17 Thread Jonas Smedegaard
tags 639073 + help
thanks

On 11-08-23 at 11:16pm, Philippe Le Brouster wrote:
 During a rebuild of all packages in sid, your package failed to build 
 on amd64.
 
 Relevant part:
  gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64 
  -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2  -fPIC  -O2 
  -fPIC -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations 
  -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing 
  -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H 
  -DGX_COLOR_INDEX_TYPE=unsigned long int -g -O2 -g -O2 -Wall -fPIC 
  -DUSE_LIBPAPER -DGS_DEVS_SHARED 
  -DGS_DEVS_SHARED_DIR=\/usr/lib/ghostscript/9.02\ -I./obj/../soobj 
  -I./base  -g -O2 -g -O2 -Wall -fPIC -DUSE_LIBPAPER   -o 
  ./obj/../soobj/gp_unix.o -c ./base/gp_unix.c
  In file included from ./base/gp_unix.c:17:0:
  ./base/pipe_.h:39:1: warning: function declaration isn't a prototype 
  [-Wstrict-prototypes]
  In file included from ./base/gp_unix.c:19:0:
  ./base/time_.h:49:8: error: redefinition of 'struct timeval'
  /usr/include/x86_64-linux-gnu/bits/time.h:75:8: note: originally defined 
  here
  ./base/gp_unix.c: In function 'gp_get_realtime':
  ./base/gp_unix.c:148:9: warning: implicit declaration of function 
  'gettimeofday' [-Wimplicit-function-declaration]
  make[2]: *** [obj/../soobj/gp_unix.o] Error 1

Problem is tied to multiarch: ghostscript uses autoconf, but then 
ignores the results and instead use its own too simple checks instead.

base/Makefile.in contains this:

 # defines from autoconf; note that we don't use these at present.
 ACDEFS=@DEFS@

...and base/unix-aux.mak contains this:

   if ( test -f $(INCLUDE)/sys/time.h ); then [...]


Ubuntu use as workaround to explicitly include -DHAVE_SYS_TIME_H=1 in 
CFLAGS, but I feel that is wrong: A whole range of other headers 
similarly gets wrongly treated as missing on multiarch systems, possibly 
causing problems other than FTBFS.


I imagine the proper (i.e. least intrusive) aproach is to check each use 
of $(INCLUDE) and if relocated on multiarch systems then replace with a 
multiarch path resolved at build time.

I could use some help here!


 - Jonas

-- 
 * Jonas Smedegaard - idealist  Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: Digital signature


Bug#639073: ghostscript: FTBFS: ./base/time_.h:49:8: error: redefinition of 'struct timeval'

2011-08-23 Thread Philippe Le Brouster
Source: ghostscript
Version: 9.02~dfsg-3
Severity: serious
Tags: wheezy sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20110822 qa-ftbfs
Justification: FTBFS on amd64

Hi,

During a rebuild of all packages in sid, your package failed to build on
amd64.

Relevant part:
 gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64 -DHAVE_MKSTEMP64 
 -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2  -fPIC  -O2 
 -fPIC -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations 
 -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing 
 -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H 
 -DGX_COLOR_INDEX_TYPE=unsigned long int -g -O2 -g -O2 -Wall -fPIC 
 -DUSE_LIBPAPER -DGS_DEVS_SHARED 
 -DGS_DEVS_SHARED_DIR=\/usr/lib/ghostscript/9.02\ -I./obj/../soobj -I./base  
 -g -O2 -g -O2 -Wall -fPIC -DUSE_LIBPAPER   -o ./obj/../soobj/gp_unix.o -c 
 ./base/gp_unix.c
 In file included from ./base/gp_unix.c:17:0:
 ./base/pipe_.h:39:1: warning: function declaration isn't a prototype 
 [-Wstrict-prototypes]
 In file included from ./base/gp_unix.c:19:0:
 ./base/time_.h:49:8: error: redefinition of 'struct timeval'
 /usr/include/x86_64-linux-gnu/bits/time.h:75:8: note: originally defined here
 ./base/gp_unix.c: In function 'gp_get_realtime':
 ./base/gp_unix.c:148:9: warning: implicit declaration of function 
 'gettimeofday' [-Wimplicit-function-declaration]
 make[2]: *** [obj/../soobj/gp_unix.o] Error 1

The full build log is available from:
   
http://people.debian.org/~lucas/logs/2011/08/22/ghostscript_9.02~dfsg-3_lsid64.buildlog

A list of current common problems and possible solutions is available at 
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on about 50 AMD64 nodes
of the Grid'5000 platform, using a clean chroot.  Internet was not
accessible from the build systems.


signature.asc
Description: Digital signature