Build error in makefile

Hi, I am following quick start guide to build by using ./build_default.py and got the build error below
[ 55%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_q15.c.obj
[ 55%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_q31.c.obj
[ 55%] Linking C static library …/lib/libcmsis-dsp.a
[ 55%] Built target cmsis-dsp
make: *** [Makefile:146: all] Error 2

Can anyone help me with this problem?

I am kind new to using this makefiles and linux.

Thank you!

Hi @Sooyeon,

Thanks for raising this. Can you please share some more details with us, especially:

  1. Are you on a Linux based system or are you using WSL2 under Windows?
  2. Can you share the contents of the log file build_default.py would have produced? It should be a file named log_build_default.log.
  3. Did you verify you have all the prerequisites as mentioned here: building.md: build-prerequisites, and can you share the output of those commands with us?
  4. Can you check if you have the third_party-build-prerequisites installed?

Thanks,
Kshitij

  1. I am using WSL2 under Window.

  2. I cannot upload .log file so I am writing some of the log.

INFO:root:/home/parksean210/git/MLplatform/ml-embedded-evaluation-kit/resources_downloaded/env/bin/python3 -m pip freeze

INFO:root:cffi==1.15.0

cmake==3.23.3

ethos-u-vela==3.6.0

flatbuffers==2.0.7

Jinja2==2.11.2

llvmlite==0.38.0

lxml==4.9.2

MarkupSafe==2.0.1

numba==0.55.1

numpy==1.21.3

Pillow==9.2.0

pycparser==2.20

resampy==0.3.1

scipy==1.7.3

six==1.16.0

SoundFile==0.10.3.post1

INFO:root:[ 53%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_mfcc_q15.c.obj

INFO:root:[ 53%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_mfcc_q31.c.obj

INFO:root:[ 53%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_f32.c.obj

INFO:root:[ 53%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_fast_f16.c.obj

INFO:root:[ 53%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_fast_f32.c.obj

INFO:root:[ 54%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_fast_f64.c.obj

INFO:root:[ 54%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_fast_init_f16.c.obj

INFO:root:[ 54%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_fast_init_f32.c.obj

INFO:root:[ 54%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_fast_init_f64.c.obj

INFO:root:[ 54%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_init_f32.c.obj

INFO:root:[ 55%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_init_q15.c.obj

INFO:root:[ 55%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_init_q31.c.obj

INFO:root:[ 55%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_q15.c.obj

INFO:root:[ 55%] Building C object math/CMakeFiles/cmsis-dsp.dir///dependencies/cmsis-dsp/Source/TransformFunctions/arm_rfft_q31.c.obj

INFO:root:[ 55%] Linking C static library …/lib/libcmsis-dsp.a

INFO:root:[ 55%] Built target cmsis-dsp

INFO:root:make: *** [Makefile:146: all] Error 2

the last lines

I have checked the prerequisites.

Thank you for your reply!

INFO:root:/bin/sh: 1: Syntax error: “(” unexpected

INFO:root:make[2]: *** [CMakeFiles/tensorflow_build.dir/build.make:71: CMakeFiles/tensorflow_build] Error 2

INFO:root:make[1]: *** [CMakeFiles/Makefile2:537: CMakeFiles/tensorflow_build.dir/all] Error 2

INFO:root:make[1]: *** Waiting for unfinished jobs…

Some errors in the log

The issue is similar to the one raised here: Build error in CMakeFiles/tensorflow_build - #9 by kshitij-sisodia-arm
The problem there was that the PATH variable in WSL2 environment contained some Windows’ mounted directories that had spaces and “(” characters - like “Program Files (x86)”. Can you share what’s there in your PATH please ($ echo $PATH)?

If there are any Windows directories, can you please remove them and then try the build again?

I am new to Linux so I am not sure that you asked this information.

/home/parksean210/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/mnt/c/Program Files/Microsoft MPI/Bin/:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/d/Program Files/MATLAB/R2022a/bin:/mnt/c/Program Files/MATLAB/R2020b/runtime/win64:/mnt/c/Program Files/MATLAB/R2020b/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/mingw64/bin:/mnt/c/Users/sean210.park/AppData/Local/Programs/Python/Python311/Scripts/:/mnt/c/Users/sean210.park/AppData/Local/Programs/Python/Python311/:/mnt/c/Users/sean210.park/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/JetBrains/PyCharm Community Edition 2022.2/bin:/mnt/c/Program Files/JetBrains/DataSpell 2021.3.2/bin:/mnt/c/Users/sean210.park/AppData/Local/Programs/Python/Python39/Scripts:/mnt/c/Users/sean210.park/AppData/Local/Programs/MiKTeX/miktex/bin/x64/:/mnt/c/Users/sean210.park/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/opt/gcc-arm-none-eabi/bin:/opt/gcc-arm-none-eabi/bin:/opt/gcc-arm-none-eabi/bin:/opt/gcc-arm-none-eabi/bin:/mnt/c/Users/sean210.park/AppData/Local/Programs/Microsoft VS Code/bin:/.local/node:/opt/gcc-arm-none-eabi/bin

Thank you!

Do you mean I have to remove every /mnt/…

Is that right?

This will cause an issue with the build. Can you please set the PATH without any “(” or space characters? Other option is to escape all of them, but I don’t think you need any of them anyway.

For example:

$ PATH=/home/parksean210/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib::/snap/bin:/opt/gcc-arm-none-eabi/bin:/.local/node

should be sufficient.

This was helpful! :slight_smile:

and You are my life saver.

Thank you :slight_smile:

No worries @Sooyeon, glad to know it was helpful - I will mark this issue as closed :slight_smile:.