Skip to content

Conversation

vitaliylag
Copy link

@vitaliylag vitaliylag commented Jul 30, 2025

I guess the server is just not updated with this repository (the files in the repository are probably newer) so we get python error (#176) because older version is running.

But commands addgroup and adduser have become broken in new version anyway.
This pull request fixes it and makes the recipe work again.

@Xiao-Tao
Copy link
Contributor

Thank you very much for your solution.

I think the error may be caused by using an outdated build environment.

The cross-compilation toolchain used in the build log (https://unofficial-builds.nodejs.org/logs/202507290214-v24.4.1/loong64.log) has been replaced with the cross-compilation toolchain included with Ubuntu:24.04 in #172.

Old cross-compilation toolchain(ubuntu:22.04, python-3.8)

+ export 'CC=ccache /opt/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc'
+ CC='ccache /opt/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc'
+ export 'CXX=ccache /opt/cross-tools/bin/loongarch64-unknown-linux-gnu-g++'
+ CXX='ccache /opt/cross-tools/bin/loongarch64-unknown-linux-gnu-g++'

New cross-toolchain(ubuntu:24.04 python-3.10) (https://github.com/nodejs/unofficial-builds/blob/main/recipes/loong64/run.sh#L23)

export CC="ccache /usr/bin/loongarch64-linux-gnu-gcc-14"
export CXX="ccache /usr/bin/loongarch64-linux-gnu-g++-14"

Based on the build log (https://unofficial-builds.nodejs.org/logs/202507290214-v24.4.1/loong64.log), the old build environment is still being used.
So I think the loong64 build environment may need to be recreated using recipes/loong64/Dockerfile.

@rvagg
Copy link
Member

rvagg commented Sep 1, 2025

Ahh, OK, so it's trying to build the images but failing and we're not noticing. If you look at the the github-webhook.log then you'll see the output from the last deploy at the bottom along with any errors: https://unofficial-builds.nodejs.org/logs/github-webhook.log (I've just xz compressed the current one so it's currently https://unofficial-builds.nodejs.org/logs/github-webhook.log.xz but the next one should be .log).

stderr: + docker build /home/nodejs/unofficial-builds/bin/../recipes/loong64/ -t unofficial-build-recipe-loong64 --build-arg UID=1000 --build-arg GID=1000
stderr: #1 [internal] load build definition from Dockerfile
stderr: #1 transferring dockerfile: 962B done
stderr: #1 DONE 0.0s
stderr:
stderr: #2 [internal] load .dockerignore
stderr: #2 transferring context: 2B done
stderr: #2 DONE 0.0s
stderr:
stderr: #3 [internal] load metadata for docker.io/library/ubuntu:24.04
stderr: #3 DONE 0.1s
stderr:
stderr: #4 [1/6] FROM docker.io/library/ubuntu:24.04@sha256:a08e551cb33850e4740772b38217fc1796a66da2506d312abe51acda354ff061
stderr: #4 DONE 0.0s
stderr:
stderr: #5 [2/6] RUN apt-get update     && apt-get dist-upgrade -y     && apt-get install -y software-properties-common     && add-apt-repository -y ppa:ubuntu-toolchain-r/test     && add-apt-repository -y ppa:deadsnakes/ppa     && apt-get update     && apt-get install -y          adduser          git       g++-13          curl          make          python3.10          ccache          xz-utils          g++-14-loongarch64-linux-gnu          gcc-14-loongarch64-linux-gnu-base          gcc-14-loongarch64-linux-gnu
stderr: #5 CACHED
stderr:
stderr: #6 [internal] load build context
stderr: #6 transferring context: 28B done
stderr: #6 DONE 0.0s
stderr:
stderr: #7 [3/6] RUN addgroup --gid 1000 node     && adduser --gid 1000 --uid 1000 --disabled-password --gecos node node
stderr: #7 0.286 fatal: The GID `1000' is already in use.
stderr: #7 ERROR: process "/bin/sh -c addgroup --gid $GID node     && adduser --gid $GID --uid $UID --disabled-password --gecos node node" did not complete successfully: exit code: 21
stderr: ------
stderr:  > [3/6] RUN addgroup --gid 1000 node     && adduser --gid 1000 --uid 1000 --disabled-password --gecos node node:
stderr: #7 0.286 fatal: The GID `1000' is already in use.
stderr: ------
stderr: Dockerfile:25
stderr: --------------------
stderr:   24 |
stderr:   25 | >>> RUN addgroup --gid $GID node \
stderr:   26 | >>>     && adduser --gid $GID --uid $UID --disabled-password --gecos node node
stderr:   27 |
stderr: --------------------
stderr: ERROR: failed to solve: process "/bin/sh -c addgroup --gid $GID node     && adduser --gid $GID --uid $UID --disabled-password --gecos node node" did not complete successfully: exit code: 21

I think for the version of adduser we're dealing with here, --ingroup node might be the right approach here instead of --gid which is trying to make a new group. Alternatively try and do it in one command, removing addgroup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants