Git Product home page Git Product logo

Comments (15)

atsushieno avatar atsushieno commented on July 30, 2024

I have created a reverting branch that uses Gradle 7.6 and AGP 7.4.2, and the problem still persists. There are workaround builds that resolves aap-core and aap-lv2 modules from git submodules, and they successfully builds. But aap-lv2-mda on GitHub Actions (e.g. this), unlike local builds on Android Studio, resulted in missing lv2 assets(!). The build system still blocks...

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

The same workaround is added in main branch in aap-lv2 and aap-lv2-mda i.e. their dependencies { ... } is full of implementation (project (...)) instead of module name artifacts. We will stick to that solution until we could get working builds...

We keep this issue open until then.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

The MavenLocal problem also seems to affect the new realtime preset setter implementation. It works well if androidaudioplugin-manager is resolved via project(...). Looks like it is caused by the same dependency resolution failure.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

When I tried to build the release version 0.2.8 (with aap-core 0.7.8, both without -pre), the revised version of aap-lv2 that resolves aap-core aars somehow broke aap-ayumi build because of missing libandroidaudioplugin-lv2.so(!)

Gradle and/or AGP with NDK support is such a wild field.

Fortunately, aap-lv2-mda effect plugins generate valid audio outputs from those MavenLocal .aars this time, I decided to go with MavenLocal for this release. The same issue would come back at any time so I leave this issue open.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

Actually the observation ^ was wrong, the audio resource resolution failure issue that occurs only with MavenLocal was never gone. We have to revert the change and find some viable solution (but how?? I have no idea at all).

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

It also prevents aap-lv2 package releases because Maven publication task results in publishing androidaudioplugin.aar and androidaudioplugin-manager.aar to Nexus OSSRH (because they are dependencies). I have no idea how many more problems Gradle will bring in by trying hard to fix/support it so I leave it as is.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

Now the same problem occurs in aap-juce apps. Sigh.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

This also affects testImplementation. So if a project has testImplementation(libs.aap.testing) it will also cause the problem. I had been stuck at aap-ayumi for a while due to this issue.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

After facing the same issue at ktmidi, I figured that it's not going to work because we cannot "publish" the dependency modules. Either we need to figure out how to exclude them or we need to fix this issue.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

I have bumped Gradle to 8.5 and AGP to 8.2.2, and the problem still persists.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

Same for Gradle 8.6-rc1 and AGP 8.4.0-alpha07.

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

Comparing androidaudioplugin-manager.aar from ~/.m2/repository/org/androidaudioplugin/androidaudioplugin-manager/0.8.0/, the native libraries are certainly different:

$  issue-174  ls -l working/lib/arm64-v8a
total 35600
-rw-r--r--  1 atsushi  staff    75584 Jan  1  1981 libaapbarebonepluginsample.so
-rw-r--r--  1 atsushi  staff  4381656 Jan  1  1981 libandroidaudioplugin-manager.so
-rw-r--r--  1 atsushi  staff  9321360 Jan  1  1981 libandroidaudioplugin.so
-rw-r--r--  1 atsushi  staff  1822720 Jan  1  1981 libc++_shared.so
-rw-r--r--  1 atsushi  staff  2620112 Jan  1  1981 liboboe.so
$  issue-174  ls -l problematic/lib/arm64-v8a 
total 16304
-rw-r--r--  1 atsushi  staff    75584 Jan  1  1981 libaapbarebonepluginsample.so
-rw-r--r--  1 atsushi  staff   442896 Jan  1  1981 libandroidaudioplugin-manager.so
-rw-r--r--  1 atsushi  staff  5716576 Jan  1  1981 libandroidaudioplugin.so
-rw-r--r--  1 atsushi  staff  1822720 Jan  1  1981 libc++_shared.so
-rw-r--r--  1 atsushi  staff   280128 Jan  1  1981 liboboe.so

Since they are already different at .aar level, dealing with native libs at app level would not make any difference. Yet, those options on androidaudioplugin-manager/build.gradle.kts did not matter:

  • packaging.jniLibs.keepDebugSymbols.add("**/*.so")
  • packaging.jniLibs.useLegacyPackaging = true

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

Here are what I found so far:

  • It is a matter of Release build. Debug build does not matter.
  • It seems caused by something in libandroidaudioplugin-manager.so being stripped.
  • It does not seem to be related to keepDebugSymbols in build.gradle.kts
    • the input library libandroidaudioplugin-manager.so is already stripped (explained later)
      • and it should not be a matter of "debug symbols"
    • AGP resolves those native libraries without stripping when we use implementation(project(...)). This smells like a bug, but does not matter this time
      • Release builds should respect our cxx compiler flags (explaned later), nonetheless.
    • It is not a Prefab issue, or any Gradle task around it (e.g. inflexible to be unable to add export_libraries options - it is true, but does not matter this time)
    • It is not an issue StripDebugSymbolsTask itself - the task seems working as expected in general
  • It is rather one or more CMake issues.
    • The problem is that no matter what arguments we pass to cmake section in build.gradle.kts, they cannot beat the optimization flagsCMAKE_BUILD_TYPE.
    • Neither CMAKE_CXX_FLAGS nor CMAKE_CXX_FLAGS_RELEASE works.
    • arguments("-DCMAKE_BUILD_TYPE=Debug") on release configuration makes it work again, but that means we are left not optimized on release builds, so it's better to avoid it

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

https://gitlab.kitware.com/cmake/cmake/-/issues/23378

from aap-core.

atsushieno avatar atsushieno commented on July 30, 2024

arguments("-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG") is not working, and arguments("-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g") is working, somehow.

We can go without -DNDEBUG.

from aap-core.

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.