Closed linsui closed 2 years ago
研究半天不会弄
我可以帮助打包。请问 OpenCV 的部分是怎么构建的?
我可以帮助打包。请问 OpenCV 的部分是怎么构建的?
下载完submodule之后应该能自动构建吧(
懂了,我试试 :ok_hand:
https://gitlab.com/linsui/fdroiddata/-/jobs/2848379624 构建 C++ 代码的时候失败了。似乎只是构建 x86 的时候失败了,arm 和 arm64 的没问题。
应该好了。新版opencv居然加上了x86平台的硬件加速(
谢谢,明天我再试试 👌
构建没有问题了,我的合并请求:https://gitlab.com/fdroid/fdroiddata/-/merge_requests/11549。因为 version code 是自动生成的,F-Droid 只能提取静态字符串,所以没法自动更新版本。请问能不能把 version code 输出到什么地方或者用静态字符串?另外我可不可以在这个仓库添加应用描述?F-Droid 可以从 fastlane 文件结构中抓取。如果可以我开个 PR 。
可以输出到什么地方?拿 version code 的命令是这个 https://github.com/ekibun/Stitch/blob/986dc9fe6dd9bf130cc07a83e826a12ef7d9ad05/app/build.gradle#L7 欢迎pr
比如把 version code 放在 apk 文件名里或者在 release 里添加个 version.txt 之类的都可以。我试试能不能 PR。
有没有例子啊,放github的release里?我上传了output-metadata.json你看看行不行?
这个就可以 :ok_hand: 谢谢!
应用大概两三天内会进入 F-Droid 的存储库。谢谢!
So trying to get this back into F-Droid
was looking at reproducible builds ( https://f-droid.org/docs/Inclusion_How-To/#reproducible-builds)
Only in /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/arm64-v8a: liblog.so
Binary files /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/arm64-v8a/libstitch.so and /tmp/tmp0e1l3fja/_tmp_tmp0e1l3fja_sigcp_soko.ekibun.stitch_30/content/lib/arm64-v8a/libstitch.so differ
Only in /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/armeabi-v7a: liblog.so
Binary files /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/armeabi-v7a/libstitch.so and /tmp/tmp0e1l3fja/_tmp_tmp0e1l3fja_sigcp_soko.ekibun.stitch_30/content/lib/armeabi-v7a/libstitch.so differ
Only in /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/x86: liblog.so
Binary files /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/x86/libstitch.so and /tmp/tmp0e1l3fja/_tmp_tmp0e1l3fja_sigcp_soko.ekibun.stitch_30/content/lib/x86/libstitch.so differ
Only in /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/x86_64: liblog.so
Binary files /tmp/tmp0e1l3fja/unsigned_binaries_soko.ekibun.stitch_30.binary/content/lib/x86_64/libstitch.so and /tmp/tmp0e1l3fja/_tmp_tmp0e1l3fja_sigcp_soko.ekibun.stitch_30/content/lib/x86_64/libstitch.so differ
ignoring /libstitch.so differ
errors for now, why does you APK have liblog.app
but F-Droid does not? @ekibun
full log: soko.ekibun.stitch_30.log.gz
It might due to the different compiler. I compile it in windows with android studio. The liblog is referenced by opencv and i don't use it so it was removed by the compiler optimization?
In my compile env, it got error when directly removing the log in CMakeLists.txt. I have no idea how to fix this error :(
The liblog is referenced by opencv and i don't use it so it was removed by the compiler optimization?
You have a log (lol) for your build output? When? Who removes that?
It might due to the different compiler.
Should be the same, platform should not matter (at least for this)
You have a log (lol) for your build output? When? Who removes that?
I cannot remove this in my build env. I clear all the cache and rebuild it, the liblog.so still exists in the released apks :(
If you can't remove it, can we add it into our apk? :)
I think It might be useless adding liblog.so into fdroid generated apk because i don't use it. Anyway do as what you want. I know little about the policy of fdroid.
@ekibun I've posted a link about repro :stuck_out_tongue_winking_eye:
Also, I find it problematic if the same source code yields APKs so different, I mean, from here it looks like "something special in your build environment injects liblog.so into your APK" :crying_cat_face:
$ grep liblog -rin
...
./app/.cxx/RelWithDebInfo/1l4ez1y6/arm64-v8a/.cmake/api/v1/reply/target-stitch-RelWithDebInfo-de09edfcf02bc3fa218e.json:121: "fragment" : "/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/liblog.so",
./app/.cxx/RelWithDebInfo/1l4ez1y6/arm64-v8a/.cmake/api/v1/reply/cache-v2-bb2533232baa5fc15e80.json:1298: "value" : "/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/liblog.so"
./app/.cxx/RelWithDebInfo/1l4ez1y6/arm64-v8a/CMakeCache.txt:243:log-lib:FILEPATH=/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/liblog.so
./app/.cxx/RelWithDebInfo/1l4ez1y6/arm64-v8a/build.ninja:76:build /home/vagrant/build/soko.ekibun.stitch/app/build/intermediates/cxx/RelWithDebInfo/1l4ez1y6/obj/arm64-v8a/libstitch.so: CXX_SHARED_LIBRARY_LINKER__stitch_RelWithDebInfo CMakeFiles/stitch.dir/stitch.cpp.o | /opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/liblog.so || opencv_lib
./app/.cxx/RelWithDebInfo/1l4ez1y6/arm64-v8a/build.ninja:79: LINK_LIBRARIES = /opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/21/liblog.so -ltegra_hal -ljnigraphics -lz -lcpufeatures -littnotify -lopencv_imgproc -lopencv_flann -lopencv_features2d -lopencv_core -lopencv_calib3d -latomic -lm
so...it is used during linking I guess
│ │ │ │ + [ 1a07c] General configuration for OpenCV 4.6.0-dev =====================================\n
│ │ │ │ Version control: 4.6.0-110-gbb71cb200e-dirty\n
│ │ │ │ Platform:\n
│ │ │ │ - Timestamp: 2024-02-12T16:41:36Z\n
│ │ │ │ + Timestamp: 2024-02-13T11:57:38Z\n
│ │ │ │ Host: Linux 5.10.0-18-amd64 x86_64\n
│ │ │ │ Target: Android 1 aarch64\n
│ │ │ │ CMake: 3.22.1-g37088a8\n
│ │ │ │ CMake generator: Ninja\n
│ │ │ │ CMake build tool: /opt/android-sdk/cmake/3.22.1/bin/ninja\n
│ │ │ │ Configuration: Release\n
│ │ │ │ CPU/HW features:\n
│ │ │ │ @@ -3380,15 +2527,868 @@
│ │ │ │ Python (for build): /usr/bin/python3\n
│ │ │ │ Java: export all functions\n
│ │ │ │ ant: NO\n
│ │ │ │ Java wrappers: NO\n
│ │ │ │ Java tests: NO\n
│ │ │ │ Install to: /home/vagrant/build/soko.ekibun.stitch/app/.cxx/RelWithDebInfo/1l4ez1y6/a
│ │ │ │ -----------------------------------------------------------------\n
│ │ │ │ - pthread_setspecific(tlsKey, pData) == 0
comparing 2 consecutive builds on the same buildserver
this might never be repro :shrug:
https://github.com/opencv/opencv/blob/559c0a0eb1a90a1252a80c03433fc8ac96f0024b/CMakeLists.txt#L1173 You can skip the timestamp.
That's not the only difference: stitchvs.zip
@ekibun can you test this APK for correctness? At least we can readd the app without repro
soko.ekibun.stitch_30.apk.ZIP (remove .ZIP from name)
@ekibun can you test this APK for correctness? At least we can readd the app without repro
soko.ekibun.stitch_30.apk.ZIP (remove .ZIP from name)
It works correctly.
请问可以发布到 F-Droid 吗?