Skip to content

Set -DTARGET_CPU for IDG builds on RISC-V - #347

Open
casparvl wants to merge 1 commit into
EESSI:mainfrom
casparvl:fix_IDG_on_RISCV
Open

casparvl wants to merge 1 commit into
EESSI:mainfrom
casparvl:fix_IDG_on_RISCV

Conversation

@casparvl

Copy link
Copy Markdown
Contributor

Change or set -DTARGET_CPU to 'rv64gc -mabi=lp64d' for our RISCV generic target for IDG builds. Note that the IDG build system passes this as argument to -march, so we effectively get -march=rv64gc -mabi=lp64d this way.

Tested on RISC-V in a debugging shell:

eb-shell> cmake -DCMAKE_INSTALL_PREFIX=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/IDG/1.3.0-foss-2026.1 -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_SYSROOT=/cvmfs/software.eessi.io/versions/2026.06/compat/linux/riscv64 -DCMAKE_C_COMPILER=/tmp/eb-d6asjol5/eb-663d1dxa/tmpd6498862/rpath_wrappers/gcc_wrapper/gcc -DCMAKE_CXX_COMPILER=/tmp/eb-d6asjol5/eb-663d1dxa/tmpd6498862/rpath_wrappers/gxx_wrapper/g++ -DCMAKE_Fortran_COMPILER=/tmp/eb-d6asjol5/eb-663d1dxa/tmpd6498862/rpath_wrappers/gfortran_wrapper/gfortran -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DPYTHON_EXECUTABLE=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Python/3.14.2-GCCcore-15.2.0/bin/python -DPython_EXECUTABLE=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Python/3.14.2-GCCcore-15.2.0/bin/python -DPython3_EXECUTABLE=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Python/3.14.2-GCCcore-15.2.0/bin/python -DBOOST_ROOT=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Boost/1.90.0-GCCcore-15.2.0 -DBoost_NO_SYSTEM_PATHS=ON -DBUILD_WITH_MPI=ON -DBUILD_WITH_PYTHON=ON -DBUILD_WITH_DEMOS=ON  /tmp/eessibot/easybuild/build/IDG/1.3.0/foss-2026.1/IDG
-- Performing Test COMPILER_SUPPORTS_TARGET_CPU
-- Performing Test COMPILER_SUPPORTS_TARGET_CPU - Failed
CMake Error at external/aocommon/CMake/SetTargetCPU.cmake:42 (message):
  The compiler doesn't support 'native' as target CPU architecture.
Call Stack (most recent call first):
  CMakeLists.txt:119 (include)


-- Configuring incomplete, errors occurred!
eb-shell> vi CMakeLists.txt
eb-shell> ls
CMakeCache.txt  CMakeFiles  _deps
eb-shell> vi CMakeFiles/
3.31.11/                CMakeConfigureLog.yaml  CMakeScratch/           cmake.check_cache       pkgRedirects/
eb-shell> vi CMakeFiles/^C
eb-shell> vi /tmp/eessibot/easybuild/build/IDG/1.3.0/foss-2026.1/IDG/CMakeLists.txt
eb-shell> vi /tmp/eessibot/easybuild/build/IDG/1.3.0/foss-2026.1/IDG/CMakeLists.txt
eb-shell> vi /tmp/eessibot/easybuild/build/IDG/1.3.0/foss-2026.1/IDG/external/aocommon/CMake/SetTargetCPU.cmake
eb-shell> cmake  -DTARGET_CPU="rv64gc -mabi=lp64d" -DCMAKE_INSTALL_PREFIX=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/IDG/1.3.0-foss-2026.1 -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_SYSROOT=/cvmfs/software.eessi.io/versions/2026.06/compat/linux/riscv64 -DCMAKE_C_COMPILER=/tmp/eb-d6asjol5/eb-663d1dxa/tmpd6498862/rpath_wrappers/gcc_wrapper/gcc -DCMAKE_CXX_COMPILER=/tmp/eb-d6asjol5/eb-663d1dxa/tmpd6498862/rpath_wrappers/gxx_wrapper/g++ -DCMAKE_Fortran_COMPILER=/tmp/eb-d6asjol5/eb-663d1dxa/tmpd6498862/rpath_wrappers/gfortran_wrapper/gfortran -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DPYTHON_EXECUTABLE=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Python/3.14.2-GCCcore-15.2.0/bin/python -DPython_EXECUTABLE=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Python/3.14.2-GCCcore-15.2.0/bin/python -DPython3_EXECUTABLE=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Python/3.14.2-GCCcore-15.2.0/bin/python -DBOOST_ROOT=/cvmfs/software.eessi.io/versions/2026.06/software/linux/riscv64/generic/software/Boost/1.90.0-GCCcore-15.2.0 -DBoost_NO_SYSTEM_PATHS=ON -DBUILD_WITH_MPI=ON -DBUILD_WITH_PYTHON=ON -DBUILD_WITH_DEMOS=ON  /tmp/eessibot/easybuild/build/IDG/1.3.0/foss-2026.1/IDG
-- Performing Test COMPILER_SUPPORTS_TARGET_CPU
-- Performing Test COMPILER_SUPPORTS_TARGET_CPU - Success

Will test in EESSI/software-layer#1929

…ric target for IDG builds. Note that the IDG build system passes this as argument to -march, so we effectively get -march=rv64gc -mabi=lp64d this way.
casparvl pushed a commit to casparvl/software-layer that referenced this pull request Nov 16, 2026
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

Successfully merging this pull request may close these issues.

1 participant