Opened 12 years ago

Closed 12 years ago

#1925 closed defect (invalid)

lwgeom_estimate.c: In function 'LWGEOM_gist_joinsel'

Reported by: koshak Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.5
Component: postgis Version: 1.5.X
Keywords: lwgeom_estimate.c LWGEOM_gist_joinsel Cc: chief@…

Description

Tried to compile through ports(1.5.3_2) and have the same error.

lwgeom_estimate.c: In function 'LWGEOM_gist_joinsel': lwgeom_estimate.c:318: error: 'Form_pg_class' undeclared (first use in this function) lwgeom_estimate.c:318: error: (Each undeclared identifier is reported only once lwgeom_estimate.c:318: error: for each function it appears in.) lwgeom_estimate.c:318: error: expected ';' before 'reltup' lwgeom_estimate.c:319: error: 'reltup' undeclared (first use in this function) lwgeom_estimate.c:330: error: expected ';' before 'reltup' gmake[1]: * [lwgeom_estimate.o] Error 1 gmake[1]: Leaving directory `/usr/home/koshak/postgis-1.5.4/postgis' gmake: * [postgis] Error 2 * Error code 2

Stop in /usr/home/koshak/postgis-1.5.4.

[root@gizmo /home/koshak/postgis-1.5.4]# uname -a FreeBSD gizmo 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011 root@…:/usr/obj/usr/src/sys/GENERIC i386

[root@gizmo /home/koshak/postgis-1.5.4]# pkg_info | grep post postgresql-client-9.2.b2 PostgreSQL database (client) postgresql-contrib-9.2.b2 The contrib utilities from the PostgreSQL distribution postgresql-server-9.2.b2 The most advanced open-source database available anywhere

Help me please :)

Change History (7)

comment:1 by koshak, 12 years ago

Sorry. Here is more readable:

[root@gizmo /home/koshak/postgis-1.5.4]# make
Using GNU make found at /usr/local/bin/gmake
/usr/local/bin/gmake -C liblwgeom
gmake[1]: Entering directory `/usr/home/koshak/postgis-1.5.4/liblwgeom'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/home/koshak/postgis-1.5.4/liblwgeom'
/usr/local/bin/gmake -C postgis
gmake[1]: Entering directory `/usr/home/koshak/postgis-1.5.4/postgis'
cc -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../liblwgeom -I. -I. -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include  -c -o lwgeom_estimate.o lwgeom_estimate.c
lwgeom_estimate.c: In function 'LWGEOM_gist_joinsel':
lwgeom_estimate.c:318: error: 'Form_pg_class' undeclared (first use in this function)
lwgeom_estimate.c:318: error: (Each undeclared identifier is reported only once
lwgeom_estimate.c:318: error: for each function it appears in.)
lwgeom_estimate.c:318: error: expected ';' before 'reltup'
lwgeom_estimate.c:319: error: 'reltup' undeclared (first use in this function)
lwgeom_estimate.c:330: error: expected ';' before 'reltup'
gmake[1]: *** [lwgeom_estimate.o] Error 1
gmake[1]: Leaving directory `/usr/home/koshak/postgis-1.5.4/postgis'
gmake: *** [postgis] Error 2
*** Error code 2

Stop in /usr/home/koshak/postgis-1.5.4.

comment:2 by pramsey, 12 years ago

Can you locate the file pg_class.h on your system?

in reply to:  2 comment:3 by koshak, 12 years ago

Replying to pramsey:

Can you locate the file pg_class.h on your system?

Yeap:

[root@gizmo /usr/home/koshak]# locate pg_class.h
/usr/local//postgresql/server/catalog/pg_class.h
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/include/catalog/pg_class.h

comment:4 by pramsey, 12 years ago

So you're saying that

/usr/local/include/postgresql/server/catalog/pg_class.h

exists? That's the path the compile step is searching for, but it's not the path you put in above. How many instances of pg_config are on your system? (Look, this isn't a postgis issues, it's a "your system" issue. You've almost certainly got several installations of pgsql stuff lying around conflicting with one another, so your postgis build is looking for components in places they don't exist anymore)

