Opened 11 years ago
Closed 10 years ago
#2790 closed defect (fixed)
SET_VARSIZE redefined
Reported by: | robe | Owned by: | colivier |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | sfcgal | Version: | master |
Keywords: | history | Cc: |
Description
I'm seeing this warning in PostgreSQL 9.4 when building sfcgal not sure if its serious or not. Doesn't seem to affect anything.
Might be in other versions but not currently building other versions yet with sfcgal support.
In file included from ../libpgcommon/lwgeom_pg.h:23:0, from lwgeom_sfcgal.c:19: ../libpgcommon/pgsql_compat.h:16:0: warning: "SET_VARSIZE" redefined [enabled by default] #define SET_VARSIZE(var, size) VARATT_SIZEP(var) = size ^ In file included from lwgeom_sfcgal.c:15:0: e:/jenkins/postgresql/rel/pg9.4w64gcc48/include/server/postgres.h:299:0: note: this is the location of the previous definition #define SET_VARSIZE(PTR, len) SET_VARSIZE_4B(PTR, len) ^
Change History (10)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
They are probably including pgcommon or some other header before postgis_config.h, which holds the pgsql version number being tested for. Re-arrange the headers in the sfcgal file to have postgis_config.h higher up.
comment:3 by , 11 years ago
No inclusion of postgis_config.h at all. Only include I see is
in lwgeom_sfcgal.h
which just has:
#include "liblwgeom.h" #include <SFCGAL/capi/sfcgal_c.h>
That might be the problem. The other files we have include liblwgeom_internal.h (instead of liblwgeom.h direct) and liblwgeom_internal.h in turn includes postgis_config.h + liblwgeom.h among other things.
So what is better explicitly add postgis_config.h or swap out the liblwgeom.h call with liblwgeom_internal.h (which includes other stuff which I'm not sure is okay to mix with sfcgal)
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
committed my change at r12704 went with swaparoo fix.
regress still passes for SFCGAL and warning is gone. Feel free to reopen if you feel that was not the best solution.
comment:5 by , 11 years ago
Keywords: | history added |
---|
comment:6 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:7 by , 10 years ago
patch at r12873 should do the trick once and for all. I removed all the legacy junk in pgsql_compat.h which references < 83. 8.2 is definitely not going to be supported for 2.2. I also removed assert because technically it should have been included via liblwgeom_internal.h.
liblwgeom_internal.h does have reference to postgis_config.h (before include of liblwgeom.h) so how this warning still happened after my last change is a bit disconcerting since it should have registered as 94 and not fallen into the 8.2 trap.
Will close once confirmed winnie is no longer registering the warning. (don't have debbie set to test sfcgal yet so no warning on her to check).
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:9 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Still happening, at least in the 2.1 branch, didn't try in trunk. The problem is lwgeom_sfcgal.c not including postgis_config.h, I'm fixing it.
comment:10 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Closed (again?) with r12920 in 2.1 branch (for 2.1.4). Trunk seems to not be affected (I guess due to your previous fix)
Just started having winnie testing 9.3 with sfcgal as well. I see this on 9.3 chain as well.