dbTalk Databases Forums  

[BUGS] BUG #2600: dblink compile with SSL missing libraries

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2600: dblink compile with SSL missing libraries in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christopher Browne
 
Posts: n/a

Default [BUGS] BUG #2600: dblink compile with SSL missing libraries - 08-30-2006 , 01:09 PM







The following bug has been logged online:

Bug reference: 2600
Logged by: Christopher Browne
Email address: cbbrowne (AT) ca (DOT) afilias.info
PostgreSQL version: CVS HEAD (8.2)
Operating system: AIX 5.3
Description: dblink compile with SSL missing libraries
Details:

If I try to build dblink when PG is configured "--with-openssl", the build
of the contrib module dblink breaks as follows:

pgdba (AT) ydb1 (DOT) int.libertyrms.com:/opt/rg/data_dba/build-farm/HEAD/pgsql.741430/
contrib/dblink $ gmake
.../../src/backend/port/aix/mkldexport.sh libdblink.a > libdblink.exp
/opt/prod/gcc-4.1.1/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-g -Wl,-bmaxdata:0x80000000 -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -o
libdblink.so libdblink.a -Wl,-bE:libdblink.exp -L../../src/interfaces/libpq
-L../../src/port -L/opt/freeware/lib -lpq -lpthread -lpthreads
-Wl,-bI:../../src/backend/postgres.imp
ld: 0711-317 ERROR: Undefined symbol: .SSL_pending
ld: 0711-317 ERROR: Undefined symbol: .ERR_get_error
ld: 0711-317 ERROR: Undefined symbol: .ERR_reason_error_string
ld: 0711-317 ERROR: Undefined symbol: .SSL_write
ld: 0711-317 ERROR: Undefined symbol: .SSL_get_error
ld: 0711-317 ERROR: Undefined symbol: .SSL_read
ld: 0711-317 ERROR: Undefined symbol: .SSL_shutdown
ld: 0711-317 ERROR: Undefined symbol: .SSL_free
ld: 0711-317 ERROR: Undefined symbol: .X509_free
ld: 0711-317 ERROR: Undefined symbol: .SSL_connect
ld: 0711-317 ERROR: Undefined symbol: .SSL_get_peer_certificate
ld: 0711-317 ERROR: Undefined symbol: .X509_get_subject_name
ld: 0711-317 ERROR: Undefined symbol: .X509_NAME_oneline
ld: 0711-317 ERROR: Undefined symbol: .X509_NAME_get_text_by_NID
ld: 0711-317 ERROR: Undefined symbol: .SSL_new
ld: 0711-317 ERROR: Undefined symbol: .SSL_set_ex_data
ld: 0711-317 ERROR: Undefined symbol: .SSL_set_fd
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_free
ld: 0711-317 ERROR: Undefined symbol: .TLSv1_method
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_new
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_load_verify_locations
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_get_cert_store
ld: 0711-317 ERROR: Undefined symbol: .X509_STORE_load_locations
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_set_verify
ld: 0711-317 ERROR: Undefined symbol: .SSL_library_init
ld: 0711-317 ERROR: Undefined symbol: .SSL_load_error_strings
ld: 0711-317 ERROR: Undefined symbol: .CRYPTO_set_id_callback
ld: 0711-317 ERROR: Undefined symbol: .CRYPTO_num_locks
ld: 0711-317 ERROR: Undefined symbol: .CRYPTO_set_locking_callback
ld: 0711-317 ERROR: Undefined symbol: .X509_STORE_set_flags
ld: 0711-317 ERROR: Undefined symbol: .SSL_get_ex_data
ld: 0711-317 ERROR: Undefined symbol: .PEM_read_X509
ld: 0711-317 ERROR: Undefined symbol: .PEM_read_PrivateKey
ld: 0711-317 ERROR: Undefined symbol: .X509_check_private_key
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
gmake: *** [libdblink.so] Error 1

If I add, to the GCC command line, requests for libssl and libcrypto...
-lssl -lcrypto

e.g. - command line:

pgdba (AT) ydb1 (DOT) int.libertyrms.com:/opt/rg/data_dba/build-farm/HEAD/pgsql.741430/
contrib/dblink $ /opt/prod/gcc-4.1.1/bin/gcc -O2 -Wall -Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -g -Wl,-bmaxdata:0x80000000 -Wl,-bnoentry -Wl,-H512
-Wl,-bM:SRE -o libdblink.so libdblink.a -Wl,-bE:libdblink.exp
-L../../src/interfaces/libpq -L../../src/port -L/opt/freeware/lib -lpq
-lpthread -lpthreads -lssl -lcrypto -Wl,-bI:../../src/backend/postgres.imp


This builds fine without further complaint.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply With Quote
  #2  
Old   
Joe Conway
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 08-30-2006 , 02:54 PM






Christopher Browne wrote:
Quote:
The following bug has been logged online:


If I try to build dblink when PG is configured "--with-openssl", the build
of the contrib module dblink breaks as follows:

If I add, to the GCC command line, requests for libssl and libcrypto...
-lssl -lcrypto

e.g. - command line:

pgdba (AT) ydb1 (DOT) int.libertyrms.com:/opt/rg/data_dba/build-farm/HEAD/pgsql.741430/
contrib/dblink $ /opt/prod/gcc-4.1.1/bin/gcc -O2 -Wall -Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -g -Wl,-bmaxdata:0x80000000 -Wl,-bnoentry -Wl,-H512
-Wl,-bM:SRE -o libdblink.so libdblink.a -Wl,-bE:libdblink.exp
-L../../src/interfaces/libpq -L../../src/port -L/opt/freeware/lib -lpq
-lpthread -lpthreads -lssl -lcrypto -Wl,-bI:../../src/backend/postgres.imp

This builds fine without further complaint.
Interesting. I build using "--with-openssl" all the time and have never
had a problem. Can anyone comment on the appropriate Makefile changes
for this?

Thanks,

Joe

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
  #3  
Old   
Stefan Kaltenbrunner
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 08-30-2006 , 03:21 PM



Joe Conway wrote:
Quote:
Christopher Browne wrote:
The following bug has been logged online:


If I try to build dblink when PG is configured "--with-openssl", the
build
of the contrib module dblink breaks as follows:

If I add, to the GCC command line, requests for libssl and libcrypto...
-lssl -lcrypto

e.g. - command line:
pgdba (AT) ydb1 (DOT) int.libertyrms.com:/opt/rg/data_dba/build-farm/HEAD/pgsql.741430/

contrib/dblink $ /opt/prod/gcc-4.1.1/bin/gcc -O2 -Wall
-Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -g -Wl,-bmaxdata:0x80000000 -Wl,-bnoentry -Wl,-H512
-Wl,-bM:SRE -o libdblink.so libdblink.a -Wl,-bE:libdblink.exp
-L../../src/interfaces/libpq -L../../src/port -L/opt/freeware/lib -lpq
-lpthread -lpthreads -lssl -lcrypto
-Wl,-bI:../../src/backend/postgres.imp

This builds fine without further complaint.

Interesting. I build using "--with-openssl" all the time and have never
had a problem. Can anyone comment on the appropriate Makefile changes
for this?
hmm that actually seems to be a rather AIX-centric issue since we have a
ton of buildfarm boxes building with --with-openssl ...


Stefan

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #4  
Old   
Chris Browne
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 08-30-2006 , 04:41 PM



mail (AT) joeconway (DOT) com (Joe Conway) writes:
Quote:
Christopher Browne wrote:
The following bug has been logged online:

If I try to build dblink when PG is configured "--with-openssl", the
build
of the contrib module dblink breaks as follows:

If I add, to the GCC command line, requests for libssl and libcrypto...
-lssl -lcrypto
e.g. - command line:
pgdba (AT) ydb1 (DOT) int.libertyrms.com:/opt/rg/data_dba/build-farm/HEAD/pgsql.741430/
contrib/dblink $ /opt/prod/gcc-4.1.1/bin/gcc -O2 -Wall -Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -g -Wl,-bmaxdata:0x80000000 -Wl,-bnoentry -Wl,-H512
-Wl,-bM:SRE -o libdblink.so libdblink.a -Wl,-bE:libdblink.exp
-L../../src/interfaces/libpq -L../../src/port -L/opt/freeware/lib -lpq
-lpthread -lpthreads -lssl -lcrypto -Wl,-bI:../../src/backend/postgres.imp
This builds fine without further complaint.

Interesting. I build using "--with-openssl" all the time and have
never had a problem. Can anyone comment on the appropriate Makefile
changes for this?
I do notice that on Linux, the command line doesn't include requests
for either library.