comment:5 by pramsey, 12 years ago

Or more to the point, it's a port issue. Can you direct your problem to the ports maintainer?

in reply to:  4 comment:6 by koshak, 12 years ago

Replying to pramsey:

So you're saying that

/usr/local/include/postgresql/server/catalog/pg_class.h

exists? That's the path the compile step is searching for, but it's not the path you put in above. How many instances of pg_config are on your system? (Look, this isn't a postgis issues, it's a "your system" issue. You've almost certainly got several installations of pgsql stuff lying around conflicting with one another, so your postgis build is looking for components in places they don't exist anymore)

[root@gizmo /usr/home/koshak/postgis-1.5.4]# locate pg_config
/usr/local/bin/pg_config
/usr/local/include/ecpg_config.h
/usr/local/include/pg_config.h
/usr/local/include/pg_config_manual.h
/usr/local/include/pg_config_os.h
/usr/local/include/postgresql/server/pg_config.h
/usr/local/include/postgresql/server/pg_config_manual.h
/usr/local/include/postgresql/server/pg_config_os.h
/usr/local/man/man1/pg_config.1.gz
/usr/local/share/locale/de/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/es/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/fr/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/it/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/ja/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/ko/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/nb/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/pt_BR/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/ro/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/ru/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/sv/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/ta/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/tr/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/zh_CN/LC_MESSAGES/pg_config-9.2.mo
/usr/local/share/locale/zh_TW/LC_MESSAGES/pg_config-9.2.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/doc/src/sgml/man1/pg_config.1
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/doc/src/sgml/ref/pg_config-ref.sgml
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/.gitignore
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/Makefile
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/nls.mk
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/pg_config
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/pg_config.c
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/pg_config.o
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/cs.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/cs.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/de.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/de.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/es.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/es.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/fr.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/fr.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/it.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/it.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ja.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ja.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ko.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ko.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/nb.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/nb.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/pl.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/pl.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/pt_BR.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/pt_BR.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ro.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ro.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ru.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ru.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/sv.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/sv.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ta.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/ta.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/tr.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/tr.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/zh_CN.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/zh_CN.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/zh_TW.mo
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/bin/pg_config/po/zh_TW.po
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/include/pg_config.h
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/include/pg_config.h.in
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/include/pg_config.h.win32
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/include/pg_config_manual.h
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/include/pg_config_os.h
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/interfaces/ecpg/include/ecpg_config.h
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/interfaces/ecpg/include/ecpg_config.h.in
/usr/ports/databases/postgresql90-client/work/postgresql-9.0.8/src/port/pg_config_paths.h

But i wrote my pkg_info: [root@gizmo /usr/home/koshak]# pkg_info | grep sql

apr-ipv6-devrandom-gdbm-db42-pgsql92-1.4.5.1.3.12_1 Apache Portability Library
mysql-client-5.0.95 Multithreaded SQL database (client)
mysql-server-5.0.95 Multithreaded SQL database (server)
postgresql-client-9.2.b2 PostgreSQL database (client)
postgresql-contrib-9.2.b2 The contrib utilities from the PostgreSQL distribution
postgresql-server-9.2.b2 The most advanced open-source database available anywhere

And output pg_config:

[root@gizmo /home/koshak/postgis-1.5.4]# pg_config
BINDIR = /usr/local/bin
DOCDIR = /usr/local/share/doc/postgresql
HTMLDIR = /usr/local/share/doc/postgresql
INCLUDEDIR = /usr/local/include
PKGINCLUDEDIR = /usr/local/include/postgresql
INCLUDEDIR-SERVER = /usr/local/include/postgresql/server
LIBDIR = /usr/local/lib
PKGLIBDIR = /usr/local/lib/postgresql
LOCALEDIR = /usr/local/share/locale
MANDIR = /usr/local/man
SHAREDIR = /usr/local/share/postgresql
SYSCONFDIR = /usr/local/etc/postgresql
PGXS = /usr/local/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-libraries=/usr/local/lib' '--with-includes=/usr/local/include' '--enable-thread-safety' '--with-openssl' '--with-libxml' '--enable-nls' '--without-gssapi' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.2' 'build_alias=i386-portbld-freebsd8.2' 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib' 'CPPFLAGS=' 'CPP=cpp' 'LDFLAGS_SL='
CC = cc
CPPFLAGS = -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include
CFLAGS = -O2 -pipe -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv
CFLAGS_SL = -fPIC -DPIC
LDFLAGS = -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -Wl,--as-needed -Wl,-R'/usr/local/lib'
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgport -lintl -lxml2 -lssl -lcrypto -lz -lreadline -lcrypt -lm
VERSION = PostgreSQL 9.2beta2

