segasai / q3c

PostgreSQL extension for spatial indexing on a sphere
GNU General Public License v2.0
76 stars 27 forks source link

Compliation error with q3cube.c #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. When making q3c-1.4.16, I get a couple of errors when compiling q3cube.c 

What is the expected output? What do you see instead?

I expect it to compile without errors. However, I get these messages:

> make
which: no git in 
(/export/tesla1/madsen/postgresql/bin:/usr/lib64/qt-3.3/bin:/usr/NX/bin:/usr/ker
beros/bin:/usr/local/bin:/bin:/usr/bin:/opt/dell/srvadmin/bin)
sed 's,MODULE_PATHNAME,$libdir/q3c,g' q3c.sql.in >q3c.sql
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute 
-Wformat-security -fno-strict-aliasing -fwrapv -fpic 
-DQ3C_VERSION="release-1.4.16"  -O3 -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -I. 
-I. -I/export/tesla1/madsen/postgresql/include/server 
-I/export/tesla1/madsen/postgresql/include/internal -D_GNU_SOURCE   -c -o q3c.o 
q3c.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute 
-Wformat-security -fno-strict-aliasing -fwrapv -fpic 
-DQ3C_VERSION="release-1.4.16"  -O3 -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -I. 
-I. -I/export/tesla1/madsen/postgresql/include/server 
-I/export/tesla1/madsen/postgresql/include/internal -D_GNU_SOURCE   -c -o 
prepare.o prepare.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute 
-Wformat-security -fno-strict-aliasing -fwrapv -fpic 
-DQ3C_VERSION="release-1.4.16"  -O3 -D_GNU_SOURCE -D__STDC_FORMAT_MACROS -I. 
-I. -I/export/tesla1/madsen/postgresql/include/server 
-I/export/tesla1/madsen/postgresql/include/internal -D_GNU_SOURCE   -c -o 
q3cube.o q3cube.c
q3cube.c:32: error: ‘release’ undeclared here (not in a function)
q3cube.c:32:29: error: too many decimal points in number
make: *** [q3cube.o] Error 1

It appears as if my gcc doesn't like assigning Q3C_VERSION to a static char []. 

What version of the product are you using? On what operating system?

* q3c-1.4.16
* gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)
* bash version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
* Linux  2.6.18-308.4.1.el5
* Postgres 9.2.1

Please provide any additional information below.

If I manually replace line 32 in q3cube.c with:

static char __q3c_version[] = "release-1.4.16";

then I have no compilation problems.

Original issue reported on code.google.com by greg.j.m...@gmail.com on 18 Dec 2012 at 2:27

GoogleCodeExporter commented 9 years ago
Thanks for the report. Stupid bug on my side.
I've made the new release which should fix the issue.
http://code.google.com/p/q3c/downloads/detail?name=q3c_1.4.17.tar.gz

Original comment by koposov on 18 Dec 2012 at 2:49