Skip to content

@cImport breakage on loongarch64-linux after #24497 #43

@alexrp

Description

@alexrp

ref ziglang/zig#24497

test
└─ test-standalone
   └─ standalone_test_cases
      └─ standalone_test_cases.glibc_compat
         └─ run exe native-linux-gnu.2.38
            └─ compile exe native-linux-gnu.2.38 Debug native-linux-gnu.2.38 failure
error: /home/ci/zig/lib/libc/include/generic-glibc/stdio.h:376:28: error: 'void' must be the first parameter if specified
                     __gnuc_va_list __arg) __nonnull ((1));
                           ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:381:74: error: 'void' must be the first parameter if specified
extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
                                                                         ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:384:28: error: 'void' must be the first parameter if specified
                     __gnuc_va_list __arg) __THROWNL;
                           ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:393:62: error: 'void' must be the first parameter if specified
                      const char *__restrict __format, __gnuc_va_list __arg)
                                                             ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:401:29: error: 'void' must be the first parameter if specified
                      __gnuc_va_list __arg)
                            ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:414:28: error: 'void' must be the first parameter if specified
                     __gnuc_va_list __arg)
                           ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:494:27: error: 'void' must be the first parameter if specified
                    __gnuc_va_list __arg)
                          ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:501:73: error: 'void' must be the first parameter if specified
extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
                                                                        ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:506:60: error: 'void' must be the first parameter if specified
                    const char *__restrict __format, __gnuc_va_list __arg)
                                                           ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:543:12: error: 'void' must be the first parameter if specified
extern int __REDIRECT (vfscanf,
           ^
/home/ci/zig/lib/libc/include/generic-glibc/sys/cdefs.h:410:46: note: expanded from here
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
                                             ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:545:57: note: expanded from here
                        const char *__restrict __format, __gnuc_va_list __arg),
                                                        ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:548:12: error: 'void' must be the first parameter if specified
extern int __REDIRECT (vscanf, (const char *__restrict __format,
           ^
/home/ci/zig/lib/libc/include/generic-glibc/sys/cdefs.h:410:46: note: expanded from here
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
                                             ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:549:25: note: expanded from here
                                __gnuc_va_list __arg), __isoc99_vscanf)
                        ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:551:12: error: 'void' must be the first parameter if specified
extern int __REDIRECT_NTH (vsscanf,
           ^
/home/ci/zig/lib/libc/include/generic-glibc/sys/cdefs.h:418:11: note: expanded from here
     name proto __asm__ (__ASMNAME (#alias)) __THROW
          ^
/home/ci/zig/lib/libc/include/generic-glibc/stdio.h:554:28: note: expanded from here
                            __gnuc_va_list __arg), __isoc99_vsscanf)
                           ^
error: the following build command failed with exit code 1:
/home/ci/zig/zig-global-cache/o/939a760368a29847ebad74633afba044/translate-c -x c -isystem /home/ci/zig/lib/compiler/aro/include -fno-PIE -fPIC -gdwarf-4 -gdwarf32 -fno-lto -MD -MV -MF /home/ci/zig/zig-local-cache/tmp/298c8c5274292789/cimport.h.d -fhosted -nostdinc -D__GLIBC_MINOR__=38 -isystem /home/ci/zig/lib/include -isystem /home/ci/zig/lib/libc/include/loongarch-linux-gnu -isystem /home/ci/zig/lib/libc/include/generic-glibc -isystem /home/ci/zig/lib/libc/include/loongarch-linux-any -isystem /home/ci/zig/lib/libc/include/any-linux-any -O0 -target loongarch64-linux.5.19...6.16-gnu.2.38 -mcpu=la664-32bit+32s+64bit+d+div32+f+frecipe-la_global_with_abs-la_global_with_pcrel-la_local_with_abs+lam_bh+lamcas+lasx+lbt+ld_seq_sa+lsx+lvz-prefer_w_inst-relax+scq+ual -I /home/ci/deps/zig+llvm+lld+clang-loongarch64-linux-musl-0.16.0-dev.157+7fdd60df1/include /home/ci/zig/zig-local-cache/tmp/298c8c5274292789/cimport.h -o /home/ci/zig/zig-local-cache/tmp/298c8c5274292789/cimport.zig

cc @Vexu this looks like an Aro bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions