getaddrinfo.c error
Hi,guys.I am a student who want to study PostgreSQL.I encountered the following errors which I don't know how to fix while I using eclipse to built pgsql:
" ../src/port/getaddrinfo.c:360: error: conflicting types for 'getnameinfo' /usr/inlclude/netdb.h:653: note: previous declaration of 'getnameinfo' was here"
but other similar functions such as getaddrinfo(...) declared in getaddrinfo.h work right.so why getnameinfo(...) produce the errors.can someone give me a tip to fix the problem,that's would be very helpful to me.Thanks very much
On 13/12/2009 3:45 PM, ������������������������ wrote:
Hi,guys.I am a student who want to study PostgreSQL.I encountered the
following errors which I don't know how to fix while I using eclipse to
built pgsql:
Eclipse isn't a C compiler. It's an integrated development environment.
I assume you're using GCC as your compiler, since that's what Eclipse's
C development tools want to use, but how did you set the project up?
Are you using PostgreSQL's original `configure' script? Or did you just
import the sources into Eclipse and let it create a new build script?
You should really just stick to using PostgreSQL's existing, tested
build tools and a well tested and supported compiler. You can still use
something like Eclipse if you want to use an IDE to edit the sources -
you just need to set the project up to use the existing postgresql
configure script etc when building.
If you do not think that your use of Eclipse is the problem, then please
try running "./configure" then "make" on a fresh copy of the PostgreSQL
sources to demonstrate that the problem happens even without Eclipse's
involvement.
--
Craig Ringer
Craig Ringer wrote:
You should really just stick to using PostgreSQL's existing, tested
build tools and a well tested and supported compiler. You can still
use something like Eclipse if you want to use an IDE to edit the
sources - you just need to set the project up to use the existing
postgresql configure script etc when building.
I would suggest manually running ./configure with whatever options are
appropriate initially to create the Makefile, then just have Eclipse use
this Makefile to rebuild the project after you edit code.
������������������������ wrote:
Hi,guys.I ama studentwho want to studyPostgreSQL.I encountered the
following errors which I don't know how to fix while I using eclipse
to built pgsql:
I don't know why this specific one isn't working, but we do have a very
detailed guide to getting PostgreSQL to build in Eclipse that might help
you out: http://wiki.postgresql.org/wiki/Working_with_Eclipse
--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com www.2ndQuadrant.com
Greg Smith <greg@2ndquadrant.com> writes:
�������� wrote:
Hi,guys.I ama studentwho want to studyPostgreSQL.I encountered the
following errors which I don't know how to fix while I using eclipse
to built pgsql:
I don't know why this specific one isn't working, but we do have a very
detailed guide to getting PostgreSQL to build in Eclipse that might help
you out: http://wiki.postgresql.org/wiki/Working_with_Eclipse
Hm, I wonder whether the reason the OP ran into trouble was that he
followed that guide :-(. Relying on manual invocation of configure
is a sure recipe for hitting weird breakage anytime somebody changes
the configure input files ... Surely there's a way to teach Eclipse
to do that when needed?
regards, tom lane
Tom Lane wrote:
Greg Smith <greg@2ndquadrant.com> writes:
�������� wrote:
Hi,guys.I ama studentwho want to studyPostgreSQL.I encountered the
following errors which I don't know how to fix while I using eclipse
to built pgsql:I don't know why this specific one isn't working, but we do have a very
detailed guide to getting PostgreSQL to build in Eclipse that might help
you out: http://wiki.postgresql.org/wiki/Working_with_EclipseHm, I wonder whether the reason the OP ran into trouble was that he
followed that guide :-(. Relying on manual invocation of configure
is a sure recipe for hitting weird breakage anytime somebody changes
the configure input files ... Surely there's a way to teach Eclipse
to do that when needed?
Is this really a problem? I think our makefiles are set up such that
they will re-run configure in some of its input files have changed.
I know they do for me when I cvs-update and configure itself has
changed.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Alvaro Herrera <alvherre@commandprompt.com> writes:
Tom Lane wrote:
Hm, I wonder whether the reason the OP ran into trouble was that he
followed that guide :-(. Relying on manual invocation of configure
is a sure recipe for hitting weird breakage anytime somebody changes
the configure input files ... Surely there's a way to teach Eclipse
to do that when needed?
Is this really a problem? I think our makefiles are set up such that
they will re-run configure in some of its input files have changed.
I believe they will re-run config.status to regenerate the output
files. This is not the same thing as re-running the configure script.
regards, tom lane
On mån, 2009-12-14 at 09:27 -0500, Tom Lane wrote:
Alvaro Herrera <alvherre@commandprompt.com> writes:
Tom Lane wrote:
Hm, I wonder whether the reason the OP ran into trouble was that he
followed that guide :-(. Relying on manual invocation of configure
is a sure recipe for hitting weird breakage anytime somebody changes
the configure input files ... Surely there's a way to teach Eclipse
to do that when needed?Is this really a problem? I think our makefiles are set up such that
they will re-run configure in some of its input files have changed.I believe they will re-run config.status to regenerate the output
files. This is not the same thing as re-running the configure script.
It runs config.status --recheck and then config.status for the output
files, which is ultimately pretty much the same as rerunning configure.