Repository navigation
build: feature options, and JNI headers and JDK paths by option - #415
Merged
Merged
Conversation
A packager could not say what a4l is built with. Every optional part was built if pkg-config found its dependency, jni.h came from the JDK of whichever `java` was on PATH, and that JDK's javac and libjvm.so paths were written into the executable. A Yocto recipe faked a JDK, edited acl_config.h and pointed ACL_AOSP_ROOT at nothing. - Fourteen feature options, one per optional part: wayland, skia, vulkan, gl, dmabuf_codec, gstreamer, ffmpeg, drm_cxx, alsa, pipewire, libcamera, sdbus, secret, crypto. auto is the behavior until now; enabled makes a missing dependency a configure error; disabled leaves the part out. - -Djni_include=<dir> gives jni.h, and no JDK is looked for. - -Djavac= and -Dlibjvm= set the paths recorded for --vm=jvm. - -Dandroid_jar=none looks in no AOSP checkout. - sdbus-c++ is asked for at 2.0.0 or later, which the code needs. A build with no jni.h never compiled: the service bridges include it. That is now a configure error and not a compile failure. Three unit-test helpers are unused without libcrypto and are marked so; the all-disabled build then has no warning. Tested, x86-64: - Default configure: the same parts and messages as before. Builds with no warning; suite 134 of 135. browser-tab fails, and fails the same way on a build from before this change: the host's desktop portal does not answer on this machine today. - -Djni_include, -Dlibjvm=libjvm.so, -Dandroid_jar=none, -O2, plain: builds with no warning; the executable holds no JDK, AOSP or build directory path. - All fourteen disabled: configures, builds, runs. - enabled with the dependency missing (skia, vulkan without skia, a jni_include with no jni.h): configure errors that name the cause. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A packager could not say what a4l is built with. Every optional part was built if pkg-config found its dependency,
jni.hcame from the JDK of whicheverjavawas onPATH, and that JDK'sjavacandlibjvm.sopaths were written into the executable. A Yocto recipe had to fake a JDK, editacl_config.hand pointACL_AOSP_ROOTat nothing.wayland,skia,vulkan,gl,dmabuf_codec,gstreamer,ffmpeg,drm_cxx,alsa,pipewire,libcamera,sdbus,secret,crypto.autois the behavior until now;enabledmakes a missing dependency a configure error;disabledleaves the part out.-Djni_include=<dir>givesjni.h, and no JDK is looked for.-Djavac=and-Dlibjvm=set the paths recorded for--vm=jvm.-Dandroid_jar=nonelooks in no AOSP checkout.A build with no
jni.hnever compiled: the service bridges include it. That is now a configure error and not a compile failure, so there is nojnion/off option.The
/mnt/dev/aospdefault forACL_AOSP_ROOTis unchanged.Test status (x86-64)
-Djni_include,-Dlibjvm=libjvm.so,-Dandroid_jar=none,-O2, plainenabledwith the dependency missingThe suite failure is
browser-tab. It fails the same way on a build from before this change: the host's desktop portal does not answer on the test machine today.Not tested: a cross build with these options, and each option alone set to
enabledon a machine that has its dependency.