I am trying to build zephyr sample code that is meant for board A for board B (i.e. build was written for code A but I need to change it so that it works with board B). I keep coming across this error and I am not sure how to get past it. I have replaced the /board, /soc, and /dts subfolders with appropriate files for my board. I changed the Makefile to target my board and it is successfully finding it.
This is the error:
cmake -B build -DBOARD=my_project_name ./
-- Using out-of-tree SOC definition
-- Zephyr version: 2.2.0
-- Found PythonInterp: /opt/homebrew/bin/python3.6 (found suitable version "3.6.2", minimum required is "3.6")
-- git describe failed: fatal: Not a git repository (or any of the parent directories): .git;
BUILD_VERSION is left undefined
-- Selected BOARD my_project_name
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.6.0")
-- Loading /Users/my_name/file_dir/Firmware/projects/my_project_name/boards/arm/my_project_name/my_project_name.dts as base
Devicetree header saved to '/Users/my_name/file_dir/Firmware/projects/my_project_name/build/zephyr/include/generated/devicetree_unfixed.h'
Parsing /Users/my_name/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/Kconfig
Loaded configuration '/Users/my_name/file_dir/Firmware/projects/my_project_name/boards/arm/my_project_name/my_project_name_defconfig'
Merged configuration '/Users/my_name/file_dir/Firmware/projects/my_project_name/prj.conf'
Configuration saved to '/Users/my_name/file_dir/Firmware/projects/my_project_name/build/zephyr/.config'
Kconfig header saved to '/Users/my_name/file_dir/Firmware/projects/my_project_name/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /Users/my_name/file_dir/third-party/toolchains/gcc-arm-none-eabi-8-2018/arm-gcc-macos/bin/arm-none-eabi-gcc
-- Cache files will be written to: /Users/my_name/Library/Caches/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/my_name/file_dir/Firmware/projects/my_project_name/build
make -C build
Scanning dependencies of target driver_validation_h_target
[ 1%] Generating include/generated/driver-validation.h
[ 1%] Built target driver_validation_h_target
Scanning dependencies of target kobj_types_h_target
[ 2%] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h
[ 2%] Built target kobj_types_h_target
Scanning dependencies of target syscall_list_h_target
[ 2%] Generating misc/generated/syscalls.json
[ 3%] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
[ 5%] Built target syscall_list_h_target
Scanning dependencies of target offsets
[ 6%] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
In file included from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/include/aarch32/cortex_m/stack.h:23,
from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/include/kernel_arch_data.h:33,
from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/core/offsets/offsets_aarch32.c:26,
from /Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/arch/arm/core/offsets/offsets.c:12:
/Users/my_name/file_dir/third-party/zephyr/zephyr_rtos/v2.2.0/zephyr/include/arch/arm/aarch32/cortex_m/cmsis.h:92:2: error: #error "DT_NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value."
#error "DT_NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value."
^~~~~
make[3]: *** [zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj] Error 1
make[2]: *** [zephyr/CMakeFiles/offsets.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [zephyr_project] Error 2
I have already checked to make sure that soc.h has #include <devicetree.h>. I'm not sure what else I can try now so any help is appreciated. Thanks!
Found the solution: I had to add dts_fixup.h to the bottom of my soc folder.
Related
im using Peppermint 10 an ubuntu based distro
so i did the following commands here and everything went well until this
(the input)
cmake -DBUILD_SHARED_LIBS=ON ..
(the output)
-- Testing if -Werror=pointer-arith can be used -- compiles
-- Testing if -Werror=implicit-function-declaration can be used -- compiles
-- Testing if -fno-strict-aliasing can be used -- compiles
-- Using raylib's GLFW
-- Using X11 for window creation
-- Audio Backend: miniaudio
-- Building raylib shared library
-- Generated build type: Debug
-- Compiling with the flags:
-- PLATFORM=PLATFORM_DESKTOP
-- GRAPHICS=GRAPHICS_API_OPENGL_33
-- Building examples is enabled
-- Testing if -std=c11 can be used -- compiles
-- Configuring done
CMake Error at src/CMakeLists.txt:57 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:glfw>
Objects of target "glfw" referenced but is not an OBJECT library.
CMake Error: CMake can not determine linker language for target: raylib
CMake Error: Cannot determine link language for target "raylib".
-- Generating done
-- Build files have been written to: /home/anas/raylib/build
how do i even fix these cmake errors?
but then i ignored these thought it was normal but when i tried to do the following command
(the command aka the input)
make
(the output)
[ 7%] Built target glfw
make[2]: *** No rule to make target 'raylib/CMakeFiles/raylib.dir/build'. Stop.
CMakeFiles/Makefile2:87: recipe for target 'raylib/CMakeFiles/raylib.dir/all' failed
make[1]: *** [raylib/CMakeFiles/raylib.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
it shows the same thing when i try sudo make install
help
i still dont know what is the problem here
btw im following the wiki here
Do this:
sudo apt install g++
sudo apt install cmake (should be in version 3.11 or higher)
download to your project folder ex. 'new-game' folder those three files from https://github.com/RobLoach/raylib-cpp/tree/master/projects/CMake (main.cpp, README.md, CMakeLists.txt)
then cd new-game && mkdir build && cd build && cmake .. && make
run ./raylib-cpp-example
i have tried to compline a repository via "https://github.com/giglio0/DRAGON-G4-LaBr3.git" but while the compiling, i have taken a error. I don't Know why it is? i am not a coder. Just i want to build this repository and run the simulation with changing some parameters. The error output is;
Scanning dependencies of target LaBr3_v4
[ 9%] Building CXX object CMakeFiles/LaBr3_v4.dir/LaBr3_v4.cc.o
[ 18%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/DetectorConstruction.cc.o
[ 27%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/DetectorMessenger.cc.o
[ 36%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/EventAction.cc.o
[ 45%] Building CXX object CMakeFiles/LaBr3_v4.dir/src/HistoManager.cc.o
/home/cancan/Gatev9/example_Geant4/LaBr/LaBr3/src/HistoManager.cc:29:10: fatal error: TH1D.h: No such file or directory
29 | #include <TH1D.h>
| ^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/LaBr3_v4.dir/build.make:134: CMakeFiles/LaBr3_v4.dir/src/HistoManager.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/LaBr3_v4.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
can anybody help me?
Apparently you need to install the ROOT library, see: https://root.cern.ch/doc/master/classTH1.html
BTW, the READ.me of the application you want to compile, DRAGON-G4-LaBr3, is awful.
After your advice, i install root-6.22.06 again with use this command;
cmake -DCMAKE_INSTALL_PREFIX=/home/cancan/Gatev9/root-6.22.06-install /home/cancan/Gatev9/root-6.22.06 -Dall=ON
i learned from somewhere if i use "-Dall=ON", i can install all libraries of root but it has not still worked.
I faced an issue when i try to generate CodeLite using CMake. I encountered it during 'make -j4' step. it shows "Conversion to non-scalar type is requested".
'''
[ 68%] Built target codelitephp
[ 68%] Built target codelite-make
[ 69%] Built target codelite-terminal
[ 83%] Built target wxCrafter
[ 83%] [ 83%] [ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilerMainPage.cpp.o
Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersFoundDlgBase.cpp.o
Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersFoundDlg.cpp.o
[ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersFoundDlg_liteeditor_bitmaps.cpp.o
[ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/CompilersModifiedDlg.cpp.o
/home/osboxes/Desktop/codelite-13.0/LiteEditor/CompilerMainPage.cpp: In member function ‘void CompilerMainPage::InitializeTools()’:
/home/osboxes/Desktop/codelite-13.0/LiteEditor/CompilerMainPage.cpp:543:76: error: conversion from ‘wxPGIterator<wxPGProperty,wxPropertyGridPageState>’ to non-scalar type ‘wxPGIterator<const wxPGProperty,const wxPropertyGridPageState>’ requested
wxPropertyGridConstIterator iter = m_pgMgrTools->GetGrid()->GetIterator();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
[ 83%] Building CXX object LiteEditor/CMakeFiles/codelite.dir/ConfigManagerBaseDlg.cpp.o
make[2]: *** [LiteEditor/CMakeFiles/codelite.dir/CompilerMainPage.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [LiteEditor/CMakeFiles/codelite.dir/all] Error 2
make: *** [all] Error 2
'''
Anyone can help me resolve the issue? I followed this GitHub link. It seems like there might be something wrong with the 'cmake' step. Greatly appreciate it if anyone can help me solve it!
This problem doesn't seem to be related to CMAKE rather than to the actual compilation.
I don't know the library personally but as far as I can tell from the wiki page you shared, it seems maybe those instructions might be outdated because it's dated from 2018 but there's recent changes in the library.
I would check the dependencies versions to see if they match with the one that the maintainer specifies in the README.md
I had similar problem when trying to compile CodeLite 13 on CentOS 7.6 clone OS. Manage to solve it by replacing following code string on line 543 of CompilerMainPage.cpp file,
located in "LiteEditor" subfolder:
wxPropertyGridConstIterator iter = m_pgMgrTools->GetGrid()->GetIterator();
by following code statement:
const wxPropertyGrid* pgrid = m_pgMgrTools->GetGrid();
wxPropertyGridConstIterator iter = pgrid->GetIterator();
Save that file and repeat compilation. In my case issue was solved and I could use now CodeLite 13 for my development projects (unfortunately CodeLite not available in rpm format for CentOS 7.x)
Cmake 3.15 32-bit
Assimp 4.1.0
Hi there, I'm experiencing some difficulties with cmake and assimp. For the past few days I have been trying to generate an assimp workspace for CodeBlocks via cmake.
I have tried to generate a solution with CMD and CmakeGUI approach but without satisfying results.
In GUI standard procedure for generating projects was followed by defining proper source and target paths and choosing appropriate generators (CodeBlocks MinGW Makefiles).
Code used in cmd for generating assimp project:
cmake -G "CodeBlocks - MinGW Makefiles" MakeLists.txt -S "source path" -B "build path"
Info log that I get after generating files:
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Shared libraries enabled
-- Looking for DirectX...
-- DirectX_PREFIX_PATH changed.
-- Found DirectX: C:/MinGW/lib/libd3d9.a
-- DX lib dir: C:/MinGW/lib
-- Looking for ZLIB...
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could not locate ZLIB
-- compiling zlib from souces
CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:8 (cmake_policy):
The OLD behavior for policy CMP0048 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- 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 off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find rt (missing: RT_LIBRARY)
INFO RT-extension not found. glTF import/export will be built without Open3DGC-compression.
-- Enabled formats: AMF 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD
-- Disabled formats:
-- Could NOT find IL (missing: IL_LIBRARIES IL_INCLUDE_DIR)
CMake Warning at CMakeLists.txt:439 (MESSAGE):
Build of assimp_qt_viewer is disabled. Unsatisfied dendencies: Qt5 DevIL
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Assimp
Unfortunately the project fails to build in CodeBlocks with the following build log:
Checking if target is up-to-date: mingw32-make.exe -q -f Makefile all
Running command: C:/TDM-GCC-64/bin/mingw32-make.exe -f "E:/Assimp/Makefile" VERBOSE=1 all
"C:\Program Files\CMake\bin\cmake.exe" -SC:\Users\ognje\Downloads\assimp-4.1.0 -B"E:\Assimp" --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start "E:\Assimp\CMakeFiles" "E:\Assimp\CMakeFiles\progress.marks"
C:/TDM-GCC-64/bin/mingw32-make.exe -f CMakeFiles\Makefile2 all
mingw32-make.exe[1]: Entering directory 'E:/Assimp'
C:/TDM-GCC-64/bin/mingw32-make.exe -f contrib\zlib\CMakeFiles\zlib.dir\build.make contrib/zlib/CMakeFiles/zlib.dir/depend
mingw32-make.exe[2]: Entering directory 'E:/Assimp'
[ 1%] Generating zlib1rc.obj
cd /d E:\PROGRA~3\PROGRA~1\Assimp\contrib\zlib && C:\MinGW\bin\windres.exe -D GCC_WINDRES -I C:/Users/ognje/Downloads/assimp-4.1.0/contrib/zlib -I "E:/Assimp/contrib/zlib" -o "E:/Assimp/contrib/zlib/zlib1rc.obj" -i C:/Users/ognje/Downloads/assimp-4.1.0/contrib/zlib/win32/zlib1.rc
gcc: error: i\: No such file or directory
gcc: error: Assimp/contrib/zlib: No such file or directory
C:\MinGW\bin\windres.exe: preprocessing failed.
mingw32-make.exe[2]: *** [contrib/zlib/zlib1rc.obj] Error 1
mingw32-make.exe[1]: *** [contrib/zlib/CMakeFiles/zlib.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
contrib\zlib\CMakeFiles\zlib.dir\build.make:60: recipe for target 'contrib/zlib/zlib1rc.obj' failed
mingw32-make.exe[2]: Leaving directory 'E:/Assimp'
CMakeFiles\Makefile2:134: recipe for target 'contrib/zlib/CMakeFiles/zlib.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'E:/Assimp'
E:/Assimp/Makefile:128: recipe for target 'all' failed
Process terminated with status 2 (0 minute(s), 0 second(s))
6 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Disclaimer:
Naturally I've already googled and tried all of the already existing solutions on the web [1] for this particular problem and disappointingly none of them work. I don't know much about compiling and libraries to be honest but in my opinion when reading the error logs I would say that the problem stems from zlib files, right? Can anyone help me with this problem? Thank you in advance.
The issue is caused by a wrong detected environment. The zlib-script tries to use the following option for the windows-resource-build:
C:\MinGW\bin\windres.exe -D GCC_WINDRES -I C:/Users/ognje/Downloads/assimp-4.1.0/contrib/zlib -I "E:/Assimp/contrib/zlib" -o "E:/Assimp/contrib/zlib/zlib1rc.obj" -i C:/Users/ognje/Downloads/assimp-4.1.0/contrib/zlib/win32/zlib1.rc
The option -i will be identified as a file-token:
gcc: error: i\: No such file or directory
And so the build for zlib failes because the option, which was used as an argument confuses the gcc-parsing of the following stuff, in this case the target zlib:
gcc: error: Assimp/contrib/zlib: No such file or directory
I guess this is caused by a missing identification which code has to be build when using your special version of mingw. Could you please open an issue report with the veYOu can do rsion of assimp you are using and which gcc-version is used in your build. You can do this here: Issue-tracker of Asset-Importer-Lib Project
I am writing, because I have a problem with the installation of lama and therein the compilation of CUDA. I followed the tutorial on this page
http://libama.sourceforge.net/doc/d5/de9/page_linuxinstallation.html
and the command "make" gives me the following error:
[Kraut#Wzmbx001 build44]$ make
Scanning dependencies of target log4lama
[ 0%] Building CXX object logging/CMakeFiles/log4lama.dir/GenLogger.cpp.o
[ 1%] Building CXX object logging/CMakeFiles/log4lama.dir/GenLoggerCreator.cpp.o
[ 1%] Building CXX object logging/CMakeFiles/log4lama.dir/Level.cpp.o
[ 2%] Building CXX object logging/CMakeFiles/log4lama.dir/Logger.cpp.o
[ 2%] Building CXX object logging/CMakeFiles/log4lama.dir/LoggerProvider.cpp.o
[ 3%] Building CXX object logging/CMakeFiles/log4lama.dir/SourceLocation.cpp.o
Linking CXX shared library liblog4lama.so
[ 3%] Built target log4lama
[ 3%] Building NVCC (Device) object lama/cuda/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_CUDACOOUtils.cu.o
nvcc fatal : Value 'sm_13' is not defined for option 'gpu-architecture'
CMake Error at cuda_compile_generated_CUDACOOUtils.cu.o.cmake:202 (message):
Error generating
/opt/OpenFOAM/lama/build44/lama/cuda/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_CUDACOOUtils.cu.o
make[2]: *** [lama/cuda/CMakeFiles/cuda_compile.dir/./cuda_compile_generated_CUDACOOUtils.cu.o] Error 1
make[1]: *** [lama/cuda/CMakeFiles/amacuda.dir/all] Error 2
make: *** [all] Error 2
I looked for solutions to this problem and found these three answers, which seem to be closest to my problem:
https://devtalk.nvidia.com/default/topic/762051/jetson-tk1/compile-issues/?offset=4#4786865
How can i tell PyCUDA which GPU to use?
http://sourceforge.net/p/viennacl/mailman/message/34316211/
In these threads it is mentioned, that one should change or comment out the "-arch=sm_13"-option in a "Makefile" or a file "~.cmake". However I have no idea where to find this file, where I can modify this option. Can anybody help and guide me to where this file is located?
The problem appears to be quite common, since this option refers to the gpu-architecture supported by CUDA. I have CUDA-7.5 on my system, so from searching for a solution to this issue I understand, that sm_13 is not supported anymore. So I hope changing this will solve this problem - Just need to know where!
It would appear that the supported architectures are defined here in CompilerFlags.cmake :
### choosing the right compute capability
### we just start from version 1.3 ( 1.0 - 1.2 is not supported )
LIST ( APPEND CC_CHOICES "13" "20" "21" "30" "35" )
set ( CUDA_COMPUTE_CAPABILITY "13" CACHE STRING "CUDA compute capability (supported up from 13)" )
set ( CACHE CUDA_COMPUTE_CAPABILITY PROPERTY STRINGS ${CC_CHOICES} )
checkValue( ${CUDA_COMPUTE_CAPABILITY} "${CC_CHOICES}" )
mark_as_advanced ( CUDA_COMPUTE_CAPABILITY )
modify those as required