postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Issue with the makefile

Open jahnavisana2812 opened this issue 4 months ago • 0 comments

I was trying to install an extension using the postgres-gis ubi8 image.Following is the dockerfile I am using I think there is some issue with the pgxs makefile.

FROM registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.1-3.4-0
USER root
ARG myqld_fdw_release=2_9_1

ADD https://github.com/EnterpriseDB/mysql_fdw/archive/refs/tags/REL-${myqld_fdw_release}.tar.gz \
    /tmp/mysql-fdw.tar.gz
RUN microdnf install -y yum
RUN rpm -Uvh https://repo.mysql.com/mysql80-community-release-el8-3.noarch.rpm
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo
RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023
RUN yum --enablerepo=mysql80-community install -y mysql-community-client
RUN yum --enablerepo=mysql80-community install -y mysql-community-devel
RUN yum install -y postgresql-devel
RUN yum install -y postgresql-contrib
RUN tar -xvf /tmp/mysql-fdw.tar.gz -C /tmp --one-top-level --strip-components 1 && \
    rm -rf /tmp/mysql-fdw.tar.gz
RUN sed -i '7i\MAJORVERSION=16' /tmp/mysql-fdw/Makefile
RUN cat /tmp/mysql-fdw/Makefile
WORKDIR /tmp/mysql-fdw
RUN export PATH=/usr/pgsql-16/bin/:$PATH && export PATH=/usr/bin/:$PATH
RUN make USE_PGXS=1
RUN make USE_PGXS=1 install

USER 26

Firstly it was not able to read the basename so i inserted the majorversion=16.It is now throwing a error no rule to make the target

Makefile:40: /usr/pgsql-16/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target '/usr/pgsql-16/lib/pgxs/src/makefiles/pgxs.mk'.  Stop.

jahnavisana2812 avatar Apr 19 '24 07:04 jahnavisana2812