Error in compiling "pgcrypto" module in Win32

Started by Maurizio Merliover 21 years ago4 messages
#1Maurizio Merli
maurizio.merli@libero.it

I'm using PostgreSQL 8.0.0 beta1
I can compile all contrib modules but pgcrypton
i have this error when I execute make

md5.o(.text+0x1ee):md5.c: undefined reference to `bcopy'
md5.o(.text+0x25c):md5.c: undefined reference to `bcopy'
md5.o(.text+0x2ae):md5.c: undefined reference to `bcopy'
md5.o(.text+0x2c1):md5.c: undefined reference to `bcopy'
md5.o(.text+0x2e6):md5.c: undefined reference to `bcopy'
md5.o(.text+0x301):md5.c: more undefined references to `bcopy' follow
crypt-des.o(.text+0x520):crypt-des.c: undefined reference to `ntohl@4'
crypt-des.o(.text+0x52b):crypt-des.c: undefined reference to `ntohl@4'
crypt-des.o(.text+0xb92):crypt-des.c: undefined reference to `ntohl@4'
crypt-des.o(.text+0xb9d):crypt-des.c: undefined reference to `ntohl@4'
crypt-des.o(.text+0xbbe):crypt-des.c: undefined reference to `htonl@4'
crypt-des.o(.text+0xbca):crypt-des.c: undefined reference to `htonl@4'
c:\MinGW\bin\dllwrap.exe: c:\MinGW\bin\gcc exited with status 1
make: *** [libpgcrypto.a] Error 1

What can i do?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Maurizio Merli (#1)
Re: Error in compiling "pgcrypto" module in Win32

"Maurizio Merli" <maurizio.merli@libero.it> writes:

I'm using PostgreSQL 8.0.0 beta1

On what?

md5.o(.text+0x1ee):md5.c: undefined reference to `bcopy'

I've fixed these by changing to the more-standard memmove() routine.

crypt-des.o(.text+0x520):crypt-des.c: undefined reference to `ntohl@4'
crypt-des.o(.text+0xbbe):crypt-des.c: undefined reference to `htonl@4'

Can't help you on these, unless you can say which system header file
ntohl and htonl are in on your platform. It looks to me like
crypt-des.c is including what it's supposed to include to get at
those functions ...

regards, tom lane

#3Magnus Hagander
mha@sollentuna.net
In reply to: Tom Lane (#2)
Re: Error in compiling "pgcrypto" module in Win32

md5.o(.text+0x1ee):md5.c: undefined reference to `bcopy'

I've fixed these by changing to the more-standard memmove() routine.

crypt-des.o(.text+0x520):crypt-des.c: undefined reference to

`ntohl@4'

crypt-des.o(.text+0xbbe):crypt-des.c: undefined reference to

`htonl@4'

Can't help you on these, unless you can say which system header file
ntohl and htonl are in on your platform. It looks to me like
crypt-des.c is including what it's supposed to include to get at
those functions ...

This looks a lot like win32, in which case you need to link to "ws2_32"
for those.

//Magnus

#4Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Tom Lane (#2)
Re: Error in compiling "pgcrypto" module in Win32

Tom Lane wrote:

"Maurizio Merli" <maurizio.merli@libero.it> writes:

I'm using PostgreSQL 8.0.0 beta1

On what?

md5.o(.text+0x1ee):md5.c: undefined reference to `bcopy'

I've fixed these by changing to the more-standard memmove() routine.

crypt-des.o(.text+0x520):crypt-des.c: undefined reference to `ntohl@4'
crypt-des.o(.text+0xbbe):crypt-des.c: undefined reference to `htonl@4'

Can't help you on these, unless you can say which system header file
ntohl and htonl are in on your platform. It looks to me like
crypt-des.c is including what it's supposed to include to get at
those functions ...

-lws2_32 is needed.

Regards,
Andreas