Open agarciamontoro opened 5 years ago
Hi guys, is there anyone looking into this? Seems alpine should apply same logic as freeBSD?
Currently I can only sed this line to remove RTLD_DEEPBIND as a workaround...
Also ran into this today. Had to add clang
and llvm9
as well to get it to build and install correctly.
Here's my Dockerfile, adapted from agarciamontoro's above:
# adapted from https://github.com/EnterpriseDB/mysql_fdw/issues/187
# start with official Postgres image
FROM postgres:11.6-alpine
# version of MySQL foreign data wrapper to use
ENV MYSQL_FDW_VERSION=REL-2_5_3
# add various dependencies for mysql_fdw build process
RUN apk add --no-cache make gcc libc-dev clang llvm9 mariadb-dev
# grab mysql_fdw source (see https://github.com/EnterpriseDB/mysql_fdw)
RUN wget -c https://github.com/EnterpriseDB/mysql_fdw/archive/${MYSQL_FDW_VERSION}.tar.gz -O - | tar -xz -C /usr/local/lib/
# fix an error in mysql_fdw.c
RUN sed -i 's/ | RTLD_DEEPBIND//' /usr/local/lib/mysql_fdw-${MYSQL_FDW_VERSION}/mysql_fdw.c
# build and install the extension
RUN cd /usr/local/lib/mysql_fdw-${MYSQL_FDW_VERSION} && make USE_PGXS=1 && make USE_PGXS=1 install
The build fails in Alpine Linux with the following error:
A minimal Dockerfile to reproduce the error:
The build succeeds when removing the
RTLD_DEEPBIND
flag.