Project

General

Profile

Backport #18133

jewel: undefined references when building unit tests with --with-xio

Added by Nathan Cutler 12 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Release:
jewel

Description

https://github.com/ceph/ceph/pull/12296

(Note that this backport is not a cherry-pick because master uses cmake and this is an autotools-only fix)

History

#1 Updated by Nathan Cutler 12 months ago

  • Description updated (diff)

description

This kind of thing happens when linking several of the unit tests. As far as I can tell, it only happens when building RPMs with --with-xio:

[ 3451s] ./.libs/libcommon.a(Crypto.o): In function `CryptoAESKeyHandler::init(ceph::buffer::ptr const&, std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&)':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:280: undefined reference to `PK11_GetBestSlot'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:291: undefined reference to `PK11_ImportSymKey'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:304: undefined reference to `PK11_ParamFromIV'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:282: undefined reference to `PR_GetError'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:293: undefined reference to `PR_GetError'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:306: undefined reference to `PR_GetError'
[ 3451s] ./.libs/libcommon.a(Crypto.o): In function `nss_aes_operation(unsigned long, unsigned long, PK11SymKeyStr*, SECItemStr*, ceph::buffer::list const&, ceph::buffer::list&, std::string*)':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:222: undefined reference to `PK11_CreateContextBySymKey'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:229: undefined reference to `PK11_CipherOp'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:231: undefined reference to `PK11_DestroyContext'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:234: undefined reference to `PR_GetError'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:243: undefined reference to `PK11_DigestFinal'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:244: undefined reference to `PK11_DestroyContext'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:248: undefined reference to `PR_GetError'
[ 3451s] ./.libs/libcommon.a(Crypto.o): In function `CryptoAESKeyHandler::~CryptoAESKeyHandler()':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:272: undefined reference to `SECITEM_FreeItem'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:273: undefined reference to `PK11_FreeSymKey'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:274: undefined reference to `PK11_FreeSlot'
[ 3451s] ./.libs/libcommon.a(Crypto.o): In function `CryptoAESKeyHandler::~CryptoAESKeyHandler()':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:272: undefined reference to `SECITEM_FreeItem'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:273: undefined reference to `PK11_FreeSymKey'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/auth/Crypto.cc:274: undefined reference to `PK11_FreeSlot'
[ 3451s] ./.libs/libcommon.a(ceph_crypto.o): In function `ceph::crypto::init(CephContext*)':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/common/ceph_crypto.cc:59: undefined reference to `SECMOD_RestartModules'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/common/ceph_crypto.cc:74: undefined reference to `NSS_InitContext'
[ 3451s] ./.libs/libcommon.a(ceph_crypto.o): In function `ceph::crypto::shutdown()':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/common/ceph_crypto.cc:85: undefined reference to `NSS_ShutdownContext'
[ 3451s] ./.libs/libcommon.a(ceph_crypto.o): In function `ceph::crypto::HMAC::~HMAC()':
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/common/ceph_crypto.cc:94: undefined reference to `PK11_DestroyContext'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/common/ceph_crypto.cc:95: undefined reference to `PK11_FreeSymKey'
[ 3451s] /home/abuild/rpmbuild/BUILD/ceph-10.2.0+git.1462026398.3f40fbb/src/common/ceph_crypto.cc:96: undefined reference to `PK11_FreeSlot'
[ 3451s] collect2: error: ld returned 1 exit status
[ 3451s] Makefile:18094: recipe for target 'unittest_log' failed

#2 Updated by Loic Dachary 12 months ago

  • Subject changed from Undefined references when building unit tests with --with-xio to jewel: undefined references when building unit tests with --with-xio

#3 Updated by Nathan Cutler 12 months ago

  • Status changed from Testing to Resolved

#4 Updated by Loic Dachary 11 months ago

  • Target version set to v10.2.6

Also available in: Atom PDF