Closed jeromecoutant closed 2 years ago
Hi @jeromecoutant, I can't reproduce this issue locally. Could you please try a clean fetch & build:
mbed-tools import mbed-os-tf-m-regression-tests
cd mbed-os-tf-m-regression-tests
python3 build_tfm.py -m ARM_MUSCA_B1 -t GNUARM -c RegressionIPC
and see if the issue persists?
Here is what I have done:
git clone https://github.com/ARMmbed/mbed-os-tf-m-regression-tests.git
cd mbed-os-tf-m-regression-tests
git clone https://github.com/ARMmbed/mbed-os.git
python build_tfm.py -m ARM_MUSCA_B1 -t GNUARM -c RegressionIPC
...
.Build-TF-M] 19:34:34: [504/913] Building C object test/test_services/tfm_core_test_2/CMakeFiles/tfm_app_rot_partition_core_test_2.dir/__/__/__/__/secure_fw/partitions/firmware_update/tfm_fwu_secure_api.o
.Build-TF-M] 19:34:34: [505/913] Building C object test/test_services/tfm_core_test/CMakeFiles/tfm_psa_rot_partition_core_test.dir/__/__/framework/test_framework_helpers.o
.Build-TF-M] 19:34:34: [506/913] Building C object test/test_services/tfm_core_test_2/CMakeFiles/tfm_app_rot_partition_core_test_2.dir/tfm_ss_core_test_2.o
.Build-TF-M] 19:34:35: [507/913] Building C object test/test_services/tfm_core_test_2/CMakeFiles/tfm_app_rot_partition_core_test_2.dir/a14cb1dd6f5bebccb743906643335f6b/intermedia_tfm_ss_core_test_2.o
.Build-TF-M] 19:34:35: [508/913] Building C object test/test_services/tfm_core_test_2/CMakeFiles/tfm_app_rot_partition_core_test_2.dir/__/__/__/__/interface/src/psa/psa_service.o
[Build-TF-M] 19:34:35: ninja: error: mkdir(test/test_services/tfm_secure_client_service/CMakeFiles/tfm_psa_rot_partition_secure_client_service.dir/__/__/__/generated/test_services/tfm_secure_client_service/auto.generated): No such file or directory
.Build-TF-M] 19:34:35: ninja: build stopped: .
[Build-TF-M] 19:34:35: Cmake build failed for target ARM_MUSCA_B1 using toolchain GNUARM.
Maybe it is the famous long path windows issue.....
Maybe it is the famous long path windows issue.....
Sounds likely. Have you tried putting mbed-os-tf-m-regression-tests in a shallower directory on your PC?
Sounds likely. Have you tried putting mbed-os-tf-m-regression-tests in a shallower directory on your PC?
OK, I can try, but it is not the solution... :-)
No, I couldn't make it work at /c/ level
Sounds likely. Have you tried putting mbed-os-tf-m-regression-tests in a shallower directory on your PC?
OK, I can try, but it is not the solution... :-)
The CMake build paths of trusted-firmware-m (TF-M) are rather deep. When I built trusted-firmware-m manually on Windows, the path was borderline too long and moving the repository by one directory or so changed the result... Sometime CMake warns you about paths lengths being too long on Windows, earlier in the log.
Unfortunately there's not much we can do on the Mbed OS side, as we're just letting the trusted-firmware-m repo build itself. I'll raise a suggestion to shorten paths to the TF-M team.
Meantime, could you please try removing the path restriction as per the Windows 10 documentation from Microsoft? Please let us know if it works for you, thanks.
No, I couldn't make it work at /c/ level
Was it the same failure?
Patch for path restrictions doesn't work.... It is always failing at
[Build-TF-M] 09:40:58: FAILED: test/test_services/tfm_secure_client_service/CMakeFiles/tfm_psa_rot_partition_secure_client_service.dir/__/__/__/generated/test_services/tfm_secure_client_service/auto_generated/i.termedia_tfm_secure_client_service.o
Could you check https://wuhrr.wordpress.com/2011/01/20/use-subst-to-deal-with-long-path-names/ in case it could be applicable for windows user/customer?
@jeromecoutant Thanks for the suggestion, I'll try to see what's the best we can do.
The main thing is, CMake generates Ninja files and ninja does the actual build. But Ninja doesn't support long paths yet, someone has a PR open for that: https://github.com/ninja-build/ninja/pull/1939
Even if the system-wide path restriction is remove, that seems not enough - applications also need to be adjusted to take advantage of the long path support.
(Apparently "make" doesn't support it either, so switching from ninja back to make doesn't help either.)
Hi @jeromecoutant, for now if you both rename mbed-os-tf-m-regression-tests to a shorter name (e.g. mbed-tf-m) and put it in a short path (e.g. /c/work/), it'll likely let you proceed with the work at least. Before ninja properly supports long paths on Windows.
This workaround is OK:
subst.exe O: $PWD
cd /o/
python build_tfm.py -m ARM_MUSCA_B1 -t GNUARM -c RegressionIPC
Maybe it could be documented or included in the python script ?
Following https://github.com/ARMmbed/mbed-os-tf-m-regression-tests#building-the-tf-m-regression-test-suite I tried python3 build_tfm.py -m ARM_MUSCA_B1 -t GNUARM -c RegressionIPC
But it is failing: