Skip to contentSkip to conversation

libaal compile fails

DISCUSSION Yury Umanets 2 participants 5 messages Oct 29, 2003 – Nov 10, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines
Quoted 11 lines

When I try building libaal it fails with the following error message:

make[2]: Entering directory `/raid/disc0/usr/src/linux-2.6.0-test9/libaal-0.4.13/src'
source='file.c' object='libaal_la-file.lo' libtool=yes \
depfile='.deps/libaal_la-file.Plo' tmpdepfile='.deps/libaal_la-file.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -D_REENTRANT -D_FILE_OFFSET_BITS=64 -O0 -g -W -Wall >>-Wno-unused-parameter -Wredundant-decls -Werror -c -o libaal_la-file.lo test -f file.c || echo './'file.c
rm -f .libs/libaal_la-file.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -D_REENTRANT -D_FILE_OFFSET_BITS=64 -O0 -g -W -Wall -Wno-unused-parameter >>-Wredundant-decls -Werror -c file.c -MT libaal_la-file.lo -MD -MP -MF .deps/libaal_la-file.TPlo -fPIC -DPIC -o .libs/libaal_la-file.lo file.c: In function `file_len':
file.c:213: parse error before '[' token

Quoted 8 lines
Quoted 8 lines

cc1: warnings being treated as errors
file.c:213: warning: signed and unsigned type in conditional expression make[2]: *** [libaal_la-file.lo] Error 1
make[2]: Leaving directory `/raid/disc0/usr/src/linux-2.6.0-test9/libaal-0.4.13/src' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/raid/disc0/usr/src/linux-2.6.0-test9/libaal-0.4.13'
make: *** [all] Error 2
titanium /usr/src/linux/libaal-0.4.13#

Hello,

This is pretty strange. Line 213 does not contain any "[" tokens and suspicious macros. Have you got correct sources? Can you send me line 213 with context?

Also use please configure with option --disable-Werror specified.

Signature · 1 line
umka
#1 lore raw
Quoted 27 lines · Yury Umanets
Quoted 3 lines
Quoted 3 lines

When I try building libaal it fails with the following error message:

make[2]: Entering directory

`/raid/disc0/usr/src/linux-2.6.0-test9/libaal-0.4.13/src'

Quoted 2 lines
Quoted 2 lines

source='file.c' object='libaal_la-file.lo' libtool=yes \
depfile='.deps/libaal_la-file.Plo'

tmpdepfile='.deps/libaal_la-file.TPlo' \

Quoted 2 lines
Quoted 2 lines

depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..

-I../include -D_REENTRANT -D_FILE_OFFSET_BITS=64 -O0 -g -W -Wall

Quoted 1 line
Quoted 1 line

-Wno-unused-parameter -Wredundant-decls -Werror -c -o

libaal_la-file.lo test -f file.c || echo './'file.c

Quoted 2 lines
Quoted 2 lines

rm -f .libs/libaal_la-file.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -D_REENTRANT

-D_FILE_OFFSET_BITS=64 -O0 -g -W -Wall -Wno-unused-parameter

Quoted 1 line
Quoted 1 line

-Wredundant-decls -Werror -c file.c -MT libaal_la-file.lo -MD -MP

-MF .deps/libaal_la-file.TPlo -fPIC -DPIC -o .libs/libaal_la-file.lo

Quoted 6 lines
Quoted 6 lines

file.c: In function `file_len':
file.c:213: parse error before '[' token
cc1: warnings being treated as errors
file.c:213: warning: signed and unsigned type in conditional expression make[2]: *** [libaal_la-file.lo] Error 1
make[2]: Leaving directory

`/raid/disc0/usr/src/linux-2.6.0-test9/libaal-0.4.13/src'

Quoted 2 lines
Quoted 2 lines

make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory

`/raid/disc0/usr/src/linux-2.6.0-test9/libaal-0.4.13'

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

make: *** [all] Error 2
titanium /usr/src/linux/libaal-0.4.13#

Hello,

This is pretty strange. Line 213 does not contain any "[" tokens and suspicious macros. Have you got correct sources? Can you send me line 213 with context?

Also use please configure with option --disable-Werror specified.

Forgot to ask. Do you use recent snapshot of libaal?

Signature · 1 line
umka
#2 lore raw
Quoted 6 lines · Yury Umanets
Quoted 2 lines · Yury Umanets
Quoted 1 line
Quoted 1 line

When I try building libaal it fails with the following error message:

Forgot to ask. Do you use recent snapshot of libaal?

FWIW, I get the exact same problem as Saevaldur. Using libaal-0.4.13.tar.gz, and attempting to compile on a Debian Sid x86 machine. I can only imagine it's a gcc parsing bug (line 213 indeed does not have a square bracket). GCC is 3.3.2. Commenting out the check performed by that line results in a sucesful compilation.

-Tupshin

#3 lore raw
Quoted 4 lines · Tupshin Harper
Quoted 2 lines · Yury Umanets

Yury Umanets wrote:

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line

When I try building libaal it fails with the following error message:

Forgot to ask. Do you use recent snapshot of libaal?

FWIW, I get the exact same problem as Saevaldur. Using libaal-0.4.13.tar.gz, and attempting to compile on a Debian Sid x86 machine. I can only imagine it's a gcc parsing bug (line 213 indeed does not have a square bracket). GCC is 3.3.2. Commenting out the check performed by that line results in a sucesful compilation.

-Tupshin

A bit more info.

It is not a problem with the gcc version, as the same message comes from 3.2 and 2.95.

I'm guessing that it emerges from macros expanded through multiple layers of expansion. BLKGETSIZE64 expands to _
IOR(0x12, 114, sizeof(uint64_t))

_IOR expands to _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))

and _IOC_TYPECHECK expands to
((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1 << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC)

which is the first hint of a bracket on that line. That's as far as I'm going ;-).

-Tupshin

#4 lore raw
Quoted 31 lines · Tupshin Harper
Quoted 8 lines · Tupshin Harper
Quoted 6 lines · Yury Umanets
Quoted 2 lines · Yury Umanets
Quoted 1 line
Quoted 1 line

When I try building libaal it fails with the following error message:

Forgot to ask. Do you use recent snapshot of libaal?

Quoted 8 lines

FWIW, I get the exact same problem as Saevaldur. Using libaal-0.4.13.tar.gz, and attempting to compile on a Debian Sid x86 machine. I can only imagine it's a gcc parsing bug (line 213 indeed does not have a square bracket). GCC is 3.3.2. Commenting out the check performed by that line results in a sucesful compilation.

-Tupshin

A bit more info.

It is not a problem with the gcc version, as the same message comes from 3.2 and 2.95.

I'm guessing that it emerges from macros expanded through multiple layers of expansion.
BLKGETSIZE64 expands to _
IOR(0x12, 114, sizeof(uint64_t))

_IOR expands to _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))

Quoted 8 lines

and _IOC_TYPECHECK expands to
((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1 << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC)

which is the first hint of a bracket on that line. That's as far as I'm going ;-).

-Tupshin

Hello,

First of all thanks for shutting a bug. There is really one error in the macro you have pointed to.

Old variant is:

#if defined(__linux__) && defined(_IOR) && !defined(BLKGETSIZE64)
# define BLKGETSIZE64 _IOR(0x12, 114, sizeof(uint64_t))
#endif

New variant (right one) is:

#if defined(__linux__) && defined(_IOR) && !defined(BLKGETSIZE64)
# define BLKGETSIZE64 _IOR(0x12, 114, uint64_t)
#endif

But I don't think, that problem is related to it. Also, we have not such a error on gcc 3.3.1 and older. Can you try to build libaal with this fix and see what happens?

Thanks.

Signature · 1 line
umka