I don't know how to fix that problem :( Could u help me?

I don't know how to fix that problem :( Could u help me? I ntried to find from where pg_class.h included, but can't find

[root@gizmo /home/koshak/postgis-1.5.4]# grep -r pg_class * | grep -v "\.sql"
extras/template_gis/postgres_lib.sh.in:                 psql -d $TDB -c "update pg_class set relowner=$GRID where relkind = 'S';" 2>&1 | cat > /dev/null
extras/WFS_locks/WFS_locks.c:   sprintf(query,"SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table'");
loader/pgsql2shp.c:             sprintf(query, "SELECT oid FROM pg_class c, pg_namespace n WHERE c.relnamespace n.oid AND n.nspname = '%s' AND c.relname = '%s'", schema, table);
loader/pgsql2shp.c:             sprintf(query, "SELECT oid FROM pg_class WHERE relname = '%s'", table);
loader/pgsql2shp.c:                     "pg_attribute a, pg_class c, pg_namespace n WHERE "
loader/pgsql2shp.c:                     "pg_attribute a, pg_class c WHERE "
postgis/geography_estimate.c: *           Could be used to get reltuples from pg_class (which
postgis/long_xact.c:    sprintf(query,"SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table'");
postgis/lwgeom_estimate.c:              Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple);
postgis/lwgeom_estimate.c:              Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple);
postgis/lwgeom_estimate.c: *      Could be used to get reltuples from pg_class (which
postgis/lwgeom_estimate.c:              sprintf(query, "SELECT s.stanumbers1[5:8] FROM pg_statistic s, pg_class c, pg_attribute a, pg_namespace n WHERE c.relname = '%s' AND a.attrelid = c.oid AND a.attname = '%s' AND n.nspname = '%s' AND c.relnamespace = n.oid AND s.starelid=c.oid AND s.staattnum = a.attnum AND staattnum = attnum", tbl, col, nsp);
postgis/lwgeom_estimate.c:              sprintf(query, "SELECT s.stanumbers1[5:8] FROM pg_statistic s, pg_class c, pg_attribute a, pg_namespace n WHERE c.relname = '%s' AND a.attrelid = c.oid AND a.attname = '%s' AND n.nspname = current_schema() AND c.relnamespace = n.oid AND s.starelid=c.oid AND s.staattnum = a.attnum AND staattnum = attnum", tbl, col);
utils/profile_intersects.pl:# get number of features from pg_class.ntuples
utils/profile_intersects.pl:$query = 'SELECT c.reltuples FROM pg_class c, pg_namespace n '.
utils/test_estimation.pl:# get number of features from pg_class.ntuples
utils/test_estimation.pl:$query = 'SELECT c.reltuples FROM pg_class c, pg_namespace n '.
utils/test_geography_estimation.pl:# get number of features from pg_class.ntuples
utils/test_geography_estimation.pl:$query = 'SELECT c.reltuples FROM pg_class c, pg_namespace n '.
utils/test_geography_joinestimation.pl:# get number of features from pg_class.ntuples
utils/test_geography_joinestimation.pl: my $query = 'SELECT c.reltuples FROM pg_class c, pg_namespace n '.
utils/test_joinestimation.pl:# get number of features from pg_class.ntuples
utils/test_joinestimation.pl:   my $query = 'SELECT c.reltuples FROM pg_class c, pg_namespace n '.


comment:7 by pramsey, 12 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.