libgeotiff icon indicating copy to clipboard operation
libgeotiff copied to clipboard

Inconsistent include naming and libgeotiff.pc

Open caiohamamura opened this issue 10 months ago • 0 comments

Hello, I would like to report that in some distributions the naming for the include directory is not consistent with what I get from pkg-config --cflags libgeotiff.

I am using the development ubuntu which today (2025-02-13) is ubuntu:oracular, since this will probably use the more recent version of libgeotiff.

Reproduction: Dockerfile

FROM ubuntu:oracular

# Install build essentials and libgeotiff-dev
RUN apt-get update && apt-get install -y \
    build-essential \
    pkg-config \
    libgeotiff-dev

# Create working directory
WORKDIR /app

# Create a simple test program
RUN echo '#include <geotiffio.h>\n#include <stdio.h>\n\
\n\
int main() {\n\
    printf("Testing GeoTIFF library\\n");\n\
    return 0;\n\
}' > test.c

RUN echo $(pkg-config --cflags libgeotiff)

# Compile the test program using pkg-config
RUN gcc $(pkg-config --cflags libgeotiff) test.c -o test

This won't work, because the pkg-config --cflags libgeotiff will result in -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/p11-kit-1, but the include files are in /usr/include/geotiff

caiohamamura avatar Feb 13 '25 19:02 caiohamamura