Git Product home page Git Product logo

Comments (7)

Emilgardis avatar Emilgardis commented on May 18, 2024 1

this should solve your issue. See also the wiki

# Cross.toml
[target.aarch64-unknown-linux-gnu]
pre-build = [
    "dpkg --add-architecture $CROSS_DEB_ARCH",
    "apt-get update && apt-get install --assume-yes ",
    "apt-get update && apt-get install -y pkg-config libudev-dev:$CROSS_DEB_ARCH"
]

from cross.

NobodyXu avatar NobodyXu commented on May 18, 2024

You need to install libudev inside the container for aarch64 using pre-exec hooks.

from cross.

Danvil avatar Danvil commented on May 18, 2024

@Emilgardis I tried the suggested solution, but now cross build seems to hang forever on the command line.

Previously a build would print:

PS I:\myproj> cross build --release -p myapp --target=aarch64-unknown-linux-gnu
workspace: /project/Cargo.toml
   Compiling libc v0.2.147
   ...

With the Cross.toml file above it now hangs at:

PS I:\myproj> cross build --release -p myapp --target=aarch64-unknown-linux-gnu

without further progress and with casual CPU consumption between 5% - 10%.

from cross.

Emilgardis avatar Emilgardis commented on May 18, 2024

Add -v to the command to see what its doing, i suspect its docker buildx that is stalling

from cross.

Danvil avatar Danvil commented on May 18, 2024

Here is the console output with -v:

PS I:\myproj> cross build --release -p myapp --target=aarch64-unknown-linux-gnu -v
+ cargo metadata --format-version 1 --filter-platform aarch64-unknown-linux-gnu
+ rustc --print sysroot
+ rustup toolchain list
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ "C:\Program Files\RedHat\Podman\podman.exe"
+ "I:\\myproj" "C:\Program Files\RedHat\Podman\podman.exe" build --label 'org.cross-rs.for-cross-target=aarch64-unknown-linux-gnu' --label 'org.cross-rs.workspace_root=I:\myproj' --tag cross-custom-myproj:aarch64-unknown-linux-gnu-207c1-pre-build --build-arg 'CROSS_CMD=dpkg --add-architecture $CROSS_DEB_ARCH
apt-get update && apt-get install -y pkg-config libudev-dev:$CROSS_DEB_ARCH' --build-arg 'CROSS_DEB_ARCH=arm64' --file 'I:\myproj\target\aarch64-unknown-linux-gnu\Dockerfile.aarch64-unknown-linux-gnu-custom' 'I:\myproj'

It seems to hang at the install command.

I tried to play around with it a little. Basically any command, even ls -l, will make it hang. If the list of commands is empty it proceeds.

from cross.

Danvil avatar Danvil commented on May 18, 2024

As an additional comment the solution does work under Linux. So this seems to be a Windows specific problem.

from cross.

Danvil avatar Danvil commented on May 18, 2024

As this seems to be a different problem now I filed a new issue for it: #1303

Thank you for the help here!

from cross.

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.