Skip to content

Static link error with nettle built on Debian bookworm on arm64 #1618

Open
@illwieckz

Description

@illwieckz

When doing a linux-arm64 static build, the linkage errors out if I build the external deps on arm64 on Debian Bookworm:

build/deps/linux-arm64-default_10/lib/libnettle.a(fat-arm64.o): in function `fat_init':
Unvanquished/daemon/external_deps/build-linux-arm64-default_10/nettle/nettle-3.8.1/fat-arm64.c:219:(.text.startup+0x154):
 relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `_nettle_aes256_decrypt_c'
 defined in .text section in build/deps/linux-arm64-default_10/lib/libnettle.a(aes256-decrypt.o)
/usr/bin/ld: Unvanquished/daemon/external_deps/build-linux-arm64-default_10/nettle/nettle-3.8.1/fat-arm64.c:219:
 warning: too many GOT entries for -fpic, please recompile with -fPIC

For our release builds, we cross-compile the linux-arm64 external deps amd64 and Debian Buster, so there are multiple variations at play that may prevent us to face this problem in our release build.

When I force the -fPIC flag for the whole external deps build, the error is still there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions