-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
BugSomething isn't workingSomething isn't working
Milestone
Description
@bowwwang The GCC compiler built for the SoftHier platform is only built for x86_64
and not for arm64
. This causes errors when running tests on Apple Silicon.
To Reproduce
On a Mac with Apple Silicon, execute:
docker run -it --name deeploy_devel -v $(pwd):/app/Deeploy ghcr.io/pulp-platform/deeploy:devel
cd Deeploy
pip install -e . --extra-index-url=https://pypi.ngc.nvidia.com
cd DeeployTest
python testRunner_softhier.py -t Tests/Adder/ --toolchain=GCC
Expected behavior
We should build the compiler for the host platform and not fix it to x86_64
. Unfortunately, this is handled in the SoftHier project.
Additional context
root@5d3c48e41225:/app/Deeploy/DeeployTest# file /app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-ld
/app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-ld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=0b2cdd45c8409c325b0e76701f142edaafbda155, with debug_info, not stripped
Compilation Log
root@5d3c48e41225:/app/Deeploy/DeeployTest# python testRunner_softhier.py -t Tests/Adder/ --toolchain=GCC
Generation Directory: /app/Deeploy/DeeployTest/TEST_SOFTHIER/Tests/Adder
Test Directory : Tests/Adder
Test Name : Adder
################## Testing Tests/Adder on SoftHier Platform ##################
-- Building for platform 'SoftHier'
-- ============================= Project Configuration ============================
-- [Deeploy] platform = SoftHier
-- [Deeploy] use_dma = 1
-- ================================================================================
--
-- The C compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: /app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-gcc
-- Check for working C compiler: /app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-gcc - broken
CMake Error at /usr/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler
"/app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /app/Deeploy/DeeployTest/TEST_SOFTHIER/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f96a8/fast && /usr/bin/gmake -f CMakeFiles/cmTC_f96a8.dir/build.make CMakeFiles/cmTC_f96a8.dir/build
gmake[1]: Entering directory '/app/Deeploy/DeeployTest/TEST_SOFTHIER/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f96a8.dir/testCCompiler.c.obj
/app/install/softhier/third_party/toolchain/install/bin/riscv32-unknown-elf-gcc -DDEEPLOY_SOFTHIER_PLATFORM -D__LINK_LD -D__TOOLCHAIN_GCC__ -mabi=ilp32d -mcmodel=medlow -march=rv32imafdv_zfh -g -O3 -ffast-math -fno-builtin -fno-tree-vectorize -fno-common -ffunction-sections -fno-strict-aliasing -o CMakeFiles/cmTC_f96a8.dir/testCCompiler.c.obj -c /app/Deeploy/DeeployTest/TEST_SOFTHIER/build/CMakeFiles/CMakeTmp/testCCompiler.c
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
gmake[1]: *** [CMakeFiles/cmTC_f96a8.dir/build.make:78: CMakeFiles/cmTC_f96a8.dir/testCCompiler.c.obj] Trace/breakpoint trap
gmake[1]: Leaving directory '/app/Deeploy/DeeployTest/TEST_SOFTHIER/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_f96a8/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:112 (project)
-- Configuring incomplete, errors occurred!
See also "/app/Deeploy/DeeployTest/TEST_SOFTHIER/build/CMakeFiles/CMakeOutput.log".
See also "/app/Deeploy/DeeployTest/TEST_SOFTHIER/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "/app/Deeploy/DeeployTest/testRunner_softhier.py", line 49, in <module>
testRunner.run()
File "/app/Deeploy/DeeployTest/testUtils/testRunner.py", line 329, in run
self.configure_cmake_project()
File "/app/Deeploy/DeeployTest/testUtils/testRunner.py", line 374, in configure_cmake_project
raise RuntimeError(f"Configuring cMake project failed on {self._dir_test}")
RuntimeError: Configuring cMake project failed on Tests/Adder
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog