Niek
  • Joined on Oct 12, 2020
Loading Heatmap…

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

I tried adding: ```c++ SetCommandLineSwitchASCII(switches::kUseGL, gl::kGLImplementationDisabledName); ``` Unfortunately that leads to different errors: ``` 10-21 14:12:30.175 1001 1019 E chromium: [ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub 10-21 14:12:30.176 1001 1019 E chromium: [ERROR:gpu_channel_manager.cc(711)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. 10-21 14:12:30.180 1001 1019 E chromium: [ERROR:gpu_channel_manager.cc(711)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. ``` I'm trying to rebuild now with ``kGLImplementationSwiftShaderName`` instead.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

@redox yes that's what I'm doing now (see my Dockerfile), ideally we can have a Dockerfile with a couple of tags to build the appropriate APKs.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

Got an error almost at the end: ``` apkbuilder.py: error: argument --key-name: expected one argument ``` Do you know a workaround @wchen342?

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

Got stuck a little bit further in the process: ``` [24203/46511] CXX obj/gpu/config/config_sources/gpu_info_collector.o FAILED: obj/gpu/config/config_sources/gpu_info_collector.o ../../../../usr/bin/clang++ -MMD -MF obj/gpu/config/config_sources/gpu_info_collector.o.d -DOFFICIAL_BUILD -D_GNU_SOURCE -DANDROID -DHAVE_SYS_UIO_H -DANDROID_NDK_VERSION_ROLL=r20b_1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=375504 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGPU_IMPLEMENTATION -DWEBP_EXTERN=extern -DVK_USE_PLATFORM_ANDROID_KHR -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_USE_LIBGIFCODEC -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_BUILD_FOR_ANDROID -DUSE_CHROMIUM_SKIA -DVK_USE_PLATFORM_ANDROID_KHR -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -I../../third_party/mesa_headers -I../.. -Igen -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../third_party/libwebp/src -I../../third_party/vulkan_headers/include -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/skia -I../../third_party/libgifcodec -I../../third_party/vulkan/include -I../../third_party/vulkan_headers/include -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/ced/src -I../../third_party/re2/src -I../../third_party/khronos -I../../gpu -I../../third_party/mesa_headers -fprofile-sample-use=../../chrome/android/profiles/afdo.prof -fprofile-sample-accurate -fno-strict-aliasing --param=ssp-buffer-size=4 -fno-stack-protector -funwind-tables -fPIC -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -flto=thin -fsplit-lto-unit -fcomplete-member-pointers -ffunction-sections -fno-short-enums --target=i686-linux-android16 -DHAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC=1 -m32 -msse2 -mfpmath=sse -mmmx -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Wextra -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-unknown-warning-option -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-max-tokens -Oz -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -momit-leaf-frame-pointer -g1 -fdebug-info-for-profiling -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wshadow -Wexit-time-destructors -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fvisibility-inlines-hidden -c ../../gpu/config/gpu_info_collector.cc -o obj/gpu/config/config_sources/gpu_info_collector.o ../../gpu/config/gpu_info_collector.cc💯37: error: use of undeclared identifier 'eglQueryStringiANGLE' reinterpret_cast<const char*>(eglQueryStringiANGLE(display, name, index)); ^ ../../gpu/config/gpu_info_collector.cc:480:5: error: use of undeclared identifier 'eglQueryDisplayAttribANGLE' eglQueryDisplayAttribANGLE(display, EGL_FEATURE_COUNT_ANGLE, ^ 2 errors generated. ``` I assume this is due to setting ``use_egl=false``. Will try some different flags now.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

