Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laz-perf support disabled in latest docker image #355

Open
inealey opened this issue Dec 17, 2024 · 1 comment
Open

laz-perf support disabled in latest docker image #355

inealey opened this issue Dec 17, 2024 · 1 comment

Comments

@inealey
Copy link

inealey commented Dec 17, 2024

To reproduce:

  1. docker run pgpointcloud/pointcloud:latest
  2. psql -U [ username ] -d [ database name ]
  3. SELECT pc_lazperf_enabled();

The compiled library can be found at /usr/local/lib, and the header files at /usr/local/include/lazperf (although notably not las.hpp, which the configure script appears to be looking for).

There may be some confusion with the naming conventions lazperf versus laz-perf. Perhaps this changed at some point and broke the search paths.

Please advise!

@inealey
Copy link
Author

inealey commented Dec 20, 2024

For any future travelers, I think I may have sorted this out.
Taking a peek at lib/lazperf_adapter.hpp, it looks like the pointcloud code is build against an older version of lazperf, and the file names and directory structure have changed substantially since, which broke the header paths.

I got it to compile with version 1.5.0 , I will attach the Dockerfile I used.
Devs, let me know if this is worth a PR, or if I should just close this.
Happy holidays everyone!

FROM postgres:14
LABEL MAINTAINER="Paul Blottiere <blottiere.paul@gmail.com>"

ENV POSTGRES_VERSION=14
ENV POSTGIS_VERSION=3
ENV LAZPERF_VERSION=1.5.0

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        postgis \
        postgresql-${POSTGRES_VERSION}-postgis-${POSTGIS_VERSION} \
        postgresql-${POSTGRES_VERSION}-postgis-${POSTGIS_VERSION}-scripts

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        git \
        ca-certificates \
        build-essential \
        autoconf \
        automake \
        cmake \
        zlib1g-dev \
        postgresql-server-dev-all \
        libxml2-dev \
    && rm -rf /var/lib/apt/lists/* \
    && git clone --branch ${LAZPERF_VERSION} /~https://github.com/verma/laz-perf.git \
    && cd laz-perf \
    && cmake -D WITH_TESTS=OFF . \
    && make \
    && make install \
    && cd .. \
    && rm -r laz-perf \
    && git clone /~https://github.com/pgpointcloud/pointcloud \
    && cd pointcloud \
    && ./autogen.sh \
    && ./configure --with-lazperf=/usr/local --with-pgconfig=/usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_config CFLAGS="-Wall -Werror -O2 -g" \
    && make \
    && make install \
    && apt-get purge -y --auto-remove \
        git \
        ca-certificates \
        build-essential \
        autoconf \
        automake \
        cmake \
        zlib1g-dev \
        postgresql-server-dev-all \
        libxml2-dev

RUN mkdir -p /docker-entrypoint-initdb.d
COPY ./initdb-pgpointcloud.sh /docker-entrypoint-initdb.d/10_pgpointcloud.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant