Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4094 closed patch (fixed)

Failure to build with PG 11devel configured --with-llvm

Reported by: Laurenz Albe Owned by: Algunenano
Priority: medium Milestone: PostGIS PostgreSQL
Component: build Version: master
Keywords: LLVM clang Cc:

Description

When PostgreSQL is configured --with-llvm, building PostGIS fails with:

/usr/lib64/ccache/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2  -I/usr/include   -I/usr/include/libxml2 -I/usr/include -DHAVE_SFCGAL    -I/usr/include/gdal "-I../../libpgcommon"  -I../rt_core -I. -I./ -I/home/laurenz/pg/include/postgresql/server -I/home/laurenz/pg/include/postgresql/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -flto=thin -emit-llvm -c -o rtpostgis.bc rtpostgis.c
In file included from rtpostgis.c:138:
../../libpgcommon/lwgeom_pg.h:23:10: fatal error: 'liblwgeom.h' file not found
#include "liblwgeom.h"
         ^~~~~~~~~~~~~
1 error generated.
make[2]: *** [/home/laurenz/pg/lib/postgresql/pgxs/src/makefiles/../../src/Makefile.global:1009: rtpostgis.bc] Error 1
make[2]: Leaving directory '/home/laurenz/postgis/raster/rt_pg'
make[1]: *** [Makefile:32: pglib] Error 2
make[1]: Leaving directory '/home/laurenz/postgis/raster'
make: *** [GNUmakefile:16: all] Error 1

The attached patch fixes the problem for me.

Attachments (1)

postgis-llvm.patch (646 bytes ) - added by Laurenz Albe 6 years ago.
Patch that fixes building PostGIS

Download all attachments as: .zip

Change History (5)

by Laurenz Albe, 6 years ago

Attachment: postgis-llvm.patch added

Patch that fixes building PostGIS

comment:1 by Algunenano, 6 years ago

Owner: changed from strk to Algunenano

comment:2 by Raul Marin, 6 years ago

Resolution: fixed
Status: newclosed

In 16582:

rt_pg: Fix build issue with LVM jit

Patch by Laurenz Albe (modified to include CFLAGS too)

Closes #4094
Related to #4060

comment:3 by Algunenano, 6 years ago

Thanks Laurenz. I see that it was working for me because I already had postgis installed under /usr/include.

comment:4 by pramsey, 6 years ago

In 16803:

rt_pg: Fix build issue with LVM jit
References #4094

Note: See TracTickets for help on using tickets.