Skip to content

Cross-compiling failing under Ubuntu 24.04 #39

@mooraby

Description

@mooraby

Building with the toolchain CMake file provided in the documents I encountered a couple of problems:

1- Since Ubuntu 24.04 is shipped with Python3.12 , and although it is stated in the toolchain file that the Python library 3.10 should be used from the provided sysroot (Maybe not enough?), the following error occurs:

CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES
  Development Development.Module Development.Embed) (found version "3.12.3")
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindPython/Support.cmake:3862 (find_package_handle_standard_args)
  /usr/share/cmake-3.28/Modules/FindPython3.cmake:545 (include)
  everest-workspace/everest-cmake/python-virtualenv.cmake:16 (find_package)
  everest-workspace/everest-cmake/python-virtualenv.cmake:137 (ev_create_python_venv)
  everest-workspace/everest-core/CMakeLists.txt:67 (ev_setup_python_executable)

A workaround is to manually install the Python3.10 packages and create a virtual environment using this version.

2- After fixing the previous error, following error occurs during compiling (might be related to glibc conflict between sysroot and host?)

/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: ../_deps/everest-framework-build/lib/libframework.so.0.23.1: undefined reference to `__isoc23_strtoul'
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: ../_deps/everest-framework-build/lib/libframework.so.0.23.1: undefined reference to `__isoc23_strtol'
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: ../_deps/everest-framework-build/lib/libframework.so.0.23.1: undefined reference to `__isoc23_strtoull'
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: ../_deps/everest-framework-build/lib/libframework.so.0.23.1: undefined reference to `__isoc23_strtoll' 

Ubuntu 24.04 defaults:
Python 3.12.3
g++ / gcc version 13
cmake 3.28
glibc 2.39

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions