Code Monkey home page Code Monkey logo

Comments (6)

khvzak avatar khvzak commented on August 16, 2024

Could you please provide more detailed steps how to reproduce the issue?
It works perfect for me on any OS and below I provided detailed steps using docker and latest ubuntu official image:

$ docker run -it ubuntu:latest

# Setup environment
$ apt-get update
$ apt-get install -y --no-install-recommends git curl ca-certificates build-essential file gcc-aarch64-linux-gnu libc6-dev-arm64-cross 
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
$ rustup target add aarch64-unknown-linux-gnu
$ echo '[target.aarch64-unknown-linux-gnu]' >> ~/.cargo/config
$ echo 'linker = "aarch64-linux-gnu-gcc"' >> ~/.cargo/config

# Create a new project
$ USER=root cargo new --bin hello
$ cd hello
$ echo 'mlua = { version = "0.5", features = ["luajit", "vendored"] }' >> Cargo.toml
$ echo 'fn main() { let _lua = mlua::Lua::new(); }' > src/main.rs
$ cargo build --target aarch64-unknown-linux-gnu 
$ file ./target/aarch64-unknown-linux-gnu/debug/hello
target/aarch64-unknown-linux-gnu/debug/hello: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=695fc23b0044e39b55ac3046e62834cf3cfa8e55, for GNU/Linux 3.7.0, with debug_info, not stripped

from mlua.

Absolucy avatar Absolucy commented on August 16, 2024

I'm using cross build --target aarch64-unknown-linux-gnu, which should pretty much be the same thing as what you're doing... But I get the error? Weird.

from mlua.

khvzak avatar khvzak commented on August 16, 2024

What cross environment you have? OS? Could you provide steps to reproduce the issue inside a docker container?

from mlua.

Absolucy avatar Absolucy commented on August 16, 2024

@khvzak cross does use a docker container based on Ubuntu: https://github.com/rust-embedded/cross/blob/master/docker/Dockerfile.aarch64-unknown-linux-gnu

I also get the same error on my Arch Linux host.

from mlua.

khvzak avatar khvzak commented on August 16, 2024

I've just realized that you refer to this cross tool that I never used.

Please update the aarch64 Dockerfile to use FROM: ubuntu:20.04 and then use your custom image in Cross.toml config.

I can confirm that LuaJIT static cross-compilation does not work on ubuntu 16.04, but works on ubuntu 20.04.
(please run cargo clean after changing image)

from mlua.

Absolucy avatar Absolucy commented on August 16, 2024

Yeah, this is on cross's side, sorry.

from mlua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.