Error compiling Zlib 1.1.4

Florian FERNANDEZ Florian.Fernandez2 at wanadoo.fr
Tue Oct 15 12:14:42 PDT 2002


When I compile Zlib I get these errors:

gcc -fPIC -O3   -c -o example.o example.c
In file included from example.c:8:
/usr/include/stdio.h:34:21: stddef.h: No such file or directory
In file included from /usr/include/stdio.h:36,
                 from example.c:8:
/usr/include/bits/types.h:29:20: stddef.h: No such file or directory
In file included from /usr/include/bits/types.h:143,
                 from /usr/include/stdio.h:36,
                 from example.c:8:
/usr/include/bits/pthreadtypes.h:48: error: parse error before "size_t"
/usr/include/bits/pthreadtypes.h:51: error: parse error before "__stacksize"
In file included from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/_G_config.h:14:20: stddef.h: No such file or directory
In file included from /usr/include/_G_config.h:24,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/wchar.h:48:20: stddef.h: No such file or directory
In file included from /usr/include/gconv.h:28,
                 from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/wchar.h:48:20: stddef.h: No such file or directory
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/gconv.h:31:20: stddef.h: No such file or directory
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/gconv.h:72: error: parse error before "size_t"
/usr/include/gconv.h:85: error: parse error before "size_t"
/usr/include/gconv.h:94: error: parse error before "size_t"
/usr/include/gconv.h:170: error: parse error before "size_t"
/usr/include/gconv.h:173: error: parse error before '}' token
In file included from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/_G_config.h:47: error: field `__cd' has incomplete type
/usr/include/_G_config.h:50: error: field `__cd' has incomplete type
In file included from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/libio.h:53:21: stdarg.h: No such file or directory
In file included from /usr/include/stdio.h:72,
                 from example.c:8:
/usr/include/libio.h:350: error: parse error before "size_t"
/usr/include/libio.h:359: error: parse error before "size_t"
/usr/include/libio.h:463: error: parse error before "__gnuc_va_list"
/usr/include/libio.h:465: error: parse error before "__gnuc_va_list"
/usr/include/libio.h:467: error: parse error before "_IO_sgetn"
/usr/include/libio.h:467: error: parse error before "size_t"
In file included from example.c:8:
/usr/include/stdio.h:279: error: parse error before "size_t"
/usr/include/stdio.h:286: error: parse error before "size_t"
/usr/include/stdio.h:305: error: parse error before "__gnuc_va_list"
/usr/include/stdio.h:307: error: parse error before "__gnuc_va_list"
/usr/include/stdio.h:311: error: parse error before "__gnuc_va_list"
/usr/include/stdio.h:317: error: parse error before "size_t"
/usr/include/stdio.h:321: error: parse error before "size_t"
/usr/include/stdio.h:489: error: parse error before "fread"
/usr/include/stdio.h:489: error: parse error before "size_t"
/usr/include/stdio.h:492: error: parse error before "fwrite"
/usr/include/stdio.h:492: error: parse error before "size_t"
/usr/include/stdio.h:504: error: parse error before "fread_unlocked"
/usr/include/stdio.h:504: error: parse error before "size_t"
/usr/include/stdio.h:506: error: parse error before "fwrite_unlocked"
/usr/include/stdio.h:506: error: parse error before "size_t"
In file included from /usr/include/stdio.h:674,
                 from example.c:8:
/usr/include/bits/stdio.h:34: error: parse error before "__gnuc_va_list"
/usr/include/bits/stdio.h: In function `vprintf':
/usr/include/bits/stdio.h:36: error: `__fmt' undeclared (first use in this function)
/usr/include/bits/stdio.h:36: error: (Each undeclared identifier is reported only once
/usr/include/bits/stdio.h:36: error: for each function it appears in.)
/usr/include/bits/stdio.h:36: error: `__arg' undeclared (first use in this function)
In file included from example.c:12:
/usr/include/string.h:33:20: stddef.h: No such file or directory
In file included from example.c:12:
/usr/include/string.h: At top level:
/usr/include/string.h:39: error: parse error before "size_t"
/usr/include/string.h:42: error: parse error before "size_t"
/usr/include/string.h:51: error: parse error before "size_t"
/usr/include/string.h:58: error: parse error before "size_t"
/usr/include/string.h:61: error: parse error before "size_t"
/usr/include/string.h:65: error: parse error before "size_t"
/usr/include/string.h:86: error: parse error before "size_t"
/usr/include/string.h:93: error: parse error before "size_t"
/usr/include/string.h:99: error: parse error before "size_t"
/usr/include/string.h:106: error: parse error before "strxfrm"
/usr/include/string.h:107: error: parse error before "size_t"
/usr/include/string.h:176: error: parse error before "strcspn"
/usr/include/string.h:180: error: parse error before "strspn"
/usr/include/string.h:230: error: parse error before "strlen"
/usr/include/string.h:248: error: parse error before "size_t"
/usr/include/string.h:253: error: parse error before "size_t"
/usr/include/string.h:257: error: parse error before "size_t"
/usr/include/string.h:260: error: parse error before "size_t"
/usr/include/string.h:263: error: parse error before "size_t"
/usr/include/string.h:291: error: parse error before "size_t"
In file included from /usr/include/string.h:375,
                 from example.c:12:
/usr/include/bits/string2.h:919: error: parse error before "__strcspn_c1"
/usr/include/bits/string2.h:921: error: parse error before "__strcspn_c1"
/usr/include/bits/string2.h: In function `__strcspn_c1':
/usr/include/bits/string2.h:923: error: syntax error before "__result"
/usr/include/bits/string2.h:924: error: `__result' undeclared (first use in this function)
/usr/include/bits/string2.h: At top level:
/usr/include/bits/string2.h:929: error: parse error before "__strcspn_c2"
/usr/include/bits/string2.h:932: error: parse error before "__strcspn_c2"
/usr/include/bits/string2.h: In function `__strcspn_c2':
/usr/include/bits/string2.h:934: error: syntax error before "__result"
/usr/include/bits/string2.h:935: error: `__result' undeclared (first use in this function)
/usr/include/bits/string2.h: At top level:
/usr/include/bits/string2.h:941: error: parse error before "__strcspn_c3"
/usr/include/bits/string2.h:944: error: parse error before "__strcspn_c3"
/usr/include/bits/string2.h: In function `__strcspn_c3':
/usr/include/bits/string2.h:947: error: syntax error before "__result"
/usr/include/bits/string2.h:948: error: `__result' undeclared (first use in this function)
/usr/include/bits/string2.h: At top level:
/usr/include/bits/string2.h:976: error: parse error before "__strspn_c1"
/usr/include/bits/string2.h:978: error: parse error before "__strspn_c1"
/usr/include/bits/string2.h: In function `__strspn_c1':
/usr/include/bits/string2.h:980: error: syntax error before "__result"
/usr/include/bits/string2.h:982: error: `__result' undeclared (first use in this function)
/usr/include/bits/string2.h: At top level:
/usr/include/bits/string2.h:987: error: parse error before "__strspn_c2"
/usr/include/bits/string2.h:990: error: parse error before "__strspn_c2"
/usr/include/bits/string2.h: In function `__strspn_c2':
/usr/include/bits/string2.h:992: error: syntax error before "__result"
/usr/include/bits/string2.h:994: error: `__result' undeclared (first use in this function)
/usr/include/bits/string2.h: At top level:
/usr/include/bits/string2.h:999: error: parse error before "__strspn_c3"
/usr/include/bits/string2.h:1002: error: parse error before "__strspn_c3"
/usr/include/bits/string2.h: In function `__strspn_c3':
/usr/include/bits/string2.h:1004: error: syntax error before "__result"
/usr/include/bits/string2.h:1006: error: `__result' undeclared (first use in this function)
/usr/include/bits/string2.h: In function `__strpbrk_c2':
/usr/include/bits/string2.h:1041: error: `size_t' undeclared (first use in this function)
/usr/include/bits/string2.h:1041: error: parse error before "__s"
/usr/include/bits/string2.h: In function `__strpbrk_c3':
/usr/include/bits/string2.h:1054: error: `size_t' undeclared (first use in this function)
/usr/include/bits/string2.h:1054: error: parse error before "__s"
In file included from /usr/include/bits/string2.h:1211,
                 from /usr/include/string.h:375,
                 from example.c:12:
/usr/include/stdlib.h:33:20: stddef.h: No such file or directory
In file included from /usr/include/bits/string2.h:1211,
                 from /usr/include/string.h:375,
                 from example.c:12:
/usr/include/stdlib.h: At top level:
/usr/include/stdlib.h:554: error: parse error before "__size"
/usr/include/stdlib.h:556: error: parse error before "__nmemb"
In file included from /usr/include/string.h:375,
                 from example.c:12:
/usr/include/bits/string2.h:1235: error: parse error before "size_t"
In file included from example.c:13:
/usr/include/stdlib.h:33:20: stddef.h: No such file or directory
In file included from example.c:13:
/usr/include/stdlib.h:137: error: parse error before "__ctype_get_mb_cur_max"
In file included from /usr/include/stdlib.h:414,
                 from example.c:13:
/usr/include/sys/types.h:146:20: stddef.h: No such file or directory
In file included from example.c:13:
/usr/include/stdlib.h:431: error: parse error before "size_t"
/usr/include/stdlib.h:460: error: parse error before "size_t"
/usr/include/stdlib.h:565: error: parse error before "size_t"
In file included from /usr/include/stdlib.h:576,
                 from example.c:13:
/usr/include/alloca.h:25:20: stddef.h: No such file or directory
In file included from /usr/include/stdlib.h:576,
                 from example.c:13:
/usr/include/alloca.h:33: error: parse error before "__size"
In file included from example.c:13:
/usr/include/stdlib.h:581: error: parse error before "__size"
/usr/include/stdlib.h:731: error: parse error before "size_t"
/usr/include/stdlib.h:735: error: parse error before "size_t"
/usr/include/stdlib.h:804: error: parse error before "size_t"
/usr/include/stdlib.h:807: error: parse error before "size_t"
/usr/include/stdlib.h:811: error: parse error before "size_t"
/usr/include/stdlib.h:814: error: parse error before "size_t"
/usr/include/stdlib.h:822: error: parse error before "size_t"
/usr/include/stdlib.h:825: error: parse error before '*' token
/usr/include/stdlib.h:829: error: parse error before "wchar_t"
/usr/include/stdlib.h:833: error: parse error before "mbstowcs"
/usr/include/stdlib.h:833: error: parse error before '*' token
/usr/include/stdlib.h:836: error: parse error before "wcstombs"
/usr/include/stdlib.h:837: error: parse error before '*' token
example.c: In function `test_compress':
example.c:76: error: `size_t' undeclared (first use in this function)
example.c:76: error: parse error before "__s1_len"
example.c:76: error: `__s1_len' undeclared (first use in this function)
example.c:76: error: `__s2_len' undeclared (first use in this function)
example.c:76: error: parse error before "const"
example.c:76: error: parse error before "const"
example.c:76: error: parse error before "const"
example.c:76: error: parse error before "const"
example.c:76: error: parse error before ')' token
example.c:76: error: `__result' undeclared (first use in this function)
example.c:76: error: parse error before ':' token
example.c:76: error: `__s2' undeclared (first use in this function)
example.c: At top level:
example.c:76: error: parse error before ')' token
example.c:76: error: `__result' used prior to declaration
example.c:76: warning: data definition has no type or storage class
example.c:76: error: parse error before '}' token
example.c:76: error: conflicting declarations of `__result'
example.c:76: error: `__result' previously declared here
example.c:76: error: `__s1' undeclared here (not in a function)
example.c:76: error: parse error before "if"
example.c:76: error: conflicting declarations of `__result'
example.c:76: error: `__result' previously defined here
example.c:76: warning: data definition has no type or storage class
example.c:76: error: parse error before '}' token
example.c:78: error: parse error before numeric constant
example.c:78: error: conflicting types for `exit'
/usr/include/stdlib.h:610: error: previous declaration of `exit'
example.c:78: warning: data definition has no type or storage class
example.c: In function `test_gzio':
example.c:126: error: `size_t' undeclared (first use in this function)
example.c:126: error: parse error before "__s1_len"
example.c:126: error: `__s1_len' undeclared (first use in this function)
example.c:126: error: `__s2_len' undeclared (first use in this function)
example.c:126: error: parse error before "const"
example.c:126: error: parse error before "const"
example.c:126: error: parse error before "const"
example.c:126: error: parse error before "const"
example.c:126: error: parse error before ')' token
example.c:126: error: parse error before ':' token
example.c:126: error: `__s2' undeclared (first use in this function)
example.c: At top level:
example.c:126: error: parse error before ')' token
example.c:126: warning: data definition has no type or storage class
example.c:126: error: parse error before '}' token
example.c:126: error: conflicting declarations of `__result'
example.c:126: error: `__result' previously declared here
example.c:126: error: `__s1' undeclared here (not in a function)
example.c:126: error: parse error before "if"
example.c:126: error: conflicting declarations of `__result'
example.c:126: error: `__result' previously defined here
example.c:126: warning: data definition has no type or storage class
example.c:126: error: parse error before '}' token
example.c:128: error: parse error before numeric constant
example.c:128: warning: data definition has no type or storage class
example.c:133: error: `file' undeclared here (not in a function)
example.c:133: error: initializer element is not constant
example.c:133: warning: data definition has no type or storage class
example.c:134: error: parse error before "if"
example.c:137: error: parse error before numeric constant
example.c:137: warning: data definition has no type or storage class
example.c:142: error: parse error before numeric constant
example.c:142: warning: data definition has no type or storage class
example.c:145: error: parse error before '(' token
example.c:145: error: parse error before ')' token
example.c:146: error: initializer element is not constant
example.c:146: warning: data definition has no type or storage class
example.c:147: error: parse error before "if"
example.c:149: error: parse error before numeric constant
example.c:149: warning: data definition has no type or storage class
example.c:151: error: parse error before '(' token
example.c:151: warning: data definition has no type or storage class
example.c:151: error: parse error before '}' token
example.c:151: error: conflicting declarations of `__result'
example.c:151: error: `__result' previously declared here
example.c:151: error: `__s2' undeclared here (not in a function)
example.c:151: error: parse error before "if"
example.c:151: error: conflicting declarations of `__result'
example.c:151: error: `__result' previously defined here
example.c:151: warning: data definition has no type or storage class
example.c:151: error: parse error before '}' token
example.c:151: warning: data definition has no type or storage class
example.c:151: error: parse error before '}' token
example.c:151: error: conflicting declarations of `__result'
example.c:151: error: `__result' previously declared here
example.c:151: error: `__s1' undeclared here (not in a function)
example.c:151: error: parse error before "if"
example.c:151: error: conflicting declarations of `__result'
example.c:151: error: `__result' previously defined here
example.c:151: warning: data definition has no type or storage class
example.c:151: error: parse error before '}' token
example.c:153: error: parse error before numeric constant
example.c:153: warning: data definition has no type or storage class
example.c:158: warning: parameter names (without types) in function declaration
example.c:158: warning: data definition has no type or storage class
example.c:159: error: parse error before '}' token
example.c: In function `test_inflate':
example.c:232: error: `size_t' undeclared (first use in this function)
example.c:232: error: parse error before "__s1_len"
example.c:232: error: `__s1_len' undeclared (first use in this function)
example.c:232: error: `__s2_len' undeclared (first use in this function)
example.c:232: error: parse error before "const"
example.c:232: error: parse error before "const"
example.c:232: error: parse error before "const"
example.c:232: error: parse error before "const"
example.c:232: error: parse error before ')' token
example.c:232: error: parse error before ':' token
example.c:232: error: `__s2' undeclared (first use in this function)
example.c: At top level:
example.c:232: error: parse error before ')' token
example.c:232: warning: data definition has no type or storage class
example.c:232: error: parse error before '}' token
example.c:232: error: conflicting declarations of `__result'
example.c:232: error: `__result' previously declared here
example.c:232: error: `__s1' undeclared here (not in a function)
example.c:232: error: parse error before "if"
example.c:232: error: conflicting declarations of `__result'
example.c:232: error: `__result' previously defined here
example.c:232: warning: data definition has no type or storage class
example.c:232: error: parse error before '}' token
example.c:234: error: parse error before numeric constant
example.c:234: warning: data definition has no type or storage class
example.c: In function `test_dict_inflate':
example.c:497: error: `size_t' undeclared (first use in this function)
example.c:497: error: parse error before "__s1_len"
example.c:497: error: `__s1_len' undeclared (first use in this function)
example.c:497: error: `__s2_len' undeclared (first use in this function)
example.c:497: error: parse error before "const"
example.c:497: error: parse error before "const"
example.c:497: error: parse error before "const"
example.c:497: error: parse error before "const"
example.c:497: error: parse error before ')' token
example.c:497: error: parse error before ':' token
example.c:497: error: `__s2' undeclared (first use in this function)
example.c: At top level:
example.c:497: error: parse error before ')' token
example.c:497: warning: data definition has no type or storage class
example.c:497: error: parse error before '}' token
example.c:497: error: conflicting declarations of `__result'
example.c:497: error: `__result' previously declared here
example.c:497: error: `__s1' undeclared here (not in a function)
example.c:497: error: parse error before "if"
example.c:497: error: conflicting declarations of `__result'
example.c:497: error: `__result' previously defined here
example.c:497: warning: data definition has no type or storage class
example.c:497: error: parse error before '}' token
example.c:499: error: parse error before numeric constant
example.c:499: warning: data definition has no type or storage class
example.c: In function `main':
example.c:522: error: `size_t' undeclared (first use in this function)
example.c:522: error: parse error before "__s1_len"
example.c:522: error: `__s1_len' undeclared (first use in this function)
example.c:522: error: `__s2_len' undeclared (first use in this function)
example.c:522: error: parse error before "const"
example.c:522: error: parse error before "const"
example.c:522: error: parse error before "const"
example.c:522: error: parse error before "const"
example.c:522: error: parse error before ')' token
example.c:522: error: parse error before ':' token
example.c:522: error: `__s2' undeclared (first use in this function)
example.c: At top level:
example.c:522: error: parse error before ')' token
example.c:522: warning: data definition has no type or storage class
example.c:522: error: parse error before '}' token
example.c:522: error: conflicting declarations of `__result'
example.c:522: error: `__result' previously declared here
example.c:522: error: `__s1' undeclared here (not in a function)
example.c:522: error: parse error before "if"
example.c:522: error: conflicting declarations of `__result'
example.c:522: error: `__result' previously defined here
example.c:522: warning: data definition has no type or storage class
example.c:522: error: parse error before '}' token
example.c:526: error: `comprLen' undeclared here (not in a function)
example.c:526: warning: initialization makes integer from pointer without a cast
example.c:526: error: initializer element is not constant
example.c:526: warning: data definition has no type or storage class
example.c:527: warning: initialization makes integer from pointer without a cast
example.c:527: error: initializer element is not constant
example.c:527: warning: data definition has no type or storage class
example.c:531: error: parse error before "if"
example.c:533: error: parse error before numeric constant
example.c:533: warning: data definition has no type or storage class
example.c:535: warning: parameter names (without types) in function declaration
example.c:535: error: conflicting types for `test_compress'
example.c:64: error: previous declaration of `test_compress'
example.c:535: warning: data definition has no type or storage class
example.c:537: error: parse error before '(' token
example.c:537: error: conflicting types for `test_gzio'
example.c:92: error: previous declaration of `test_gzio'
example.c:538: error: parse error before '>' token
example.c:541: warning: parameter names (without types) in function declaration
example.c:541: error: conflicting types for `test_deflate'
example.c:167: error: previous declaration of `test_deflate'
example.c:541: warning: data definition has no type or storage class
example.c:542: warning: parameter names (without types) in function declaration
example.c:542: error: conflicting types for `test_inflate'
example.c:205: error: previous declaration of `test_inflate'
example.c:542: warning: data definition has no type or storage class
example.c:544: warning: parameter names (without types) in function declaration
example.c:544: error: conflicting types for `test_large_deflate'
example.c:246: error: previous declaration of `test_large_deflate'
example.c:544: warning: data definition has no type or storage class
example.c:545: warning: parameter names (without types) in function declaration
example.c:545: error: conflicting types for `test_large_inflate'
example.c:301: error: previous declaration of `test_large_inflate'
example.c:545: warning: data definition has no type or storage class
example.c:547: error: parse error before '&' token
example.c:547: error: conflicting types for `test_flush'
example.c:342: error: previous declaration of `test_flush'
example.c:547: warning: data definition has no type or storage class
example.c:548: warning: parameter names (without types) in function declaration
example.c:548: error: conflicting types for `test_sync'
example.c:380: error: previous declaration of `test_sync'
example.c:548: warning: data definition has no type or storage class
example.c:549: error: initializer element is not constant
example.c:549: warning: data definition has no type or storage class
example.c:551: warning: parameter names (without types) in function declaration
example.c:551: error: conflicting types for `test_dict_deflate'
example.c:424: error: previous declaration of `test_dict_deflate'
example.c:551: warning: data definition has no type or storage class
example.c:552: warning: parameter names (without types) in function declaration
example.c:552: error: conflicting types for `test_dict_inflate'
example.c:461: error: previous declaration of `test_dict_inflate'
example.c:552: warning: data definition has no type or storage class
example.c:554: error: parse error before numeric constant
example.c:554: warning: data definition has no type or storage class
/usr/include/gconv.h:172: warning: array `__data' assumed to have one element
example.c:76: error: register name not specified for `__result'
example.c:126: error: register name not specified for `__result'
example.c:151: error: register name not specified for `__result'
example.c:151: error: register name not specified for `__result'
example.c:232: error: register name not specified for `__result'
example.c:497: error: register name not specified for `__result'
example.c:522: error: register name not specified for `__result'
make: *** [example.o] Error 1


I think it's simply gcc can't find includes files. If it's right I don't no why because I compile gcc as describe in LFS 4.0.

Anyone got an idea ?

Regards.

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list