Open basantagoswami opened 2 weeks ago
Thank you for the report @basantagoswami. Manual build is going to be fragile (and definitely not reproducible) due to lack of Flutter version pining. That's why we always use docker.
I'm really surprised running just docker-build-android
does not work for you. I just checked out v1.6.2
and running that command completes fine. I do not see the Woah! You appear to be trying to run flutter as root.
which makes me think something is different in our docker setup.
Emulate Docker CLI using podman
indicates you're not running vanilla docker? But I'm not familiar with podman at all. What's the output of docker -v
for you? FWIW on Ubuntu 24.04 mine is:
Docker version 24.0.7, build 24.0.7-0ubuntu4
I am using Podman instead of Docker CE. I think the package name is podman-docker
on Ubuntu.
$ docker -v
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
podman version 3.4.4
I will try using Docker Community Edition once and see if that works. Could be an issue with Podman itself.
Could be an issue with Podman itself.
That seems to be the case. I just tried building with whatever podman comes with Ubuntu and get the exact same errors you did:
/usr/bin/tar: gradle/wrapper/gradle-wrapper.properties: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradle/wrapper/gradle-wrapper.jar: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradle/wrapper: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradle: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradlew: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradlew.bat: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: NOTICE: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: Exiting with failure status due to previous errors
Downloading Gradle Wrapper... 35ms
/usr/bin/tar: gradle/wrapper/gradle-wrapper.properties: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradle/wrapper/gradle-wrapper.jar: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradle/wrapper: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradle: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradlew: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: gradlew.bat: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: NOTICE: Cannot change ownership to uid 397546, gid 5000: Invalid argument
/usr/bin/tar: Exiting with failure status due to previous errors
Flutter could not download and/or extract https://storage.googleapis.com/flutter_infra_release/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz. Ensure you have network connectivity and all of the required dependencies listed at flutter.dev/setup.
The original exception was: ProcessException: The command failed with exit code 2
Command: tar -xzf /root/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz -C /root/flutter/bin/cache/artifacts/gradle_wrapper.
Error: building at STEP "RUN flutter channel stable && cd flutter && git checkout 3.16.3 && flutter config --enable-linux-desktop": while running runtime: exit status 1
What mobile OS are you using?
Android
Please provide details on the device you experienced the bug on
No response
Description
I am trying to build the app from source as part of walletscrutiny.com's reproducibility tests. I checked out the latest release tag (v1.6.2) and tried out all the different approached outlined in the README, but failed to compile the code.
BUILDING MANUALLY
Flutter version:
Rust version:
$ ./build_ffi_android.sh info: syncing channel updates for '1.69.0-x86_64-unknown-linux-gnu'
1.69.0-x86_64-unknown-linux-gnu unchanged - rustc 1.69.0 (84c898d65 2023-04-16)
info: checking for self-update info: component 'rust-std' for target 'aarch64-linux-android' is up to date Finished dev [unoptimized + debuginfo] target(s) in 0.17s Finished release [optimized + debuginfo] target(s) in 0.18s
$ flutter build apk Resolving dependencies... (7.7s) Note: intl is pinned to version 0.19.0 by flutter_localizations from the flutter SDK. See https://dart.dev/go/sdk-version-pinning for details.
Because envoy depends on flutter_localizations from sdk which depends on intl 0.19.0, intl 0.19.0 is required. So, because envoy depends on intl ^0.18.0, version solving failed.
$ just docker-build-android; docker build -t envoy . Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. STEP 1/24: FROM ubuntu:22.04 STEP 2/24: MAINTAINER Igor Cota igor@foundation.xyz --> Using cache dde49f7e7557ff4f1a4aeaf24b55535231f613bf0610c313619a0250f204e7c8 --> dde49f7e755 STEP 3/24: WORKDIR /root --> Using cache 9380d410c5bc857facfb1c812b6dbaa91d54f10f2c5131668ae846a60c985dab --> 9380d410c5b STEP 4/24: ENV TZ=America/New_York --> Using cache 46062c1a5d10e8f4ea9ee1b96280a70633937d481f603255bd8936f43c4872de --> 46062c1a5d1 STEP 5/24: ARG DEBIAN_FRONTEND=noninteractive --> Using cache 85957e39db9df2487d454108006fec955bf6d0914579d6bb34f0984292d99a2c --> 85957e39db9 STEP 6/24: RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends postgresql curl build-essential libssl-dev pkg-config libpq-dev git unzip xz-utils zip libglu1-mesa openjdk-8-jdk openjdk-11-jdk wget python2 autoconf clang cmake ninja-build libgtk-3-0 libgtk-3-dev v4l2loopback-dkms v4l2loopback-utils libzbar-dev libzbar0 libzbargtk-dev libjsoncpp-dev libsecret-1-dev libsecret-1-0 ffmpeg xvfb xdotool x11-utils libstdc++-12-dev llvm-14 libsdl2-dev libclang1-14 libtool sudo libusb-1.0-0-dev python3-virtualenv xorg xdg-user-dirs xterm tesseract-ocr && apt clean && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/* --> Using cache f39ee781d8c95bde240c1ee792454316c6037532bcff2c29d7c56416e2307f1f --> f39ee781d8c STEP 7/24: RUN update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64 --> Using cache d65f198697b9f74ede82ec82fc8274f9622db4993313251e6da3533a8aa98e96 --> d65f198697b STEP 8/24: RUN mkdir -p Android/sdk --> Using cache 3d1fa9c6b01b6e0535b9675783b21fd5924578a189ff1ed5ff06f6083ceb238f --> 3d1fa9c6b01 STEP 9/24: ENV ANDROID_SDK_ROOT /root/Android/sdk --> Using cache 55e9940d9c44b85348cef3d5388b01f917bf1a565e1af3a314e9f8fd2868b801 --> 55e9940d9c4 STEP 10/24: RUN mkdir -p .android && touch .android/repositories.cfg && wget -O sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && unzip sdk-tools.zip && rm sdk-tools.zip --> Using cache 0d7bf8adf48f284a2334bd0a0921c4fe9b593fa754b9d8b8c5720527cbcbb8ac --> 0d7bf8adf48 STEP 11/24: RUN mv tools Android/sdk/tools --> Using cache e1b5e35eef6495bd954c87ef38fb4f576162e92273fd0b24916118149998930d --> e1b5e35eef6 STEP 12/24: RUN cd Android/sdk/tools/bin && yes | ./sdkmanager --licenses && ./sdkmanager "build-tools;30.0.2" "platform-tools" "cmdline-tools;latest" "ndk;24.0.8215888" --> Using cache 66b06c2408b742d8505c6858e9c0f7d09b19a4cd88705222e54815090db91905 --> 66b06c2408b STEP 13/24: ENV PATH "$PATH:/root/Android/sdk/platform-tools" --> Using cache e2b94bad574a6ccf9d35ec17f95b89c8a920f59e726a15acc5efb1dbd6e69deb --> e2b94bad574 STEP 14/24: RUN update-java-alternatives --set /usr/lib/jvm/java-1.11.0-openjdk-amd64 --> Using cache ac6ec070c33560e03f0ad21de937c13adf8f584d3ecc0af52394224e0ca4788f --> ac6ec070c33 STEP 15/24: RUN git clone https://github.com/flutter/flutter.git --> Using cache 3aa2a838b1310eba91b320acf32e8bd220df8e977e24ec4eb58af7eaf92f5c20 --> 3aa2a838b13 STEP 16/24: ENV PATH "$PATH:/root/flutter/bin" --> Using cache daa1d5d750dde3c3512dfa172a2011fe46280c507cf099bf465c7db44e89cc80 --> daa1d5d750d STEP 17/24: RUN flutter channel stable && cd flutter && git checkout 3.16.3 && flutter config --enable-linux-desktop Woah! You appear to be trying to run flutter as root. We strongly recommend running the flutter tool without superuser privileges. / 📎 Downloading Linux x64 Dart SDK from Flutter engine 1cdbebee19012cee6cfaf67a434e3a6fcbc4682b... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 202M 100 202M 0 0 14.5M 0 0:00:13 0:00:13 --:--:-- 16.9M Building flutter tool... Resolving dependencies... Downloading packages... Got dependencies. Downloading Material fonts... 358ms Downloading Gradle Wrapper... 16ms /usr/bin/tar: gradle/wrapper/gradle-wrapper.properties: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradle/wrapper/gradle-wrapper.jar: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradle/wrapper: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradle: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradlew: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradlew.bat: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: NOTICE: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: Exiting with failure status due to previous errors Downloading Gradle Wrapper... 15ms /usr/bin/tar: gradle/wrapper/gradle-wrapper.properties: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradle/wrapper/gradle-wrapper.jar: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradle/wrapper: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradle: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradlew: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: gradlew.bat: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: NOTICE: Cannot change ownership to uid 397546, gid 5000: Invalid argument /usr/bin/tar: Exiting with failure status due to previous errors Flutter could not download and/or extract https://storage.googleapis.com/flutter_infra_release/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz. Ensure you have network connectivity and all of the required dependencies listed at flutter.dev/setup. The original exception was: ProcessException: The command failed with exit code 2 Command: tar -xzf /root/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra_release/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz -C /root/flutter/bin/cache/artifacts/gradle_wrapper. Error: error building at STEP "RUN flutter channel stable && cd flutter && git checkout 3.16.3 && flutter config --enable-linux-desktop": error while running runtime: exit status 1 error: Recipe
docker-build
failed on line 9 with exit code 125just docker-build-android
. It failed at the last step (executingbuild_ffi_android.sh
), with this error:Please provide the steps that you've used to reproduce the issue
No response
If applicable, add screenshots or screen recordings to help explain the issue.
No response
If applicable, add logs to help us diagnose the issue.
No response
Anything else?
No response
Impact of the issue
None
If you found any similar or related issues, provide links to them here.
-