Alpine Dockerfile help

Hey everybody! I’m working with @BNAndras on adding an Arturo track to Exercism.
One of the issues I found was that their Docker image didn’t build, so I decided to look into it. I fixed a couple of things, but ended up with a rather unusual error message:

/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: src/extras/openssl/deps/linux/libcrypto.a(o_fopen.o): in function `openssl_fopen':
o_fopen.c:(.text+0x1): undefined reference to `fopen64'
collect2: error: ld returned 1 exit status

I sort of know my way around Docker, but I’m not that well versed in C compilers on Linux especially in combination with what looks like openssl. Hopefully someone knows how to fix this.

This is the PR BTW: Convert to official nim base image by ErikSchierboom · Pull Request #2 · arturo-lang/art-docker · GitHub

Try using the libcrypto.a from Alpine’s openssl-libs-static package.

I notice there is libcrypto.a that is committed in the Arturo source repository. I’m not sure how that was built or which environment that was built for. For interest, musl removed the fopen64 (there’s something mentioned in one of golang’s issue). Perhaps try replacing the libcrypto.a with the ones from the Alpine package.

1 Like

I’ll try that, thanks!