Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBE fails to build on Fedora33 #4075

Open
klauskiwi opened this issue Apr 14, 2021 · 0 comments
Open

SBE fails to build on Fedora33 #4075

klauskiwi opened this issue Apr 14, 2021 · 0 comments

Comments

@klauskiwi
Copy link

klauskiwi commented Apr 14, 2021

This was created to track the following issue reported on the mailing-list: https://lists.ozlabs.org/pipermail/openpower-firmware/2021-March/000630.html

In basic terms, looks like recent changes to Fedora33 are apparently dynamically linking the binaries readelf/nm to some kerberos cryptographic library.

And during SBE's build, the Makefile is overriding the LD_LIBRARY_PATH:
SBE_COMMIT_ID=$(SBE_VERSION) $(MAKE) -C $(@D) LD_LIBRARY_PATH=$(HOST_DIR)/usr/lib CROSS_COMPILER_PATH=$(PPE42_GCC_BIN) all which is causing the python script readAndParseElf.py to use the readelf from the underlying distro (i.e., from the default path) while using a LD_LIBRARY_PATH prepared for the op-build toolchain, which causes the undefined symbol error below:

 Generating /home/stewart/op-build/output/build/sbe-5799af7203689edc9590544b520595f05d9ce7ca/images/sbe_seeprom_DD2.out
readelf: symbol lookup error: /lib64/libk5crypto.so.3: undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b
219040
make[3]: *** [Makefile:165: output_sbe_image] Error 255
make[2]: *** [Makefile:181: all] Error 2
make[2]: Leaving directory '/home/stewart/op-build/output/build/sbe-5799af7203689edc9590544b520595f05d9ce7ca/src/build'
make[1]: *** [Makefile:39: axone] Error 2
make[1]: *** Waiting for unfinished jobs....
readelf: symbol lookup error: /lib64/libk5crypto.so.3: undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b
219760
make[3]: *** [Makefile:165: output_sbe_image] Error 255
make[2]: *** [Makefile:181: all] Error 2
make[2]: Leaving directory '/home/stewart/op-build/output/build/sbe-5799af7203689edc9590544b520595f05d9ce7ca/src/build'
make[1]: *** [Makefile:36: DD2] Error 2
make[1]: Leaving directory '/home/stewart/op-build/output/build/sbe-5799af7203689edc9590544b520595f05d9ce7ca'
make: *** [package/pkg-generic.mk:250: /home/stewart/op-build/output/build/sbe-5799af7203689edc9590544b520595f05d9ce7ca/.stamp_built] Error 2
make: Leaving directory '/home/stewart/op-build/buildroot'

I tried to fix that with this commit (130d044) but that causes the failure of building SBE using devtoolset-8 on a RHEL7 (x86_64) host (see my message https://lists.ozlabs.org/pipermail/openpower-firmware/2021-March/000631.html)

I have since then tried a few different iterations on PR #4028 but the fundamental problem is that the SBE build system sometimes requires native utilities (i.e.m, readelf and nm?) while sometimes requiring tools/libraries from op-build toolchain, and still at other times requiring the ppe toolchain.

I believe that a potential solution would be to call ${CROSS_PREFIX}nm and readelf if they are needed to deal with cross-compiled binaries, while calling just nm / readelf if the native version is desired, without the need to use LD_LIBRARY_PATH. But that would require testing and debugging beyond the scope of op-build, so I'm expecting this to the SBE driven by team for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant