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 #159

Open
johncharris opened this issue Feb 3, 2023 · 2 comments
Open

Unable to Cross Compile #159

johncharris opened this issue Feb 3, 2023 · 2 comments
Labels
arm64 Topics to support arm64 target cross-building Topics to support cross-building

Comments

@johncharris
Copy link

I am unable to cross compile my application. I get an error saying Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory

This file should exist:

ls -lh /home/john/ubuntu-sysroot/lib/ld-linux-aarch64.so.1 
lrwxrwxrwx 1 root root 39 Jul  6  2022 /home/john/ubuntu-sysroot/lib/ld-linux-aarch64.so.1 -> aarch64-linux-gnu/ld-linux-aarch64.so.1

I started the build with the command:
flutter-elinux build elinux --target-arch=arm64 --target-compiler-triple=aarch64-linux-gnu --target-sysroot=/home/john/ubuntu-sysroot/

Extended Output:

Failed to cmake:
-- The CXX compiler identification is Clang 14.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ - broken
-- Configuring incomplete, errors occurred!
See also "/home/john/ioxstreams/iox_streams/build/elinux/arm64/release/CMakeFiles/CMakeOutput.log".
See also "/home/john/ioxstreams/iox_streams/build/elinux/arm64/release/CMakeFiles/CMakeError.log".

CMake Error at /snap/cmake/1216/share/cmake-3.25/Modules/CMakeTestCXXCompiler.cmake:63 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/john/ioxstreams/iox_streams/build/elinux/arm64/release/CMakeFiles/CMakeScratch/TryCompile-LsP2HP

    Run Build Command(s):/home/john/ubuntu-sysroot/usr/bin/gmake -f Makefile cmTC_453fa/fast && aarch64-binfmt-P: Could not open '/lib/ld-linux-aarch64.so.1': No such file or
    directory
@HidenoriMatsubayashi
Copy link
Collaborator

Can you install binutils-aarch64-linu-gnu on Host?

sudo apt install binutils-aarch64-linux-gnu

@johncharris
Copy link
Author

johncharris commented Feb 6, 2023

I have that package. The system is looking for /lib/ld-linux.so.1 while I have /lib/ld-linux.so.2

@HidenoriMatsubayashi HidenoriMatsubayashi added arm64 Topics to support arm64 target cross-building Topics to support cross-building labels Feb 7, 2023
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 cross-building Topics to support cross-building
Projects
None yet
Development

No branches or pull requests

2 participants