Hi!
I'm sending bugs.template as an attachment
I had some problems during compilation, but after a few changes in the
code it compiled. Apparently (and hoppefully) the changes fixed the
problems. I still haven't been able to test it on a real database (this
is my first time using postgreSQL).
Unfurtunately I made the changes to the code before reading
bug.template, so I didn't keep the old files, therefore I can't send you
the "diffs" however the changes were few and I explain them on the
attached file.
Sincerely,
Carlos Villegas
--
Carlos Andrés VILLEGAS VINUEZA
Página de internet: http://purl.oclc.org/net/yotas/index.html
Correo electrónico: karlo (a) esperanto.nu============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Carlos Andrés VILLEGAS VINUEZA
Your email address : karlo@esperanto.nu
System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium MMX
Operating System (example: Linux 2.0.26 ELF) : Linux 2.0.36
PostgreSQL version (example: PostgreSQL-6.4.2) : PostgreSQL-6.4.2
Compiler used (example: gcc 2.8.0) : gcc 2.7.2.1
Please enter a FULL description of your problem:
------------------------------------------------
Problems at compilation. Here are the logged errors (as produced by make
all):
first one:
make[3]: Leaving directory `/usr/src/pgsql/src/backend/utils/time'
gcc -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -I..
-c fmgrtab.c -o fmgrtab.o
make[2]: *** No rule to make target `adt/SUBSYS.o', needed by `SUBSYS.o'.
Stop.
make[2]: Leaving directory `/usr/src/pgsql/src/backend/utils'
make[1]: *** [utils.dir] Error 2
make[1]: Leaving directory `/usr/src/pgsql/src/backend'
make: *** [all] Error 2
With this message (and some time and reading, and...) I
could detect that the error had really happened earlier in the compilation
proces, the error was:
gcc -I../../../include -I../../../backend -O2 -Wall
-Wmissing-prototypes -I../.. -c date.c -o date.o
date.c: In function `timespan_reltime':
date.c:354: `INT_MIN' undeclared (first use this function)
date.c:354: (Each undeclared identifier is reported only once
date.c:354: for each function it appears in.)
date.c:354: `INT_MAX' undeclared (first use this function)
date.c:314: warning: `time' might be used uninitialized in this function
make[3]: *** [date.o] Error 1
make[3]: Leaving directory `/usr/src/pgsql/src/backend/utils/adt'
make[3]: Entering directory `/usr/src/pgsql/src/backend/utils/cache'
After solving this problem (by changing the code, look below), I got a
similar error with the file float.c (instead of date.c), which I "fixed"
in a similar manner (look below).
second one:
After those errors were corrected, I retryied the compilation, but got
still an other error:
"pgc.l", line 318: warning, dangerous trailing context
"pgc.l", line 313: warning, dangerous trailing context
"pgc.l", line 313: warning, dangerous trailing context
"pgc.l", line 313: warning, dangerous trailing context
"pgc.l", line 318: warning, dangerous trailing context
"pgc.l", line 318: warning, dangerous trailing context
mv lex.yy.c pgc.c
gcc -I../../../include -I../../../backend -O2 -Wall
-Wmissing-prototypes -I../include -DMAJOR_VERSION=2 -DMINOR_VERSION=4
-DPATCHLEVEL=4 -DINCLUDE_PATH=\"/usr/local/pgsql/include\" -c pgc.c -o
pgc.o
In file included from pgc.l:28:
extern.h:8: conflicting types for `yytext'
pgc.c:746: previous declaration of `yytext'
lex.yy.c:1019: warning: no previous prototype for `yylex'
lex.yy.c:2790: warning: `yy_flex_realloc' defined but not used
lex.yy.c:2273: warning: `yyunput' defined but not used
lex.yy.c:2763: warning: `yy_flex_strlen' defined but not used
make[3]: *** [pgc.o] Error 1
make[3]: Leaving directory `/usr/src/pgsql/src/interfaces/ecpg/preproc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/pgsql/src/interfaces/ecpg'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/pgsql/src/interfaces'
make: *** [all] Error 2
(I also set the warnigs, because I don't know what they mean, so just to
be sure...)
So again I made some changes to the code and recompiled. This time error
free. (For the code changes, look below)
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
I followed all the instructions in the INSTALL file (almost) word for
word.
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
I could succesfully compile after doing the following code changes:
For the fist error:
The altered files where two, namely:
/usr/src/pgsql/src/backend/utils/adt/date.c
/usr/src/pgsql/src/backend/utils/adt/float.c
On both I did the same change:
I added the following lines: (after the #include's)
#ifndef INT_MAX
#define INT_MAX (0x7FFFFFFFL)
#endif
#ifndef INT_MIN
#define INT_MIN (-0x80000000L)
#endif
Why? I found these definitions on another file:
/usr/src/pgsql/src/backend/utils/adt/numutils.c
And I assume they have the same meaning throughout the code.
For the second error:
I also had to change 2 files, this time they were:
/usr/src/pgsql/src/interfaces/ecpg/preproc/pgc.c
/usr/src/pgsql/src/interfaces/ecpg/preproc/extern.h
The changes were as follow:
On pgc.c I deleted the lines: (they start at line 743)
#ifndef YYLMAX
#define YYLMAX 8192
#endif
char yytext[YYLMAX];
And on extern.h I:
-deleted the line 18, which contained:
extern char *yytext;
and instead I wrote the lines:
#ifndef YYLMAX
#define YYLMAX 8192
#endif
char yytext[YYLMAX];
However I just noticed that I forgot the keyword "extern" on the last
line...
maybe it should be:
#ifndef YYLMAX
#define YYLMAX 8192
#endif
extern char yytext[YYLMAX];
Well if something goes wrong I'll make that change and recompile...
Hopefully this helps.
If you have any comments on this or questions, feel free to e-mail me:
karlo@esperanto.nu