Skip to content

libucontext-1.3.3 FTBFS on Fedora Linux AArch64 #73

@Conan-Kudo

Description

@Conan-Kudo

I packaged libucontext for Fedora and tried to build the package in our build system, but it apparently fails on AArch64 due to some type errors:

[7/19] gcc -Ilibucontext.so.1.p -I. -I.. -I../include -I../arch/common -I../arch/common/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -D_DEFAULT_SOURCE -DEXPORT_UNPREFIXED -MD -MQ libucontext.so.1.p/arch_aarch64_makecontext.c.o -MF libucontext.so.1.p/arch_aarch64_makecontext.c.o.d -o libucontext.so.1.p/arch_aarch64_makecontext.c.o -c ../arch/aarch64/makecontext.c
FAILED: [code=1] libucontext.so.1.p/arch_aarch64_makecontext.c.o 
gcc -Ilibucontext.so.1.p -I. -I.. -I../include -I../arch/common -I../arch/common/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -D_DEFAULT_SOURCE -DEXPORT_UNPREFIXED -MD -MQ libucontext.so.1.p/arch_aarch64_makecontext.c.o -MF libucontext.so.1.p/arch_aarch64_makecontext.c.o.d -o libucontext.so.1.p/arch_aarch64_makecontext.c.o -c ../arch/aarch64/makecontext.c
../arch/aarch64/makecontext.c: In function ‘libucontext_makecontext’:
../arch/aarch64/makecontext.c:48:14: error: assignment to ‘long unsigned int *’ from incompatible pointer type ‘long long unsigned int *’ [-Wincompatible-pointer-types]
   48 |         regp = &(ucp->uc_mcontext.regs[0]);
      |              ^
[8/19] gcc -Ilibucontext_posix.so.1.p -I. -I.. -I../include -I../arch/common -I../arch/common/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -D_DEFAULT_SOURCE -DEXPORT_UNPREFIXED -MD -MQ libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o -MF libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o.d -o libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o -c ../arch/aarch64/makecontext.c
FAILED: [code=1] libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o 
gcc -Ilibucontext_posix.so.1.p -I. -I.. -I../include -I../arch/common -I../arch/common/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -D_DEFAULT_SOURCE -DEXPORT_UNPREFIXED -MD -MQ libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o -MF libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o.d -o libucontext_posix.so.1.p/arch_aarch64_makecontext.c.o -c ../arch/aarch64/makecontext.c
../arch/aarch64/makecontext.c: In function ‘libucontext_makecontext’:
../arch/aarch64/makecontext.c:48:14: error: assignment to ‘long unsigned int *’ from incompatible pointer type ‘long long unsigned int *’ [-Wincompatible-pointer-types]
   48 |         regp = &(ucp->uc_mcontext.regs[0]);
      |              ^
[9/19] gcc -Ilibucontext_posix.so.1.p -I. -I.. -I../include -I../arch/common -I../arch/common/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -D_DEFAULT_SOURCE -DEXPORT_UNPREFIXED -MD -MQ libucontext_posix.so.1.p/libucontext_posix.c.o -MF libucontext_posix.so.1.p/libucontext_posix.c.o.d -o libucontext_posix.so.1.p/libucontext_posix.c.o -c ../libucontext_posix.c
FAILED: [code=1] libucontext_posix.so.1.p/libucontext_posix.c.o 
gcc -Ilibucontext_posix.so.1.p -I. -I.. -I../include -I../arch/common -I../arch/common/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -D_DEFAULT_SOURCE -DEXPORT_UNPREFIXED -MD -MQ libucontext_posix.so.1.p/libucontext_posix.c.o -MF libucontext_posix.so.1.p/libucontext_posix.c.o.d -o libucontext_posix.so.1.p/libucontext_posix.c.o -c ../libucontext_posix.c
../libucontext_posix.c:51:1: error: conflicting types for ‘swapcontext’; have ‘int(libucontext_ucontext_t *, const libucontext_ucontext_t *)’ {aka ‘int(ucontext_t *, const ucontext_t *)’}
   51 | swapcontext(libucontext_ucontext_t *oucp, const libucontext_ucontext_t *ucp)
      | ^~~~~~~~~~~
In file included from ../arch/common/include/libucontext/bits.h:6,
                 from ../include/libucontext/libucontext.h:5,
                 from ../libucontext_posix.c:16:
/usr/include/ucontext.h:41:12: note: previous declaration of ‘swapcontext’ with type ‘int(ucontext_t * restrict,  const ucontext_t * restrict)’
   41 | extern int swapcontext (ucontext_t *__restrict __oucp,
      |            ^~~~~~~~~~~

Full build log: libucontext-1.3.3-1.fc44.aarch64-build.log.txt

Koji build task: https://koji.fedoraproject.org/koji/taskinfo?taskID=139032485

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions