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

Re: kfreebsd-10 FTBFS with clang



Robert Millan <rmh@debian.org> writes:

> Christoph Egger:
>> Christoph Egger <christoph@debian.org> writes:
>>> Robert Millan <rmh@debian.org> writes:
>>>>> clang (3.2-10) fails to build my kfreebsd-10 while gcc-4.6 builds it
>>>>> just fine. Is this a known problem somewhere?
>>>>
>>>> Found. See #721880.
>>>>
>>>> If you need a workaround, you can add -D__FreeBSD_kernel__ to CFLAGS in
>>>> debian/patches/003_glibc_dev_aicasm.diff
>>>
>>> Seems to not be enough. I'll wait and try with the fixed clang in the
>>> evening.
>> 
>> Seems to fail the same way after that patch as it fails with gcc-4.6 so
>> I guess it's just HEAD being broken
>
> Now that I see, it's clang-3.3 that I fixed. Not clang-3.2.
>
> I tried these combinations before writing my mail:
>
> - Patched clang-3.3
> - Unpatched clang-3.3 with workaround
>
> and they both worked. Please can you check? (fixed clang-3.3 has been
> uploaded)

I have now fixed clang-3.3 -9 trying to build svn 255267

Still failing:

clang -O2 -pipe  -D_GNU_SOURCE -isystem /usr/include/freebsd -D__FreeBSD_kernel__ -I../../../dev/aic7xxx/aicasm -std=gnu99 -Qunused-arguments -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-pa
rameter -Wcast-align -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c ../../../dev/aic7xxx/aicasm/aicasm.c
In file included from ../../../dev/aic7xxx/aicasm/aicasm.c:63:
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:149:2: error: type name requires a specifier or qualifier
        TAILQ_ENTRY(critical_section) links;
        ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:149:14: error: a parameter list without types is only allowed in a function definition
        TAILQ_ENTRY(critical_section) links;
                    ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:149:31: error: expected ';' at end of declaration list
        TAILQ_ENTRY(critical_section) links;
                                     ^
                                     ;
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:168:2: error: type name requires a specifier or qualifier
        TAILQ_ENTRY(scope) scope_links;
        ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:168:14: error: a parameter list without types is only allowed in a function definition
        TAILQ_ENTRY(scope) scope_links;
                    ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:168:20: error: expected ';' at end of declaration list
        TAILQ_ENTRY(scope) scope_links;
                          ^
                          ;
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:169:2: error: type name requires a specifier or qualifier
        TAILQ_HEAD(, scope) inner_scope;
        ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:169:13: error: expected parameter declarator
        TAILQ_HEAD(, scope) inner_scope;
                   ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:169:15: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
        TAILQ_HEAD(, scope) inner_scope;
                     ^~~~~
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:169:21: error: expected ';' at end of declaration list
        TAILQ_HEAD(, scope) inner_scope;
                           ^
                           ;
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:178:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
TAILQ_HEAD(cs_tailq, critical_section);
^~~~~~~~~~
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:178:12: error: a parameter list without types is only allowed in a function definition
TAILQ_HEAD(cs_tailq, critical_section);
           ^
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:180:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
TAILQ_HEAD(scope_tailq, scope);
^~~~~~~~~~
../../../dev/aic7xxx/aicasm/aicasm_symbol.h:180:12: error: a parameter list without types is only allowed in a function definition
TAILQ_HEAD(scope_tailq, scope);
           ^
../../../dev/aic7xxx/aicasm/aicasm.c:124:2: warning: implicit declaration of function 'STAILQ_INIT' is invalid in C99 [-Wimplicit-function-declaration]
        STAILQ_INIT(&patches);
        ^
../../../dev/aic7xxx/aicasm/aicasm.c:125:2: warning: implicit declaration of function 'SLIST_INIT' is invalid in C99 [-Wimplicit-function-declaration]
        SLIST_INIT(&search_path);
        ^
../../../dev/aic7xxx/aicasm/aicasm.c:127:2: warning: implicit declaration of function 'TAILQ_INIT' is invalid in C99 [-Wimplicit-function-declaration]
        TAILQ_INIT(&cs_tailq);
        ^