Here's the fix I ended up using: ```diff --- build.sh 2020-10-18 18:58:23.000000000 +0200 +++ build-new.sh 2020-10-19 08:40:59.000000000 +0200 @@ -191,9 +191,9 @@ #popd DIRECTORY="src/third_party/android_sdk/public" if [[ -d "$DIRECTORY" ]]; then - rm -rf "$DIRECTORY" + find $DIRECTORY -mindepth 1 -maxdepth 1 -not -name cmdline-tools -exec rm -rf '{}' \; fi -mkdir "${DIRECTORY}" && pushd ${DIRECTORY} +pushd ${DIRECTORY} # rm -rf add-ons emulator licenses platforms sources tools-lint build-tools ndk-bundle platform-tools tools mkdir build-tools && ln -s ../../../../../android-sdk/${SDK_DIR}/build-tools/android-10 build-tools/29.0.2 mkdir platforms ``` Unfortunately now I'm stuck at this error: ``` FAILED: obj/base/jni_java.turbine.jar gen/base/jni_java.generated.srcjar python ../../build/android/gyp/turbine.py --depfile=gen/base/jni_java__header.d --generated-dir=gen/base/jni_java/generated_java --jar-path=obj/base/jni_java.turbine.jar --java-srcjars=\[\"gen/base/base_build_config_gen.srcjar\"\] [email protected]\(gen/base/jni_java.build_config:deps_info:javac_full_interface_classpath\) [email protected]\(gen/base/jni_java.build_config:javac:processor_classpath\) [email protected]\(gen/base/jni_java.build_config:javac:processor_classes\) --turbine-jar-path ../../third_party/turbine/turbine.jar --generated-jar-path gen/base/jni_java.generated.srcjar --java-version=1.8 --chromium-code=1 --warnings-as-errors --jar-info-exclude-globs=\[\"\*/BuildConfig.class\"\] @gen/base/jni_java.sources java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; at com.google.turbine.zip.Zip$ZipIterator.string(Zip.java:139) at com.google.turbine.zip.Zip$ZipIterator.next(Zip.java:132) at com.google.turbine.zip.Zip$ZipIterator.next(Zip.java:103) at com.google.turbine.main.Main.parseAll(Main.java:316) at com.google.turbine.main.Main.compile(Main.java:136) at com.google.turbine.main.Main.compile(Main.java:130) at com.google.turbine.main.Main.main(Main.java:87) Traceback (most recent call last): File "../../build/android/gyp/turbine.py", line 173, in <module> sys.exit(main(sys.argv)) File "../../build/android/gyp/turbine.py", line 169, in main output_paths=output_paths) File "/ungoogled-chromium-android/src/build/android/gyp/util/md5_check.py", line 64, in CallAndWriteDepfileIfStale track_subpaths_allowlist=track_subpaths_allowlist) File "/ungoogled-chromium-android/src/build/android/gyp/util/md5_check.py", line 155, in CallAndRecordIfStale function(*args) File "../../build/android/gyp/turbine.py", line 164, in <lambda> lambda: _OnStaleMd5(options, cmd, javac_cmd, files, options.classpath), File "../../build/android/gyp/turbine.py", line 50, in _OnStaleMd5 subprocess.check_call(cmd) File "/root/anaconda/envs/py2/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['../../third_party/jdk/current/bin/java', '-classpath', '../../third_party/turbine/turbine.jar', 'com.google.turbine.main.Main', '--bootclasspath', '../../third_party/jdk/extras/java_8/jre/lib/rt.jar', '--source_jars', 'gen/base/base_build_config_gen.srcjar', '--sources', '@obj/base/jni_java.turbine.jar.files_list.txt', '--javacopts', '-source', '1.8', '-target', '1.8', '--', '--output', '/ungoogled-chromium-android/src/out/Default/obj/base/tmpv1nC9Sjni_java.turbine.jar', '--gensrc_output', '/ungoogled-chromium-android/src/out/Default/gen/base/tmpYNLggTjni_java.generated.srcjar']' returned non-zero exit status 1 [10941/46511] CXX clang_x86/obj/buildtools/third_party/libc++abi/libc++abi/abort_message.o [10942/46511] CXX obj/third_party/blink/public/common/font_unique_name_table_proto/font_unique_name_table.pb.o ninja: build stopped: subcommand failed. ``` Seems like there is some incompatibility between JDK versions.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#68

Ninja build fails on building libjpeg_turbo

@redox thanks! This is the diff I ended up using in `build.sh` (no need to fetch Chromium source again): ```diff --- build.sh 2020-10-18 18:58:23.000000000 +0200 +++ build-new.sh 2020-10-19 08:40:59.000000000 +0200 @@ -191,9 +191,9 @@ #popd DIRECTORY="src/third_party/android_sdk/public" if [[ -d "$DIRECTORY" ]]; then - rm -rf "$DIRECTORY" + find $DIRECTORY -mindepth 1 -maxdepth 1 -not -name cmdline-tools -exec rm -rf '{}' \; fi -mkdir "${DIRECTORY}" && pushd ${DIRECTORY} +pushd ${DIRECTORY} # rm -rf add-ons emulator licenses platforms sources tools-lint build-tools ndk-bundle platform-tools tools mkdir build-tools && ln -s ../../../../../android-sdk/${SDK_DIR}/build-tools/android-10 build-tools/29.0.2 mkdir platforms ```

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#68

Ninja build fails on building libjpeg_turbo

Yep, that's the error I have. If you have the fix, please post the `build.sh` diff because it's not completely clear to me what needs to be copied where.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#67

Weird ninja build issue

This seems to be the same error as I'm having in #65, some tools are missing. See also: https://groups.google.com/a/chromium.org/g/blink-dev/c/zVQiDphfKmk If you manage to fix `build.sh` (I think by downloading https://android-rebuilds.beuc.net/dl/repository/sdk-repo-linux-build-tools-userdebug.9.0.0_r33.zip and copying the files to the expected location), please let me know.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#66

Build fails on gn gen out/Default --fail-on-unused-args

@redox If you manage to build it correctly on Ubuntu, please let me know. I'm trying to create a working Dockerfile (see https://github.com/Niek/ungoogled-chromium-android-builder/blob/main/Dockerfile) based in Arch (but Ubuntu would be great as well) but I'm getting build errors as well.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

I see, can't that be fixed with https://android-rebuilds.beuc.net/dl/repository/sdk-repo-linux-build-tools-userdebug.9.0.0_r33.zip though?

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

Command line args are not working, so I'm trying to set up a Docker builder that disables EGL completely. See: https://github.com/Niek/ungoogled-chromium-android-builder/blob/main/Dockerfile Unfortunately it's failing halfway the build process now (around file 8.2k/46k): ``` FAILED: gen/chrome/android/chrome_modern_public_apk_manifest/AndroidManifest.xml python ../../build/android/gyp/merge_manifest.py --depfile gen/chrome/android/chrome_modern_public_apk__merge_manifests.d --android-sdk-cmdline-tools ../../third_party/android_sdk/public/cmdline-tools/latest --root-manifest gen/chrome/android/chrome_modern_public_apk/AndroidManifest.xml --output gen/chrome/android/chrome_modern_public_apk_manifest/AndroidManifest.xml --extras @FileArg\(gen/chrome/android/chrome_modern_public_apk.build_config:extra_android_manifests\) --min-sdk-version=21 --target-sdk-version=29 Traceback (most recent call last): File "../../build/android/gyp/merge_manifest.py", line 144, in <module> main(sys.argv[1:]) File "../../build/android/gyp/merge_manifest.py", line 129, in main fail_func=lambda returncode, stderr: returncode != 0 or File "/ungoogled-chromium-android/src/build/android/gyp/util/build_utils.py", line 256, in CheckOutput raise CalledProcessError(cwd, args, stdout + stderr) util.build_utils.CalledProcessError: Command failed: ( cd /ungoogled-chromium-android/src/out/Default; ../../third_party/jdk/current/bin/java -cp ../../third_party/android_sdk/public/cmdline-tools/latest/lib/build-system/manifest-merger.jar:../../third_party/android_sdk/public/cmdline-tools/latest/lib/common/common.jar:../../third_party/android_sdk/public/cmdline-tools/latest/lib/sdk-common/sdk-common.jar:../../third_party/android_sdk/public/cmdline-tools/latest/lib/sdklib/sdklib.jar:../../third_party/android_sdk/public/cmdline-tools/latest/lib/external/com/google/guava/guava/28.1-jre/guava-28.1-jre.jar:../../third_party/android_sdk/public/cmdline-tools/latest/lib/external/kotlin-plugin-ij/Kotlin/kotlinc/lib/kotlin-stdlib.jar:../../third_party/android_sdk/public/cmdline-tools/latest/lib/external/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar com.android.manifmerger.Merger --out /ungoogled-chromium-android/src/out/Default/gen/chrome/android/chrome_modern_public_apk_manifest/tmp6Pi6aMAndroidManifest.xml --property MIN_SDK_VERSION=21 --property TARGET_SDK_VERSION=29 --libs obj/third_party/android_deps/androidx_vectordrawable_vectordrawable_animated_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_appcompat_appcompat_resources_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_customview_customview_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_drawerlayout_drawerlayout_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_activity_activity_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_loader_loader_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_viewpager_viewpager_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_fragment_fragment_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_appcompat_appcompat_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_recyclerview_recyclerview_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_preference_preference_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_asynclayoutinflater_asynclayoutinflater_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_coordinatorlayout_coordinatorlayout_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_legacy_legacy_support_core_utils_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_slidingpanelayout_slidingpanelayout_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_swiperefreshlayout_swiperefreshlayout_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_legacy_legacy_support_core_ui_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_media_media_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_legacy_legacy_support_v4_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_gridlayout_gridlayout_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_cardview_cardview_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_transition_transition_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_viewpager2_viewpager2_java/AndroidManifest.xml:obj/third_party/android_deps/com_google_android_material_material_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_legacy_legacy_support_v13_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_palette_palette_java/AndroidManifest.xml:obj/third_party/android_deps/androidx_mediarouter_mediarouter_java/AndroidManifest.xml --main /tmp/AndroidManifest.xmlOcp3Lm --property PACKAGE=org.ungoogled.chromium.stable ) Error: Could not find or load main class com.android.manifmerger.Merger ``` If you have any pointers, please let me know. I'd also be happy to set up a Docker builder with up-to-date builds.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

I'm trying to build myself now using your [GH workflow](https://git.droidware.info/wchen342/ungoogled-chromium-android/src/branch/master/.github/workflows/build.yml) as a template, but I'm getting this error: ``` + gn gen out/Default --fail-on-unused-args ERROR at //third_party/webrtc/BUILD.gn:417:12: Unsupported value in libs. libs = [ "Foundation.framework" ] ^--------------------- Use frameworks to list framework dependencies. See //third_party/webrtc_overrides/BUILD.gn:8:16: which caused the file to be included. configs += [ "//third_party/webrtc:common_config" ] ^----------------------------------- ```

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

@wchen342 would it be possible to create a testing APK for me using the following command? ```bash out/Default/bin/chrome_public_apk argv --args='--disable-gpu' ``` Or, alternatively: ```bash out/Default/bin/chrome_public_apk argv --args='--use-gl=swiftshader' ``` I think that's the only way to disable GPU acceleration on the build.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

I put the following in the ``app_chrome/Local State`` file: ```json { "browser": { "enabled_labs_experiments": ["disable-accelerated-2d-canvas", "[email protected]", "disable-accelerated-video-encode", "disable-accelerated-video-decode", "[email protected]"] } } ``` Unfortunately the ``EGL_BAD_CONFIG`` errors are still there - I haven't figures out how to completely disable it.

11 months ago

Niek commented on issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

Thanks! I would love to try the GPU flag but unfortunately the ``chrome://flags`` page isn't loading for me. So chicken and egg problem... Do you happen to know which flag it is (`enable-gpu-rasterization` maybe?)? I will check if I can force disable it in the Chromium profile.

11 months ago

Niek opened issue wchen342/ungoogled-chromium-android#65

Issue with GL emulation

11 months ago