Skip to content

Build fails in Alpine #187

@agarciamontoro

Description

@agarciamontoro

The build fails in Alpine Linux with the following error:

mysql_fdw.c: In function 'mysql_load_library':
mysql_fdw.c:217:56: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
  mysql_dll_handle = dlopen(_MYSQL_LIBNAME, RTLD_LAZY | RTLD_DEEPBIND);
                                                        ^~~~~~~~~~~~~
                                                        RTLD_DEFAULT
mysql_fdw.c:217:56: note: each undeclared identifier is reported only once for each function it appears in
make: *** [<builtin>: mysql_fdw.o] Error 1

A minimal Dockerfile to reproduce the error:

FROM postgres:11-alpine

ENV MYSQL_FDW_VERSION=REL-2_5_3

RUN apk add --no-cache \
    git \
    libc-dev \
    mariadb-dev \
    make \
    gcc

RUN git clone -b "$MYSQL_FDW_VERSION" https://github.com/EnterpriseDB/mysql_fdw.git /tmp/mysql_fdw

RUN cd /tmp/mysql_fdw && make USE_PGXS=1

The build succeeds when removing the RTLD_DEEPBIND flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions