Skip to content

Conversation

@aethrvmn
Copy link

@aethrvmn aethrvmn commented Dec 5, 2025

This updates building nimforum using docker. Specifically it updates the Dockerfile to use 2.2.4-ubuntu-regular, and the entrypoint to use nim c instead of nimble c. Finally, it adds --mm:refc when building src/forum because ORC causes a segfault inside the docker.

- Updated docker image to `2.2.4-ubuntu-regular`
- Removed deprecated `version` tag from `docker-compose.yml`
- Converted `nimble c` calls to `nim c`, and added `--mm:refc` of final binary, because it gets segfault using ORC
@aethrvmn
Copy link
Author

aethrvmn commented Dec 5, 2025

For reference, I couldn't get Dockerfile.alpine to work, having the exact same setup as above, for 2.2.4-alpine-regular I get

64.23         ... /root/.nimble/pkgs2/bcrypt-0.2.1-5d8719a26c03137b6c38dbf13e9a102b985f8d18/bcrypt/arc4random.c:26:10: fatal error: sys/cdefs.h: No such file or directory
64.23         ...    26 | #include <sys/cdefs.h>
64.23         ...       |          ^~~~~~~~~~~~~
64.23         ... compilation terminated.
64.23         ... /root/.nimble/pkgs2/bcrypt-0.2.1-5d8719a26c03137b6c38dbf13e9a102b985f8d18/bcrypt/blowfish.c:34:10: fatal error: sys/cdefs.h: No such file or directory
64.23         ...    34 | #include <sys/cdefs.h>
64.23         ...       |          ^~~~~~~~~~~~~
64.23         ... compilation terminated.
64.23         ... /root/.nimble/pkgs2/bcrypt-0.2.1-5d8719a26c03137b6c38dbf13e9a102b985f8d18/bcrypt/crypt-blowfish.c:31:10: fatal error: sys/cdefs.h: No such file or directory
64.23         ...    31 | #include <sys/cdefs.h>
64.23         ...       |          ^~~~~~~~~~~~~
64.23         ... compilation terminated.
64.23         ... Error: execution of an external compiler program 'gcc -c  -w -fmax-errors=3 -pthread -O3 -fno-strict-aliasing -fno-ident -fno-math-errno   -I/nim/lib -I/app/src -o /root/.cache/nim/forum_r/@m..@s..@[email protected]@[email protected]@[email protected] /root/.nimble/pkgs2/bcrypt-0.2.1-5d8719a26c03137b6c38dbf13e9a102b985f8d18/bcrypt/arc4random.c' failed with exit code: 1
64.23        Tip: 444 messages have been suppressed, use --verbose to show them.
64.23 nimble.nim(415)          buildFromDir
64.23 
64.23     Error:  Build failed for the package: nimforum
------
WARN[0000] current commit information was not captured by the build  error="failed to read current commit information with git rev-parse --is-inside-work-tree"
failed to solve: process "/bin/sh -c nimble install -Y" did not complete successfully: exit code: 1

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.

1 participant