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

No rule to make target '/bin/mkdisp' crosscompile using sleef/toolchains/aarch64-gcc.cmake #557

Open
BellaWangY opened this issue Jun 25, 2024 · 2 comments

Comments

@BellaWangY
Copy link

I use this cmake cmd for configuration for arm arch64 for crossing compile and my desktop is ubuntu system.
I runinto some errors please see the logs. how to solve it?
Step1,
cmake -DCMAKE_TOOLCHAIN_FILE=./toolchains/aarch64-gcc.cmake -D DBUILD_SHARED_LIBS=OFF -S . -B build

-- The C compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting build type to 'Release' (required for full support).
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long double
-- Check size of long double - done
-- Performing Test COMPILER_SUPPORTS_LONG_DOUBLE
-- Performing Test COMPILER_SUPPORTS_LONG_DOUBLE - Success
-- Performing Test COMPILER_SUPPORTS_FLOAT128
-- Performing Test COMPILER_SUPPORTS_FLOAT128 - Failed
-- Performing Test COMPILER_SUPPORTS_SVE
-- Performing Test COMPILER_SUPPORTS_SVE - Failed
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Performing Test COMPILER_SUPPORTS_OPENMP
-- Performing Test COMPILER_SUPPORTS_OPENMP - Success
-- Performing Test COMPILER_SUPPORTS_OMP_SIMD
-- Performing Test COMPILER_SUPPORTS_OMP_SIMD - Success
-- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES
-- Performing Test COMPILER_SUPPORTS_WEAK_ALIASES - Success
-- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH
-- Performing Test COMPILER_SUPPORTS_BUILTIN_MATH - Success
-- Performing Test COMPILER_SUPPORTS_SYS_GETRANDOM
-- Performing Test COMPILER_SUPPORTS_SYS_GETRANDOM - Success
-- Configuring build for SLEEF-v3.6.1
Target system: Linux
Target processor: aarch64
Host system: Linux-5.4.0-176-generic
Host processor: x86_64
Detected C compiler: GNU @ /usr/bin/aarch64-linux-gnu-gcc
CMake: 3.21.1
Make program: /usr/bin/make
Crosscompiling SLEEF.
Native build dir:
-- Using option -Wall -Wno-unused-function -Wno-attributes -Wno-unused-result -Wno-psabi -ffp-contract=off -fno-math-errno -fno-trapping-math -fno-shrink-wrap -fno-tree-vrp to compile libsleef
-- Building shared libs : OFF
-- Building static test bins: OFF
-- MPFR : LIB_MPFR-NOTFOUND
-- GMP : LIBGMP-NOTFOUND
-- RT : /usr/aarch64-linux-gnu/lib/librt.so
-- FFTW3 : LIBFFTW3-NOTFOUND
-- OPENSSL :
-- SDE : SDE_COMMAND-NOTFOUND
-- COMPILER_SUPPORTS_OPENMP : 1
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

DBUILD_SHARED_LIBS

Step2,
cmake --build build -j --clean-first
make[2]: *** No rule to make target '/bin/mkdisp', needed by 'src/libm/dispscalar.c.body'. Stop.
make[2]: *** No rule to make target '/bin/mkrename', needed by 'src/libm/include/renamepurecfma_scalar.h'. Stop.
make[1]: *** [CMakeFiles/Makefile2:398: src/libm/CMakeFiles/renamePURECFMA_SCALAR.h_generated.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target '/bin/mkrename', needed by 'src/libm/include/renamedspscalar.h'. Stop.
make[1]: *** [CMakeFiles/Makefile2:450: src/libm/CMakeFiles/dispscalar.c_generated.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:189: src/libm/CMakeFiles/renamedspscalar.h_generated.dir/all] Error 2
make[2]: *** No rule to make target '/bin/mkalias', needed by 'src/libm/alias_ADVSIMD_dp.h.tmp'. Stop.
make[2]: *** No rule to make target '/bin/mkrename', needed by 'src/libm/include/renameadvsimd.h'. Stop.
make[2]: *** No rule to make target '/bin/mkrename', needed by 'src/libm/include/renamepurec_scalar.h'. Stop.
make[1]: *** [CMakeFiles/Makefile2:346: src/libm/CMakeFiles/renameADVSIMD.h_generated.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:528: src/libm/CMakeFiles/alias_advsimd.h_generated.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:372: src/libm/CMakeFiles/renamePUREC_SCALAR.h_generated.dir/all] Error 2
make[2]: *** No rule to make target '/bin/mkrename', needed by 'src/libm/sleeflibm_ADVSIMD_.h.tmp'. Stop.
make[1]: *** [CMakeFiles/Makefile2:502: src/libm/CMakeFiles/headers.dir/all] Error 2
make[2]: *** No rule to make target '/bin/mkrename', needed by 'src/libm/include/renameadvsimdnofma.h'. Stop.
make[1]: *** [CMakeFiles/Makefile2:476: src/libm/CMakeFiles/renameADVSIMDNOFMA.h_generated.dir/all] Error 2
[ 1%] Building C object src/common/CMakeFiles/common.dir/common.c.o
[ 3%] Building C object src/common/CMakeFiles/arraymap.dir/arraymap.c.o
[ 3%] Built target common
[ 3%] Built target arraymap
make: *** [Makefile:146: all] Error 2

@joanaxcruz
Copy link
Contributor

joanaxcruz commented Jun 26, 2024

Hey, just letting you know I am looking into this now. First thoughts that come into my mind is why you're not passing a native build? I think that might solve your issues. Something like:

cmake -S . -B build-native
cmake --build build-native -j --clean-first

cmake -DCMAKE_TOOLCHAIN_FILE=./toolchains/aarch64-gcc.cmake \
      -DNATIVE_BUILD_DIR="$(pwd)/build-native" \
      -DBUILD_SHARED_LIBS=OFF \
      -S . -B build_557

cmake --build build_557 -j --clean-first

Also make sure you have gcc cross compiler installed:

sudo apt-get install gcc-aarch64-linux-gnu

If you want to fix with gcc-9 then:
sudo apt-get install gcc-9-aarch64-linux-gnu

@blapie
Copy link
Collaborator

blapie commented Jul 8, 2024

@BellaWangY Hi! Did this solve your issue?

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

3 participants