Обсуждение: Re: Compiling on FreeBSD 2.2.x? (-export-dynamic unavailable)
Are Bryne <are-pgsql-ports@communique.no> writes:
> ld: no shared -lssl.2.-1 available
> ^
> \___ This has nothing to do with it?
Hmm, I didn't look that closely.
> file on the .so gives:
> /usr/local/lib/libssl.so.2: FreeBSD/i386 compact demand paged shared library
Okay, so you do have a proper shared library.
Since the ecpg link command didn't mention ssl explicitly, I guess the
reference must be coming out of libpq.so. What do you get if you run
ldd on libpq.so? (I think it's called ldd on bsd, if not try chatr.)
regards, tom lane
On Fri, 25 Jan 2002, Tom Lane wrote: > Okay, so you do have a proper shared library. > > Since the ecpg link command didn't mention ssl explicitly, I guess the > reference must be coming out of libpq.so. What do you get if you run > ldd on libpq.so? (I think it's called ldd on bsd, if not try chatr.) Yes, it's ldd. ldd: work/postgresql-7.1.3/src/interfaces/libpq/libpq.so: not a dynamic executable (but, of course, it's a link :) % ll work/postgresql-7.1.3/src/interfaces/libpq/libpq.so* lrwxrwxrwx 1 are portsmas 12 Jan 25 21:16 work/postgresql-7.1.3/src/interfaces/libpq/libpq.so -> libpq.so.2.1 lrwxrwxrwx 1 are portsmas 12 Jan 25 21:16 work/postgresql-7.1.3/src/interfaces/libpq/libpq.so.2 -> libpq.so.2.1 -rwxr-xr-x 1 are portsmas 64849 Jan 25 21:16 work/postgresql-7.1.3/src/interfaces/libpq/libpq.so.2.1 and: % ldd work/postgresql-7.1.3/src/interfaces/libpq/libpq.so.2.1 ldd: work/postgresql-7.1.3/src/interfaces/libpq/libpq.so.2.1: not a dynamic executable % file work/postgresql-7.1.3/src/interfaces/libpq/libpq.so.2.1 work/postgresql-7.1.3/src/interfaces/libpq/libpq.so.2.1: FreeBSD/i386 compact demand paged shared library not stripped So ldd doesn't work for libraries, only executables... > regards, tom lane Thanks. Regards, Are Bryne -- Communiqué DA Office: +47 22 44 33 99 Postboks 9050 Grønland Mobile: +47 900 22 009 NO-0133 Oslo URL: http://www.communique.no
Are Bryne <are-pgsql-ports@communique.no> writes:
> So ldd doesn't work for libraries, only executables...
Possibly it would work to explicitly include "-lssl" in the link
command for libecpg. In src/interfaces/ecpg/lib/Makefile,
add -lssl to the line "SHLIB_LINK= $(libpq)" and see if it's happier.
regards, tom lane
On Fri, 25 Jan 2002, Tom Lane wrote:
> Are Bryne <are-pgsql-ports@communique.no> writes:
> > So ldd doesn't work for libraries, only executables...
>
> Possibly it would work to explicitly include "-lssl" in the link
> command for libecpg. In src/interfaces/ecpg/lib/Makefile,
> add -lssl to the line "SHLIB_LINK= $(libpq)" and see if it's happier.
--- Makefile.orig Fri Jan 25 22:43:12 2002
+++ Makefile Fri Jan 25 22:44:30 2002
@@ -22,7 +22,7 @@
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o
\
connect.o misc.o
-SHLIB_LINK= $(libpq)
+SHLIB_LINK= $(libpq) -lssl
all: all-lib
I clean out *.o and *.a from src/interfaces/ecpg/lib/ and make gives:
gcc295 -O -pipe -DUSE_SSL -Wall -Wmissing-prototypes
-Wmissing-declarations -fpic -DPIC
-I../../../../src/interfaces/ecpg/include
-I../../../../src/interfaces/libpq -I../../../../src/include
-I/usr/local/include -c -o misc.o misc.c
ar cr libecpg.a `lorder execute.o typename.o descriptor.o data.o error.o
prepare.o memory.o connect.o misc.o | tsort`
tsort: cycle in data
tsort: prepare.o
tsort: misc.o
tsort: cycle in data
tsort: error.o
tsort: execute.o
tsort: connect.o
tsort: cycle in data
tsort: error.o
tsort: execute.o
tsort: descriptor.o
tsort: memory.o
tsort: cycle in data
tsort: execute.o
tsort: descriptor.o
tsort: error.o
tsort: cycle in data
tsort: execute.o
tsort: descriptor.o
tsort: error.o
tsort: cycle in data
tsort: execute.o
tsort: descriptor.o
tsort: data.o
ranlib libecpg.a
/usr/bin/ld -x -Bshareable -Bforcearchive execute.o typename.o
descriptor.o data.o error.o prepare.o memory.o connect.o misc.o
-L../../../../src/interfaces/libpq -lpq -lssl -o libecpg.so.3.2.0
ld: no shared -lssl.2.-1 available
gmake[5]: *** [libecpg.so.3.2.0] Error 1
gmake[5]: Leaving directory `/usr/ports/databases/postgresql7/work/postgresql-7.1.3/src/interfaces/ecpg/lib'
So the same error message... I don't understand where the -1 comes from,
though...
> regards, tom lane
Thanks,
Are Bryne
--
Communiqué DA Office: +47 22 44 33 99
Postboks 9050 Grønland Mobile: +47 900 22 009
NO-0133 Oslo URL: http://www.communique.no
Are Bryne <are-pgsql-ports@communique.no> writes:
> So the same error message... I don't understand where the -1 comes from,
> though...
Me either. References from one shared library to another are messy on a
lot of Unixen, though, particularly older platforms. It may not work at
all, or it may require some weird switch to be given while building
libpq.so or libecpg.so.
I think what you need at this point are some FreeBSD gurus not Postgres
gurus. Though they may just tell you to update to a newer FreeBSD release.
In the meantime perhaps you can survive without ssl support ...
regards, tom lane