Code Monkey home page Code Monkey logo

Comments (4)

fredszaq avatar fredszaq commented on July 16, 2024 1

Hi @torokati44 !

I had a chance to give it another look today, and in fact one of the problems is that dinghy is by default using api level 21 if you don't tell it which one to use. libnativewindow is only available starting api 29 from what I see in the ndk.

try passing --platform "auto-android-aarch64-api29" instead of --platform "auto-android-aarch64" and you won't have to pass the -L anymore

I stand by the fact that the -lnativewindow should be passed in the build.rs of the crate that is using the apis in this lib

from dinghy.

fredszaq avatar fredszaq commented on July 16, 2024

Hi @torokati44 I get quite a few errors when running a cargo dinghy -d android test in https://github.com/ruffle-rs/ruffle root dir... but I don't even get to linking.... what command are you using ?

From the workaround you have :

  • the link arg -lnativewindow makes me think something a build.rs somewhere in the dependencie is missing a println!("cargo:rustc-link-lib=nativewindow");
  • the -L you have to add is weird as I would expect the linker to properly find the sysroot...your're positive this is really needed ? If yes this may be something we may need to add into dinghy

from dinghy.

torokati44 avatar torokati44 commented on July 16, 2024

Right, sorry, the command I ran was:
RUSTFLAGS="-C link-args=-L$HOME/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/29/ -C link-args=-lnativewindow" cargo dinghy -d android --platform "auto-android-aarch64" test --package tests --features imgtests

The --platform "auto-android-aarch64 part might not have been necessary...
The --package tests --features imgtests part is important, because we have desktop- and web-specific tests that definitely won't work; and visual tests are not enabled by default.

Yeah the first thing I tried was exactly that line in build.rs, but for some reason it wasn't enough - perhaps only because then I haven't added the -L flag yet.

And yes, I too have expected the -L flag to not be necessary, but alas, the library was not found without it. I don't know why.

from dinghy.

torokati44 avatar torokati44 commented on July 16, 2024

I had a chance to give it another look today, and in fact one of the problems is that dinghy is by default using api level 21 if you don't tell it which one to use. libnativewindow is only available starting api 29 from what I see in the ndk.

Ah, I see...

try passing --platform "auto-android-aarch64-api29" instead of --platform "auto-android-aarch64" and you won't have to pass the -L anymore

Indeed, thank you!

I stand by the fact that the -lnativewindow should be passed in the build.rs of the crate that is using the apis in this lib

Yeah, that makes sense.

from dinghy.

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.