Pgloader: Unable to build pgloader on Alpine

Created on 2 Aug 2017  路  7Comments  路  Source: dimitri/pgloader

I am trying to build a Docker image with pgloader on Alpine. But it fails with the error:
While evaluating the form starting at line 21, column 0 Fatal EXTENSION-FAILURE: Don't know how to REQUIRE SB-BSD-SOCKETS. See also: The SBCL Manual, Variable *MODULE-PROVIDER-FUNCTIONS* The SBCL Manual, Function REQUIRE of #P"/pgloader-bundle-3.4.1/dumper-2SKVI5f7.lisp":make: *** [Makefile:47: bin/pgloader] Error 1 The command '/bin/sh -c make' returned a non-zero code: 2

The contents of my `Dockerfile` are:

FROM alpine:3.5

RUN echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
apk add --update \
bash \
ca-certificates \
g++ \
make \
sbcl@testing \
wget && \
rm -rf /var/cache/apk/*

RUN wget https://github.com/dimitri/pgloader/releases/download/v3.4.1/pgloader-bundle-3.4.1.tgz && \
tar -xvzf pgloader-bundle-3.4.1.tgz
WORKDIR pgloader-bundle-3.4.1
RUN make

I don't always build linux packages. So it's possible I am doing something wrong. I just don't know what is. I also tried to use `ccl` and modeled it around [this Dockerfile](https://hub.docker.com/r/dimitri/pgloader/~/dockerfile/) but based it on `alpine` instead. It kept failing with:
```../pmcl-kernel.c:39:20: fatal error: mcheck.h: No such file or directory
 #include <mcheck.h>
                    ^
compilation terminated.

This probably because it uses musl. But the steps I mentioned in my Dockerfile here, just use sbcl.

Most helpful comment

sbcl on Alpine was broken, I've fixed it today and it builds pgloader now.

All 7 comments

Which version of SBCL does Alpine provide here?

@dimitri This is what I get:

bash-4.3# sbcl --version
SBCL 49115.-ca92cb7079

Well that version number isn't the SBCL version number. I don't know what Alpine is doing here. When looking at https://pkgs.alpinelinux.org/package/edge/testing/x86_64/sbcl I got it you could have 1.3.16. The -r0 is strange, tho. Anyway it should provide SB-BSD-SOCKETS, which is an SBCL provided system.

Why do you want to build with Alpine?

I've got another image which is based on postgres:alpine to keep it small. I wanted to use pgloader on it. So I made a PoC to see if I can get it running on Alpine. Are you able to reproduce the issue by building an image from the Dockerfile snippet I shared?

I didn't try. To be honest given the errors you have, I'm not that interested :/

Well, I could use your help. But if you can't that's okay. You can close the ticket.

sbcl on Alpine was broken, I've fixed it today and it builds pgloader now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmuruev picture mmuruev  路  4Comments

rap2hpoutre picture rap2hpoutre  路  5Comments

benvest picture benvest  路  8Comments

drouarb picture drouarb  路  6Comments

Jim-Robbins picture Jim-Robbins  路  3Comments