Git Product home page Git Product logo

Comments (6)

jedisct1 avatar jedisct1 commented on May 28, 2024 1

Everything seems to be fine in CI:

android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update packages list
run: sudo apt-get update
- name: Install base dependencies
run: sudo apt-get install -y libtool autoconf automake unzip
- name: Autogen
run: ./autogen.sh -s
- name: Install Android NDK
run: |
mkdir /tmp/android && cd /tmp/android
curl -o ndk.zip -L https://dl.google.com/android/repository/android-ndk-r25b-linux.zip
unzip ndk.zip && rm -f *.zip && mv android-ndk* ndk
- name: Android compilation
run: |
env ANDROID_NDK_HOME=/tmp/android/ndk ./dist-build/android-aar.sh

https://github.com/jedisct1/libsodium/actions/runs/4009408847/jobs/6884725366

Are you using the same NDK version? (r25b)

from libsodium.

ReenigneCA avatar ReenigneCA commented on May 28, 2024 1

I just successfully compiled the armv7 version on an x86-64 macbook pro using the latest from git and the latest ndk (25.1.8937393 which I believe is the same as r25b). @cmonfortep please confirm you are also using the latest from git and the latest ndk. Also do you maybe have more than one ndk installed or alternatively have you modified the ndk in anyway or done anything that could have done so? My best guess is a corrupted ndk if you haven't deliberately changed it try uninstalling and reinstalling the ndk and see if the issue is fixed.

from libsodium.

jedisct1 avatar jedisct1 commented on May 28, 2024

/cc @ReenigneCA

from libsodium.

cmonfortep avatar cmonfortep commented on May 28, 2024

Thanks for the quick response.
The latest version of git, yes. But an old version of ndk (21.4.7075529, we use that version to compile other internal c libraries). I've just downloaded ndk version 25 and I confirm it works.

So that confirms the issue is the ndk version I was using. I will need to check with the team if we can bump ndk version. Are you aware of why using ndk 25 fixes it?

from libsodium.

ReenigneCA avatar ReenigneCA commented on May 28, 2024

The quick answer is that the toolchain was before the current aar script was written so it was never tested against. I'm more surprised that any of the scripts work to be honest the old libsodium scripts used to create toolchains for each platform, which was the legacy approach to the ndk (it was pretty crazy you'd have a huge toolchain directory structure created for each version of each thing you'd compile). Looking at the ndk changelog it appears that the version you're using was a transitional version between the old and new approaches:

"The legacy toolchain install paths will be removed over the coming releases. These paths have been obsolete since NDK r19 and take up a considerable amount of space in the NDK. The paths being removed are"

So I'd guess that some important files moved around in the process or maybe even were added or renamed or something. It is likely possible to get it working either by modifying some flags in the current scripts or going back to the previous versions of the scripts and modifying them to work with the script that packs the outputs into the AAR. The old build scripts are still bundled in the stable release on the libsodium site.

from libsodium.

cmonfortep avatar cmonfortep commented on May 28, 2024

Thanks for the explanation @ReenigneCA 👍

from libsodium.

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.