compilation error with postgres 9.3 on ubuntu
I start on studying database development with
postgres recently, and I’m sure I need to start from compilation of the source code, but a compilation problem comes to me.
The one I coped with is shared below, and I would like to show my linux environment first:
This problem keep bothering even after I used
./configure --enable-depend && make
At first, I found some solution mentioned about the
bison parser generator, so I regenerator some syntax file.
bison -d -o preproc.c preproc.y
But this continue bothering me. I feel helpless…
Night after that, I find a other method to cope with it:
After adding this enum,
ET_FATAL, compilation become successful!
But there still has a strange warning:
Which indicating the
enum I just added is already retired. What can I do next?
So I sent my first mail to
psql-hackers mail group, and I got replied:
You have to rebuild the auto-generated pgc.c, preproc.c and preproc.y or simplyremove them to force a rebuild.
This directed me. I deleted
preproc.y, which I used to treat as important, but turn out to be generated files.
And this time, I could
I have learned it is the reason that the first time I
.y files are generated automatically, but they would not deleted by
make distclean, which result in the above error.
Also I got to know,
make maintainer-clean can clean all unnecessary file, hackers will use this to clean all no-needed files when they coding.
I have learnt more from this,
compilation principle is so important that it was a great pity for my school do not have this class!