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

Unable to cross compile with Yocto SDK #245

Open
voloder opened this issue Feb 24, 2024 · 4 comments
Open

Unable to cross compile with Yocto SDK #245

voloder opened this issue Feb 24, 2024 · 4 comments
Labels
arm64 Topics to support arm64 target question Further information is requested

Comments

@voloder
Copy link

voloder commented Feb 24, 2024

Hello, I am trying to compile using Variscite's Yocto toolchain, but I am getting the following errors:

.../elinux/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc:16:10: fatal error:
'cassert' file not found
#include <cassert>
         ^~~~~~~~~

/opt/fslc-framebuffer/4.0/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/include/gnu/stubs-32.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
# include <gnu/stubs-soft.h>
          ^~~~~~~~~~~~~~~~~~

Things I've done:

  • Added latest meta-flutter and meta-clang layers to the sdk
  • Bitbaked with -c populate_sdk
  • Installed SDK
  • Symlinked ld to the arm one
    sudo cp -a arm-fslc-linux-gnueabi/arm-fslc-linux-gnueabi-ld ld in /opt/fslc-framebuffer/4.0/sysroots/x86_64-fslcsdk-linux/usr/bin
  • Added the following to OEToolchainConfig.cmake in the SDK sysroot
set ( CMAKE_C_COMPILER_WORKS 1 )
set ( CMAKE_CXX_COMPILER_WORKS 1 )
  • Ran
flutter-elinux build elinux --target-arch=arm64 \
     --target-sysroot=/opt/fslc-framebuffer/4.0/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi \
     --target-backend-type=gbm

Any help would be appreciated, thank you!

@HidenoriMatsubayashi
Copy link
Collaborator

HidenoriMatsubayashi commented Feb 25, 2024

Are you using PNC (persuade) build with Yocto? If yes, I don't think you need to use --target-sysroot and --target-arch option.

@HidenoriMatsubayashi HidenoriMatsubayashi added question Further information is requested arm64 Topics to support arm64 target labels Feb 25, 2024
@voloder
Copy link
Author

voloder commented Feb 25, 2024

Are you using PNC (persuade) build with Yocto? If yes, I don't think you need to use --target-sysroot and --target-arch option.

Removed it, tried again, still happens. I am not sure what PNC is, could you elaborate?

@andreascian
Copy link

andreascian commented Mar 27, 2024

@voloder you're using a 32 bit cross-toolchain (and this is correct because DART-6UL uses an iMX6UL SOC, which has a Cortex-A7 core) but using --target-arch=arm64

usually, when building with a Yocto toolchain, you just have to setup the environment and:

 . /opt/yocto/sdk/desk-mx8m-l-4.0.0/environment-setup-armv8a-poky-linux
flutter-elinux build elinux --target-arch=arm64 --target-compiler-triple=aarch64-poky-linux-

I'm pretty new to flutter-elinux but it seems that aarch32 is NOT supported (see #141 )

@nguyenlkdn
Copy link

Refer https://bugs.llvm.org/show_bug.cgi?id=13796

I think it is clang with hardfp issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm64 Topics to support arm64 target question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants