[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: build failures: syntax error before '{' token



Martin Michlmayr <tbm@cyrius.com> writes:

> There is a number of packages which fail to build from source on mips
> like this:
>
> llseek.c:60: warning: return type defaults to `int'
> llseek.c: In function `_syscall5':
> llseek.c:62: error: storage class specified for parameter `my_llseek'
> llseek.c:62: error: syntax error before '{' token
> llseek.c:66: error: syntax error before "retval"
> llseek.c:80: error: storage class specified for parameter `do_compat'
> llseek.c:80: error: parameter `do_compat' is initialized
> llseek.c:82: error: syntax error before "if"
> llseek.c:40: warning: `_llseek' declared `static' but never defined
> llseek.c:60: warning: `_syscall5' defined but not used
>
> See for example
> http://buildd.debian.org/fetch.php?&pkg=sg3-utils&ver=1.05-2&arch=mips&stamp=1073903670&file=log&as=raw
> but at least the following packages are affected: tct, raidtools,
> atari-fdisk, sleuthkit
>
> Can anyone check if this is causes by a broken libc or kernel header,
> or if those packages include headers they shouldn't.
> -- 
> Martin Michlmayr
> tbm@cyrius.com

I reported a bug against that against util-linux which was in turn
cloned to linux-kernel-headers (Solution 1: fix the syscall5 makro in
LKH, Solution 2: fix util-linux not to use llseek).

>From what I know the syscall5 makro has been added to the O32 syscall
interface again in recent kernels but linux-kernel-headers has not
been rebuild to include those changes. Without the syscall5 makro gcc
things its a normal function giving the above errors.

For any package showhing this there are probably the same 2 solutions
as for util-linux:

1. wait for(ever) for LKH to get fixed.

2. Set _FILE_OFFSET_BITS=64, build your source with large file support
and then just use lseek.

The 2nd solution is preferable since that works cleanly and through
glibc. Any future changes to the kernel abi get handled by glibc.

MfG
        Goswin




Reply to: