Skip to content

LTO build failure #130

@Alessandro-Barbieri

Description

@Alessandro-Barbieri

gentoo CI had a failure while trying to build with LTO
log https://860525.bugs.gentoo.org/attachment.cgi?id=793904
see https://bugs.gentoo.org/860525

[6/6] : && /usr/bin/x86_64-pc-linux-gnu-gcc -fPIC -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wall  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -shared -Wl,-soname,libaxl.so -o src/libaxl.so src/CMakeFiles/axl_o.dir/axl.c.o src/CMakeFiles/axl_o.dir/axl_sync.c.o src/CMakeFiles/axl_o.dir/axl_err.c.o src/CMakeFiles/axl_o.dir/axl_io.c.o src/CMakeFiles/axl_o.dir/axl_util.c.o  -Wl,-rpath,::::::::::  -lkvtree_base  -lz && :
FAILED: src/libaxl.so 
: && /usr/bin/x86_64-pc-linux-gnu-gcc -fPIC -O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wall  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -shared -Wl,-soname,libaxl.so -o src/libaxl.so src/CMakeFiles/axl_o.dir/axl.c.o src/CMakeFiles/axl_o.dir/axl_sync.c.o src/CMakeFiles/axl_o.dir/axl_err.c.o src/CMakeFiles/axl_o.dir/axl_io.c.o src/CMakeFiles/axl_o.dir/axl_util.c.o  -Wl,-rpath,::::::::::  -lkvtree_base  -lz && :
/var/tmp/portage/sys-cluster/AXL-0.7.0/work/AXL-0.7.0/src/axl_sync.h:10:5: error: type of ‘axl_sync_start’ does not match original declaration [-Werror=lto-type-mismatch]
   10 | int axl_sync_start(int id);
      |     ^
/var/tmp/portage/sys-cluster/AXL-0.7.0/work/AXL-0.7.0/src/axl_sync.c:72:5: note: type mismatch in parameter 2
   72 | int axl_sync_start (int id, int resume)
      |     ^
/var/tmp/portage/sys-cluster/AXL-0.7.0/work/AXL-0.7.0/src/axl_sync.c:72:5: note: type ‘int’ should match type ‘void’
/var/tmp/portage/sys-cluster/AXL-0.7.0/work/AXL-0.7.0/src/axl_sync.c:72:5: note: ‘axl_sync_start’ was previously declared here
lto1: some warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions