Project

General

Profile

Actions

Bug #61718

closed

linking failure on alpine linux only for x86_64

Added by Duncan Bellamy 11 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Code Hygiene
Target version:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
Yes
Severity:
1 - critical
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
librados
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I have compiled the 18.1.0 rc release for alpine linux and only x86_64 fails with a linking error, looking at the ceph repo I can’t see any changes that might cause this:

ninja: job failed: : && /usr/bin/g++ -Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -fno-plt -DSTATX_INO=0x100U -Wno-deprecated-declarations -Os -DNDEBUG -Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs -rdynamic -pie src/CMakeFiles/librados-config.dir/librados-config.cc.o -o bin/librados-config  -Wl,-rpath,/builds/a16bitsysop/aports/testing/ceph18/src/ceph-18.1.0/build/lib:  lib/librados.so.2.0.0  /usr/lib/libboost_program_options.so.1.82.0  -Wl,-rpath-link,/builds/a16bitsysop/aports/testing/ceph18/src/ceph-18.1.0/build/lib  -Wl,--as-needed -latomic && :
/usr/lib/gcc/x86_64-alpine-linux-musl/13.1.1/../../../../x86_64-alpine-linux-musl/bin/ld: src/CMakeFiles/librados-config.dir/librados-config.cc.o: in function `main':
librados-config.cc:(.text.startup+0x2a7): undefined reference to `rados_version'
collect2: error: ld returned 1 exit status
ninja: job failed: : && /usr/bin/g++ -Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -fno-plt -DSTATX_INO=0x100U -Wno-deprecated-declarations -Os -DNDEBUG -Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs -rdynamic -pie src/tools/immutable_object_cache/CMakeFiles/ceph-immutable-object-cache.dir/main.cc.o -o bin/ceph-immutable-object-cache  -Wl,-rpath,/builds/a16bitsysop/aports/testing/ceph18/src/ceph-18.1.0/build/lib:  lib/libceph_immutable_object_cache_lib.a  lib/librados.so.2.0.0  lib/libglobal.a  lib/libceph-common.so.2  lib/libjson_spirit.a  lib/libcommon_utf8.a  lib/liberasure_code.a  lib/libextblkdev.a  -lcap  lib/libcrc32.a  lib/libarch.a  /usr/lib/libboost_thread.so.1.82.0  /usr/lib/libboost_system.so.1.82.0  /usr/lib/libboost_random.so.1.82.0  /usr/lib/libboost_program_options.so.1.82.0  /usr/lib/libboost_date_time.so.1.82.0  /usr/lib/libboost_iostreams.so.1.82.0  /usr/lib/libfmt.so  /usr/lib/libblkid.so  /usr/lib/libcrypto.so  /usr/lib/libudev.so  -ldl  /usr/lib/librt.a  -lresolv   -Wl,--as-needed -latomic && :
/usr/lib/gcc/x86_64-alpine-linux-musl/13.1.1/../../../../x86_64-alpine-linux-musl/bin/ld: lib/libceph_immutable_object_cache_lib.a(ObjectCacheStore.cc.o): in function `void ceph::immutable_obj_cache::detail::rados_callback<Context, &Context::complete>(void*, void*)':
ObjectCacheStore.cc:(.text._ZN4ceph19immutable_obj_cache6detail14rados_callbackI7ContextXadL_ZNS3_8completeEiEEEEvPvS4_[_ZN4ceph19immutable_obj_cache6detail14rados_callbackI7ContextXadL_ZNS3_8completeEiEEEEvPvS4_]+0x6): undefined reference to `rados_aio_get_return_value'
collect2: error: ld returned 1 exit status
ninja: subcommands failed

Full pipeline:
https://gitlab.alpinelinux.org/a16bitsysop/aports/-/jobs/1051236

Successful aarch64 pipeline:
https://gitlab.alpinelinux.org/a16bitsysop/aports/-/jobs/1051240

Actions #1

Updated by Radoslaw Zarzynski 11 months ago

Alpine isn't an officially supported platform by Ceph but let's bring this into the CLT meeting.

Actions #3

Updated by Duncan Bellamy 11 months ago

Thanks

Actions #4

Updated by Duncan Bellamy 10 months ago

This turned out to be `-fno-plt`

Which seems to have been an issue for archlinux before it appeared in alpine linux
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ceph#n124

Actions #5

Updated by Radoslaw Zarzynski 10 months ago

Per the Arch's spec there is a workaround:

export CFLAGS="${CFLAGS/-fno-plt/}" 
export CXXFLAGS="${CXXFLAGS/-fno-plt/}" 
Actions #6

Updated by Duncan Bellamy 10 months ago

yes alpine linux uses that as well now

Actions #7

Updated by Radoslaw Zarzynski 10 months ago

  • Status changed from New to Resolved

Switching the status to Resolved only b/c we lack Workarounded.

Actions

Also available in: Atom PDF