Closed xaionaro closed 1 month ago
termux - building librav1e for arch aarch64... info: downloading installer info: profile set to 'default' info: default host triple is x86_64-unknown-linux-gnu
The above output seems incorrect. The build script tries to build for aarch64 but the host triplet is x86_64. Try to add -a aarch64
option after build-package.sh. If it works the build script needs some change so that it works without -a
option.
Wait, I have tried ./build-package.sh -I librav1e
in the container and it worked just fine :thinking:
Thanks for the reply.
Wait, I have tried
./build-package.sh -I librav1e
in the container and it worked just fine đŸ¤”
The repro I wrote above did repro the problem for me (just copy&paste the commands one by one). I rechecked it before posting.
Try to add
-a aarch64
option after build-package.sh.
Neither -a aarch64
nor -I
helped.
Sometimes build leftovers from prior builds can interfere.
You can use the provided ./clean.sh
script to reset the build environment to a fresh state.
i.e. ./scripts/run-docker.sh ./clean.sh
This isn't done automatically because the build system usually caches already downloaded/built dependencies to save time and bandwidth on rebuilds.
Sometimes build leftovers from prior builds can interfere. You can use the provided
./clean.sh
script to reset the build environment to a fresh state. i.e../scripts/run-docker.sh ./clean.sh
This isn't done automatically because the build system usually caches already downloaded/built dependencies to save time and bandwidth on rebuilds.
Repeated with ./scripts/run-docker.sh ./clean.sh
, having the same problem.
Hmm very odd, I cannot reproduce this issue at all locally.
Hmm very odd, I cannot reproduce this issue at all locally.
Is there any way I can help? I kinda assumed since it is docker it should be pretty reproducible :)
I can pack all the files if needed or something.
since it is docker it should be pretty reproducible
You'd hope so. I'll check if my package build container is out of date or something.
./scripts/update-docker.sh
to pull down the latest version of the package builder container.
That will be a 3.1GB download.
What I can do: I can record the whole process in asciinema if it is of any help.
./scripts/update-docker.sh to pull down the latest version of the package builder container. That will be a 3.1GB download.
OK, let me retry. Last time I did it was few days ago, may be something changed.
What I can do, I can record the whole process in asciinema if it of any help.
Could possibly help, though I somewhat doubt it.
Thanks for the reminder for why I don't build without -I
, first run of compiling glib
took 22 minutes with having to compile all the dependencies as well.
Second one was significantly quicker since most of the dependencies were already cached (5 minutes 40 seconds).
I can actually reproduce the build failure now.
Is there may be an ugly workaround for now? Should I just checkout an older commit?
Well I can reproduce the issue when checking out the commit you mentioned in your reproduction steps, it does not happen when trying I was not able to replicate it on the latest commit. I guess I'll try again.
On my end it reproduces even after checkout-ing the latest commit. Also even though it is not important, but just in case: that commit (I mentioned initially) was the latest at the moment of facing the issue :)
Not reproducible on the current branch when running only ./scripts/run-docker.sh ./build-package.sh librav1e
Please do not submit bug reports that are based on forks of this repo.
This was not based on the fork of this repo! Why would you think this is a fork? I even provided the exact commit used.
Changes made by gouravkhunger are forks. We have not merge them in #20081. You should not randomly add patches and then claim they are defects that Termux team need to fix.
If you can reproduce the issue without the patches nor checking out old commits and can reproduce on the latest commit then please comment.
Reopening since ./scripts/run-docker.sh ./build-package.sh glib librav1e
is still not possible.
If we can't find a better solution I guess we have to do the same as for rust and hide libz.so during rav1e compilation: https://github.com/termux/termux-packages/blob/master/packages/rust/build.sh#L113 https://github.com/termux/termux-packages/blob/master/packages/rust/build.sh#L217
If you can reproduce the issue without the patches nor checking out old commits and can reproduce on the latest commit then please comment.
If I don't apply any patches then I hit this bug: https://github.com/termux/termux-packages/issues/20070
The patch just explicitly represents as a code the bootstrap process for glib, which one needs to do anyway. So will I do with the patch or not it will be the same behavior. More specifically since the bootstrap procedure is not described on the "Build environment" I'm using the recommendation from Biswa96:
Build glib using
-Dintrospection=disabled
option. Build GI using glib from step1. Build glib with-Dintrospection=enabled
using GI from step2.
So essentially exactly the same thing, as what the patch is doing. But feel free to suggest some other bootstrap procedure (if it does not use a prebuilt glib).
If you can reproduce the issue without the patches nor checking out old commits and can reproduce on the latest commit then please comment.
Since requested, re-doing this once more (the 3rd time):
git clone https://github.com/termux/termux-packages
cd termux-packages
xaionaro@void:~/src/termux-packages$ git show --oneline -s
2aeac6835 (HEAD -> master, origin/master, origin/HEAD) bump(main/libhdf5): 1.14.4.3
xaionaro@void:~/src/termux-packages$ ./scripts/run-docker.sh ./clean.sh
Running container 'termux-package-builder' from image 'ghcr.io/termux/package-builder'...
Creating new container...
79bef00e86d9fbb3157fb4694fe66393c23fbaa1b3f7a7be335f8d2433d59f5e
Changed builder uid/gid... (this may take a while)
Ran:
./scripts/run-docker.sh ./build-package.sh glib
It failed with:
sed: can't read /data/data/com.termux/files/usr/lib/pkgconfig/gobject-introspection-1.0.pc: No such file or directory
So I ran (to follow the recommendation from Biswa96 without editing ./build-package.sh
which would be essentially re-introducing the patch that you say I should not use):
./scripts/run-docker.sh env CFLAGS=-Dintrospection=disabled ./build-package.sh glib
It failed with:
glib| Program python3 (packaging) found: NO
../src/subprojects/glib/meson.build:2451:26: ERROR: python is missing modules: packaging
A full log can be found at /home/builder/.termux-build/gobject-introspection/build/meson-logs/meson-log.txt
So I ran:
./scripts/run-docker.sh ./scripts/setup-ubuntu.sh
and re-ran the build command. It didn't help, so I ran:
./scripts/run-docker.sh pip install packaging
It also didn't help.
So I ran:
./scripts/run-docker.sh /home/builder/.termux-build/python-crossenv-prefix-aarch64/cross/bin/python3 -m pip install packaging
It helped, but now the building failed with:
../src/subprojects/glib/gio/gdebugcontrollerdbus.c:361:42: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
_("Not authorized to change debug settings"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here I realized I just don't have enough free time to reproduce the problem once more. Sorry.
claim they are defects that Termux team need to fix.
I don't claim Termux team needs to do anything; feel free to just close the ticket :)
I reported only because it felt right to report to help others (to help the project to improve). Personally I just excluded librav1e
for my build of ffmpeg 3 weeks ago and personally my problem is solved. This ticket exists only and only to help others to avoid/workaround this problem. I did not use forks, I always used the latest comment. But if the problem is non-important then OK.
Problem description
Seems related to https://github.com/termux/termux-packages/issues/14603
I want to compile
ffmpeg
. One of the dependencies there islibrav1e
and it fails to build with error:Here is the full log:
What steps will reproduce the bug?
TERMUX_FORCE_BUILD_DEPENDENCIES=true
, then delete glib and rebuild without the flag)./scripts/run-docker.sh ./build-package.sh librav1e
.To be more specific:
What is the expected behavior?
It successfully builds
librav1e
System information
Commit of github.com/termux/termux-packages is: efa20d206096ce1c299ef2c0e1e3c0f41817e482