pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
C compiler error when using PostGres
4+ messages / 3 participants
[nested] [flat]

* C compiler error when using PostGres
@ 1998-09-24 20:30 G. Anthony Reina <reina@nsi.edu>
  1998-09-24 20:47 ` Re: [SQL] C compiler error when using PostGres John E. Garrott <johnga@primenet.com>
  0 siblings, 1 reply; 4+ messages in thread

From: G. Anthony Reina @ 1998-09-24 20:30 UTC (permalink / raw)
  To: pgsql-sql

I recently upgraded the hardrive on our database system and copied all
of the Postgres files from the old harddrive to the new one.

Everything seems to work find except when I try to compile a C program
that uses SQL backend commands. The program did compile on the old
harddrive and ran fine. Now, during compilation I get the following
error:

/database/local/pgsql/lib/libpq.a(fe-auth.o): In function
`pg_password_sendauth':
fe-auth.o(.text+0x17): undefined reference to `crypt'

Anyone know how to fix this?

Thanks.
-Tony 

-- 

                        ( @@ )
 ////////////////////oOO*(__)*OOo///////////////////////
//                                                    //
// G. Anthony Reina, MD                               //
// The Neurosciences Institute                        //
// 10640 John Jay Hopkins Drive                       //
// San Diego, CA   92121  USA                         //
//                                                    //
// Voice: (619) 626-2000     FAX: (619) 626-2199      //
// E-mail: reina@nsi.edu                              //
//                                                    //
///////////////////////////////////////////////////////



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] C compiler error when using PostGres
  1998-09-24 20:30 C compiler error when using PostGres G. Anthony Reina <reina@nsi.edu>
@ 1998-09-24 20:47 ` John E. Garrott <johnga@primenet.com>
  1998-09-24 21:21   ` Re: [SQL] C compiler error when using PostGres G. Anthony Reina <reina@nsi.edu>
  0 siblings, 1 reply; 4+ messages in thread

From: John E. Garrott @ 1998-09-24 20:47 UTC (permalink / raw)
  To: pgsql-sql

"G. Anthony Reina" wrote:
> 
> I recently upgraded the hardrive on our database system and copied all
> of the Postgres files from the old harddrive to the new one.
> 
> Everything seems to work find except when I try to compile a C program
> that uses SQL backend commands. The program did compile on the old
> harddrive and ran fine. Now, during compilation I get the following
> error:
> 
> /database/local/pgsql/lib/libpq.a(fe-auth.o): In function
> `pg_password_sendauth':
> fe-auth.o(.text+0x17): undefined reference to `crypt'
> 
> Anyone know how to fix this?
> 
> Thanks.
> -Tony
> 
> --
> 
>                         ( @@ )
>  ////////////////////oOO*(__)*OOo///////////////////////
> //                                                    //
> // G. Anthony Reina, MD                               //
> // The Neurosciences Institute                        //
> // 10640 John Jay Hopkins Drive                       //
> // San Diego, CA   92121  USA                         //
> //                                                    //
> // Voice: (619) 626-2000     FAX: (619) 626-2199      //
> // E-mail: reina@nsi.edu                              //
> //                                                    //
> ///////////////////////////////////////////////////////

Add -lcrypt to the end of the line that compiles the application.

John



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] C compiler error when using PostGres
  1998-09-24 20:30 C compiler error when using PostGres G. Anthony Reina <reina@nsi.edu>
  1998-09-24 20:47 ` Re: [SQL] C compiler error when using PostGres John E. Garrott <johnga@primenet.com>
@ 1998-09-24 21:21   ` G. Anthony Reina <reina@nsi.edu>
  1998-09-25 11:44     ` Re: [SQL] C compiler error when using PostGres James Olin Oden <joden@lee.k12.nc.us>
  0 siblings, 1 reply; 4+ messages in thread

From: G. Anthony Reina @ 1998-09-24 21:21 UTC (permalink / raw)
  To: John E. Garrott <johnga@primenet.com>; pgsql-sql

John E. Garrott wrote:
> > ...  Now, during compilation I get the following
> > error:
> >
> > /database/local/pgsql/lib/libpq.a(fe-auth.o): In function
> > `pg_password_sendauth':
> > fe-auth.o(.text+0x17): undefined reference to `crypt'
> >
> > Anyone know how to fix this?
> >

> 
> Add -lcrypt to the end of the line that compiles the application.
> 
> John


Thanks John,

	That seems to have fixed it. Any idea why I didn't have to include that
library before? Is crypt a PostGres library or a system library?

-Tony



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] C compiler error when using PostGres
  1998-09-24 20:30 C compiler error when using PostGres G. Anthony Reina <reina@nsi.edu>
  1998-09-24 20:47 ` Re: [SQL] C compiler error when using PostGres John E. Garrott <johnga@primenet.com>
  1998-09-24 21:21   ` Re: [SQL] C compiler error when using PostGres G. Anthony Reina <reina@nsi.edu>
@ 1998-09-25 11:44     ` James Olin Oden <joden@lee.k12.nc.us>
  0 siblings, 0 replies; 4+ messages in thread

From: James Olin Oden @ 1998-09-25 11:44 UTC (permalink / raw)
  To: G. Anthony Reina <reina@nsi.edu>; +Cc: John E. Garrott <johnga@primenet.com>; pgsql-sql


> John E. Garrott wrote:
> > > ...  Now, during compilation I get the following
> > > error:
> > >
> > > /database/local/pgsql/lib/libpq.a(fe-auth.o): In function
> > > `pg_password_sendauth':
> > > fe-auth.o(.text+0x17): undefined reference to `crypt'
> > >
> > > Anyone know how to fix this?
> > >
>
> >
> > Add -lcrypt to the end of the line that compiles the application.
> >
> > John
>
> Thanks John,
>
>         That seems to have fixed it. Any idea why I didn't have to include that
> library before? Is crypt a PostGres library or a system library?
>

Perhaps on your old system it was just part of your standard libraries.  I kind of
fuzzy on how all this works, but I belive the compiler should have some sort of
setup that tells it where to look for core libraries, and on some systems crypt
would be part of that default, but on other it would not.  Also, I am pretty sure
you can automate some that stuff with "make", and if you used a different make
file, or because it was a different platform, perhaps the makefile was not setup
proprely.Anyway, I think it boils down to some sort of a configuration
issue...james

P.S.  Any more definitave answers?

> -Tony






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~1998-09-25 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-24 20:30 C compiler error when using PostGres G. Anthony Reina <reina@nsi.edu>
1998-09-24 20:47 ` John E. Garrott <johnga@primenet.com>
1998-09-24 21:21   ` G. Anthony Reina <reina@nsi.edu>
1998-09-25 11:44     ` James Olin Oden <joden@lee.k12.nc.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox