Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#4180 closed defect (fixed)

liblwgeom.h:2378:10: fatal error: lwinline.h: No such file or directory

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS 2.5.0
Component: build/upgrade/install Version: 2.4.x
Keywords: Cc:

Description

I thought I was just seeing this error on bessie, but I'm seeing it on debbie as well when trying to build the 2.5 translation docs.

On debbie it looks like this:

In file included from generator.c:37:
/var/lib/jenkins/workspace/pg/rel/pg9.6w64/include/liblwgeom.h:2378:10: fatal error: lwinline.h: No such file or directory
 #include "lwinline.h"
          ^~~~~~~~~~~~
compilation terminated.

I also noticed debbie hasn't been running her 2.5, probably because I was messing with her job, so this issue might exist in 25, especially since the 2.5 doc translation builds against 2.5

On the bessie sisters it looks like this:

01:29:43 In file included from rtpostgis.c:138:
01:29:43 In file included from ../../libpgcommon/lwgeom_pg.h:23:
01:29:43 /usr/local/include/liblwgeom.h:2378:10: fatal error: 'lwinline.h' file not found
01:29:43 #include "lwinline.h"
01:29:43          ^~~~~~~~~~~~
01:29:44 1 error generated.
01:29:44 gmake[3]: *** [<builtin>: rtpostgis.o] Error 1
01:29:44 gmake[3]: Leaving directory '/usr/home/jenkins/workspace/PostGIS_Worker_Run/label/bessie/82114a683cd1eb017a7ce3bc2ea9bfa09f4f1a79/raster/rt_pg'
01:29:44 gmake[2]: *** [Makefile:32: pglib] Error 2
01:29:44 gmake[2]: Leaving directory '/usr/home/jenkins/workspace/PostGIS_Worker_Run/label/bessie/82114a683cd1eb017a7ce3bc2ea9bfa09f4f1a79/raster'
01:29:44 gmake[1]: *** [GNUmakefile:16: all] Error 1
01:29:44 gmake[1]: Leaving directory '/usr/home/jenkins/workspace/PostGIS_Worker_Run/label/bessie/82114a683cd1eb017a7ce3bc2ea9bfa09f4f1a79'
01:29:44 *** Error code 2
01:29:44 

I also thought this was a 3.0.0 error but I'm seeing it in PostGIS 2.5 runs.

All these are using the wrong include file, they should be using the one in source tree and NOT the installed one.

Change History (7)

comment:1 Changed 3 years ago by robe

This could be a result of mixings of 3.0 and 2.5 I suppose. In the case of winnie, I might not be seeing this because I have her installed the liblwgeom includes in places not in search path so she can never accidentally pick the wrong one.

I don't think I made this edit to the debbie and bessie scripts.

STILL it should not be using the installed liblwgeom anyway during regress runs, so our include order is f..d.

Version 0, edited 3 years ago by robe (next)

comment:2 Changed 3 years ago by robe

Component: buildbotsbuild/upgrade/install

comment:3 Changed 3 years ago by robe

It appears that in r16342 the raster make file was changed to include these lines at the top.

CC=@CC@
CFLAGS=-I../liblwgeom @CFLAGS@ @WARNFLAGS@
LDFLAGS = @LDFLAGS@
 all: @RT_CORE_LIB@ @RT_PG_LIB@ @RT_LOADER@ @RT_POSTGIS_SQL@

with note:

Address configure issues for unusual CC/CFLAGS

Patch by Raúl Marín Rodríguez.

Closes #3995
Closes https://github.com/postgis/postgis/pull/195

I know this change was done a while ago - in January, but could be only showing now because the includes between 3.0 and 2.5 are tripping each other.

comment:4 Changed 3 years ago by Algunenano

I think that rtpostgis.c uses a different set of flags, defined in raster/rt_pg/Makefile.in. The problem there is that the include of liblwgeom directory should be first, not in the middle.

For example, this is the compilation command that fails:

05:29:34 cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -pipe  -fstack-protector -fno-strict-aliasing -fPIC -DPIC -I/usr/local/include -I/usr/local/include  -I/usr/local/include/libxml2 -I/usr/include -I/usr/local/include -DHAVE_SFCGAL    -g -O2 -I/usr/local/include "-I../../liblwgeom" "-I../../libpgcommon" -I/usr/local/include -I../rt_core -I. -I./ -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal  -I/usr/local/include -I/usr/local/include -I/usr/local/include  -c -o rtpostgis.o rtpostgis.c

The first include there should be "-I../../liblwgeom" not -I/usr/local/include.

comment:5 Changed 3 years ago by robe

In 16813:

Try to force liblwgeom source include to be referenced first before the installed locations.
When installed, the installed one sometimes gets picked up instead of the source one.
References #4180

comment:6 Changed 3 years ago by robe

Resolution: fixed
Status: newclosed

closing this change seemed to fix the bessies.

comment:7 Changed 3 years ago by Raul Marin

In 17084:

Include liblwgeom first

Ported from r16813 (2.5)
References #4180
References #4260

Note: See TracTickets for help on using tickets.