../../../dev/aic7xxx/aicasm/aicasm.c:240:5: warning: implicit declaration of function 'SLIST_INSERT_HEAD' is invalid in C99 [-Wimplicit-function-declaration]
                                SLIST_INSERT_HEAD(&search_path, include_dir,
                                ^
../../../dev/aic7xxx/aicasm/aicasm.c:241:9: error: use of undeclared identifier 'links'; did you mean 'link'?
                                                  links);
                                                  ^~~~~
                                                  link
/usr/include/unistd.h:812:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
../../../dev/aic7xxx/aicasm/aicasm.c:444:12: error: incomplete definition of type 'struct cs_tailq'
        for (cs = TAILQ_FIRST(&cs_tailq);
                  ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/kern/queue.h:592:34: note: expanded from macro 'TAILQ_FIRST'
#define TAILQ_FIRST(head)       ((head)->tqh_first)
                                 ~~~~~~^
../../../dev/aic7xxx/aicasm/aicasm.h:70:15: note: forward declaration of 'struct cs_tailq'
extern struct cs_tailq cs_tailq;
              ^
../../../dev/aic7xxx/aicasm/aicasm.c:446:27: error: no member named 'links' in 'struct critical_section'
             cs = TAILQ_NEXT(cs, links)) {
                  ~~~~~~~~~~~~~~~^~~~~~
/usr/include/sys/kern/queue.h:701:40: note: expanded from macro 'TAILQ_NEXT'
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
                                       ^
../../../dev/aic7xxx/aicasm/aicasm.c:448:10: error: incomplete definition of type 'struct cs_tailq'
                        cs == TAILQ_FIRST(&cs_tailq) ? "" : ",\n",
                              ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/kern/queue.h:592:34: note: expanded from macro 'TAILQ_FIRST'
#define TAILQ_FIRST(head)       ((head)->tqh_first)
                                 ~~~~~~^
../../../dev/aic7xxx/aicasm/aicasm.h:70:15: note: forward declaration of 'struct cs_tailq'
extern struct cs_tailq cs_tailq;
              ^
../../../dev/aic7xxx/aicasm/aicasm.c:474:34: error: no member named 'inner_scope' in 'struct scope'
        cur_scope = TAILQ_FIRST(&scope->inner_scope);
                                 ~~~~~  ^
/usr/include/sys/kern/queue.h:592:29: note: expanded from macro 'TAILQ_FIRST'
#define TAILQ_FIRST(head)       ((head)->tqh_first)
                                  ^
../../../dev/aic7xxx/aicasm/aicasm.c:480:37: error: no member named 'scope_links' in 'struct scope'
                cur_scope = TAILQ_NEXT(cur_scope, scope_links);
                            ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/usr/include/sys/kern/queue.h:701:40: note: expanded from macro 'TAILQ_NEXT'
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
                                       ^
../../../dev/aic7xxx/aicasm/aicasm.c:517:2: warning: implicit declaration of function 'STAILQ_INSERT_TAIL' is invalid in C99 [-Wimplicit-function-declaration]
        STAILQ_INSERT_TAIL(&patches, new_patch, links);
        ^
../../../dev/aic7xxx/aicasm/aicasm.c:517:42: error: use of undeclared identifier 'links'; did you mean 'link'?
        STAILQ_INSERT_TAIL(&patches, new_patch, links);
                                                ^~~~~
                                                link
/usr/include/unistd.h:812:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
../../../dev/aic7xxx/aicasm/aicasm.c:744:46: error: use of undeclared identifier 'links'; did you mean 'link'?
        STAILQ_INSERT_TAIL(&seq_program, new_instr, links);
                                                    ^~~~~
                                                    link
/usr/include/unistd.h:812:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
../../../dev/aic7xxx/aicasm/aicasm.c:759:2: warning: implicit declaration of function 'TAILQ_INSERT_TAIL' is invalid in C99 [-Wimplicit-function-declaration]
        TAILQ_INSERT_TAIL(&cs_tailq, new_cs, links);
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.
*** [aicasm.o] Error code 1

Stop in /home/christoph/scratch/kfreebsd-10/flavor-10.0-0-amd64/sys/amd64/compile/DEBCUSTOM.
*** [aicasm] Error code 1

Stop in /home/christoph/scratch/kfreebsd-10/flavor-10.0-0-amd64/sys/amd64/compile/DEBCUSTOM.
make: *** [build-flavor-amd64-stamp] Error 1

Maybe you have an idea?

  Christoph

-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer


Reply to: