-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Summary
I'm trying to build the xtest test suite in a setup where two OP-TEE variants are built in parallel (with suffixes to avoid collision). The first xtest build succeeds, but the second build fails with a linker error:
work/crosscon/buildroot/build-aarch64/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: cannot find -lteec2: No such file or directoryThis happens during the linking stage of xtest when trying to use a renamed version of the libteec library (lteec2 instead of lteec), to support parallel OP-TEE builds.
First Build (Success)
# Environment setup for first variant export TA_DEV_KIT_DIR=../optee_os/optee-rpi4/export-ta_arm64export TEEC_EXPORT=../optee_client/out-aarch64/export/usr/# ...make clean && make -j$(nproc) && make installThis builds fine and xtest runs as expected.
Second Build (Failure)
# Environment setup for second variant export TA_DEV_KIT_DIR=../optee_os/optee2-rpi4/export-ta_arm64export TEEC_EXPORT=../optee_client/out2-aarch64/export/usr/# Patching Makefiles to avoid name collisionfind . -name "Makefile" -exec sed -i "s/-lteec$/-lteec2/g" {} +
find . -name "Makefile" -exec sed -i "s/optee_armtz/optee2_armtz/g" {} +
make clean
make -j$(nproc)Error Output
work/crosscon/optee_test/out2-aarch64/xtest/xtest/work/crosscon/buildroot/build-aarch64/host/lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: cannot find -lteec2: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:194: xtest] Error 1make: *** [Makefile:42: xtest] Error 2Request
Could maintainers or anyone know how to fix it so I can proceed with building the RPI demo and running it
Any advice would be greatly appreciated.
Thanks!
@DavidMCerdeira you mentioned here that you got some ideas regarding of the issue which is causing it, I tried running the Step 4: Build OP-TEE xtest one by one because of suspected sed race condition but that hasnt fixed anything