I am trying to compile the qt6 for embedded linux (arm). I set the following configuration:
- Cmake : 3.22.1
- Toolchain: cc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf
- path to my rootfs: /home/manra/rootfs/mysysroot
- my toolchain.make
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(TARGET_SYSROOT /home/manra/rootfs/perospheresysroot)
set(CROSS_COMPILER /home/manra/toolchain8/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf)
#set(CROSS_COMPILER /home/manra/toolchain9/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf)
# specify the cross compiler
set(CMAKE_C_COMPILER ${CROSS_COMPILER}/bin/arm-none-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER ${CROSS_COMPILER}/bin/arm-none-linux-gnueabihf-g++)
#set(CMAKE_LIBRARY_PATH /home/manra/rootfs/mysysroot/usr/lib/arm-linux-gnueabihf)
set(CMAKE_LIBRARY_PATH /home/manra/rootfs/mysysroot)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH ${TARGET_SYSROOT})
set(CMAKE_SYSROOT ${TARGET_SYSROOT})
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
- The configuration line used
./configure -confirm-license -commercial -prefix /usr/local/qt6 -extprefix ~/imx6/qt6 -device linux-imx6-g++ -sysroot ~/rootfs/perospheresysroot -nomake examples -nomake tests -skip webkit -skip assistant-webkit -skip qtwebengine -skip qt3d -skip qtwayland -skip qtandroidextras -skip qtcanvas3d -- -DCMAKE_TOOLCHAIN_FILE=/home/manra/qt6/qt5/toolchain.cmake -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON
The problem: When I try to build, the object files that are part of the rootfs are not found.
arm-none-linux-gnueabihf/bin/ld: cannot find **crt1.o: No such file or directory**
However, looking to one of the subdirectories of my rootfs the crt1.o is there:
''' find . -name crt1.o ./usr/lib/arm-linux-gnueabihf/crt1.o '''
I also tried to add the full directory path to "LIBRARY" path without success. I really do not know what is wrong.