sony / flutter-elinux

Flutter tools for embedded Linux (eLinux)
BSD 3-Clause "New" or "Revised" License
445 stars 44 forks source link

Unable to cross compile with Yocto SDK #245

Open voloder opened 7 months ago

voloder commented 7 months ago

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:

Any help would be appreciated, thank you!

HidenoriMatsubayashi commented 7 months ago

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

voloder commented 7 months ago

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 commented 6 months ago

@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 commented 6 months ago

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

I think it is clang with hardfp issue.