Обсуждение: how does LDFLAGS work?

Поиск
Список
Период
Сортировка

how does LDFLAGS work?

От
michael lush
Дата:
I'm trying to compile postgres 8.4.2 with perl and ssl support but
have no root access

./configure --with-openssl --with-perl --prefix=/home/michael/postgresql-8.4.2
dies with

.
.
.
checking for -lreadline... yes (-lreadline -ltermcap)
checking for inflate in -lz... yes
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL

I did a local install of OpenSSL in  /home/michael/openssl however,  I
not clear how to point configure at the local library
In the INSTALL notes under "configure complains about a failed test program"

It seems to suggest I use something like ' configure ... LDFLAGS="-R
/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"

however
 ./configure --with-openssl --with-perl
--prefix=/home/michael/postgresql-8.4.2 LDFLAGS="-R
/home/michael/openssl/lib:/usr/lib"

only gets as far as
.
.
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

the ld manpage seems to indicate that -R is looking for a filename
though I'm not sure what to put in the file.

--
Michael

Re: how does LDFLAGS work?

От
Tom Lane
Дата:
michael lush <mjlush@gmail.com> writes:
> I'm trying to compile postgres 8.4.2 with perl and ssl support but
> have no root access ...
> I did a local install of OpenSSL in  /home/michael/openssl however,  I
> not clear how to point configure at the local library

You need to use --with-includes and --with-libraries to point at the
relevant subdirectories of /home/michael/openssl.

That should be enough to get it to build.  Whether it will actually run
is a different question.  You may in fact need to fool with rpaths for
that part; but that's quite dependent on what platform you're using,
which you didn't say.

            regards, tom lane