I also seem to recall, in past discussions about "library matters,"
that AIX is more sticky about requiring that libraries be named
expressly. Maybe we add something like...

ifeq($(findstring aix, $(host_os)), aix)
LIBS += -lssl -lcrypt
endif

(Though that doesn't seem to do the trick...)
--
let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/emacs.html
I'm sure glad we're having this "How many FTP transfers can dance on
the head of a chargeback packet" conversation now, because when
chargebacks happen, it will surely be too expensive to read these
amazing conversations.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #5  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 08-31-2006 , 04:04 AM



Am Mittwoch, 30. August 2006 22:57 schrieb Chris Browne:
Quote:
I also seem to recall, in past discussions about "library matters,"
that AIX is more sticky about requiring that libraries be named
expressly.
ecpglib has

SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS))
$(PTHREAD_LIBS)

ifeq ($(PORTNAME), win32)
# Link to shfolder.dll instead of shell32.dll
SHLIB_LINK += -lshfolder
endif

Presumably the same would be necessary everywhere else libpq is used.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #6  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 08-31-2006 , 01:50 PM



Peter Eisentraut <peter_e (AT) gmx (DOT) net> writes:
Quote:
Am Mittwoch, 30. August 2006 22:57 schrieb Chris Browne:
I also seem to recall, in past discussions about "library matters,"
that AIX is more sticky about requiring that libraries be named
expressly.

ecpglib has

SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS))
$(PTHREAD_LIBS)

ifeq ($(PORTNAME), win32)
# Link to shfolder.dll instead of shell32.dll
SHLIB_LINK += -lshfolder
endif

Presumably the same would be necessary everywhere else libpq is used.
Surely it'd be better to put that into the $(libpq) macro instead.
I see that Makefile.global already has an AIX-specific hack to deal with
PTHREAD_LIBS that way, maybe we need to extend it?

Also, the list of potential library dependencies in libpq's own Makefile
is quite a bit longer than this list ... perhaps ecpg's list is too
short?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #7  
Old   
Chris Browne
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 09-07-2006 , 10:44 AM



peter_e (AT) gmx (DOT) net (Peter Eisentraut) writes:
Quote:
Am Mittwoch, 30. August 2006 22:57 schrieb Chris Browne:
I also seem to recall, in past discussions about "library matters,"
that AIX is more sticky about requiring that libraries be named
expressly.

ecpglib has

SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS))
$(PTHREAD_LIBS)

ifeq ($(PORTNAME), win32)
# Link to shfolder.dll instead of shell32.dll
SHLIB_LINK += -lshfolder
endif

Presumably the same would be necessary everywhere else libpq is used.
I replaced:
SHLIB_LINK = $(libpq)

with
SHLIB_LINK = $(libpq) $(LIBS)

which allowed the compile to get through this.

If I add that very same line:
SHLIB_LINK = $(libpq) $(LIBS)

to contrib/sslinfo/Makefile, it now survives the compile, as well as
successfully running through, for contrib, "make install" and "make
installcheck".
--
"cbbrowne","@","cbbrowne.com"
http://linuxfinances.info/info/unix.html
Do you know where your towel is?

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
  #8  
Old   
Chris Browne
 
Posts: n/a

Default Re: [BUGS] BUG #2600: dblink compile with SSL missing libraries - 09-07-2006 , 10:44 AM



The change Tom made to contrib/sshinfo/Makefile to support Darwin,
adding in $(LIBS), fixed my problem with that contrib module on AIX.

I still need the following, on AIX:

================================================== =================
RCS file: /projects/cvsroot/pgsql/contrib/dblink/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile 27 Feb 2006 12:54:38 -0000 1.11
+++ Makefile 6 Sep 2006 19:48:23 -0000
@@ -3,7 +3,7 @@
MODULE_big = dblink
PG_CPPFLAGS = -I$(libpq_srcdir)
OBJS = dblink.o
-SHLIB_LINK = $(libpq)
+SHLIB_LINK = $(libpq) $(LIBS)

DATA_built = dblink.sql
DATA = uninstall_dblink.sql
--
(reverse (concatenate 'string "moc.enworbbc" "@" "enworbbc"))
http://linuxdatabases.info/info/nonrdbms.html
"Fashion is a form of ugliness so intolerable that we have to alter it
every six months." -- Oscar Wilde

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.