Bug#421518: FTBFS (alpha): conflicting types for 'stat'
Package: mksh Version: 29.2-1 Severity: serious Justification: no longer builds from source mksh fails to build on Alpha: [...] cc -g -O2 -fno-strict-aliasing -fstack-protector-all -fwhole-program --combine -fwrapv -std=gnu99 -Wall -D_GNU_SOURCE -I'/tmp/mksh-29.2/builddir' -DHAVE_ATTRIBUTE=1 -DHAVE_ATTRIBUTE_BOUNDED=0 -DHAVE_ATTRIBUTE_USED=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MKDEV_H=0 -DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_SYSMACROS_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_PATHS_H=1 -DHAVE_STDBOOL_H=1 -DHAVE_STDINT_H=1 -DHAVE_GRP_H=1 -DHAVE_ULIMIT_H=1 -DHAVE_VALUES_H=1 -DHAVE_RLIM_T=1 -DHAVE_SIG_T=1 -DHAVE_MKSH_SIGNAME=0 -DHAVE_SYS_SIGNAME=0 -DHAVE__SYS_SIGNAME=0 -DHAVE_SYS_SIGLIST=1 -DHAVE_STRSIGNAL=0 -DHAVE_ARC4RANDOM=0 -DHAVE_ARC4RANDOM_PUSH=0 -DHAVE_FLOCK_EX=1 -DHAVE_SETLOCALE_CTYPE=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_REVOKE=0 -DHAVE_SETMODE=0 -DHAVE_SETRESUGID=1 -DHAVE_SETGROUPS=1 -DHAVE_STRCASESTR=1 -DHAVE_STRLCPY=0 -DHAVE_PERSISTENT_HISTORY=1 -DHAVE_MULTI_IDSTRING=1 -DHAVE_CONFIG_H -DCONFIG_H_FILENAME=\"sh.h\" -o '/tmp/mksh-29.2/builddir/mksh' alloc.c edit.c eval.c exec.c expr.c funcs.c histrap.c jobs.c lex.c main. c misc.c shf.c syn.c tree.c var.c setmode.c strlcpy.c alloc.c:1: warning: -fstack-protector not supported for this target In file included from /usr/include/fcntl.h:38, from /usr/include/sys/file.h:25, from sh.h:42, from edit.c:6: /usr/include/sys/stat.h:208: error: conflicting types for 'stat' /usr/include/sys/stat.h:435: error: previous definition of 'stat' was here [...] Full log at http://buildd.debian.org/fetch.cgi?&pkg=mksh&ver=29.2-1&arch=alpha&stamp=1177564924&file=log -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: alpha Kernel: Linux 2.6.20 Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages mksh depends on: ii libc6.1 2.5-4 GNU C Library: Shared libraries mksh recommends no packages. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#421518: FTBFS (alpha): conflicting types for 'stat'
block 421518 by 408850 thanks Falk Hueffner dixit: >/usr/include/sys/stat.h:208: error: conflicting types for 'stat' >/usr/include/sys/stat.h:435: error: previous definition of 'stat' was here >[...] > >Full log at >http://buildd.debian.org/fetch.cgi?&pkg=mksh&ver=29.2-1&arch=alpha&stamp=1177564924&file=log Yes, I know. This bug seems to only trigger on alpha, maybe because of some alignment contraints or something – I really don't have any idea… – and thus I can't find a workaround for it. (If you want to be nice to me, get an alpha and try the diff below; I don't really want to have my sponsor upload another package if it's not really working around the alpha bug.) I can only suspect the bug is triggered by use of -std=gnu99 (the restrict keyword makes the difference, which doesn't exist in c89), but not on all architectures, but, on the other hand, the bug is actually in machine in- dependent code and a bug in the libc headers. --- mksh-29.2/debian/rules.orig 2007-04-29 20:59:31.0 + +++ mksh-29.2/debian/rules 2007-04-29 20:59:35.0 + @@ -19,7 +19,7 @@ BUILD_ENV:= BUILD_ENV+=CC='${CC}' BUILD_ENV+=CFLAGS='${CFLAGS}' # possibly work around PR#408850 -#BUILD_ENV+= HAVE_CAN_STDG99=0 +BUILD_ENV+=HAVE_CAN_STDG99=0 build: build-stamp Caveat: this is just a (possible) work-around, not a fix. But if it turns out to indeed make mksh buildable on alpha again, I'll have an upgraded mksh package uploaded. bye, //mirabile -- I believe no one can invent an algorithm. One just happens to hit upon it when God enlightens him. Or only God invents algorithms, we merely copy them. If you don't believe in God, just consider God as Nature if you won't deny existence. -- Coywolf Qi Hunt