Re: building 9.1 on suse-11.4 (64bit) - EOF - Mailing list pgsql-general

From Rob Sargent
Subject Re: building 9.1 on suse-11.4 (64bit) - EOF
Date
Msg-id 4E027148.5070906@gmail.com
Whole thread Raw
In response to Re: building 9.1 on suse-11.4 (64bit)  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general

On 06/22/2011 10:27 AM, Rob Sargent wrote:
>
>
> On 06/21/2011 06:58 PM, Rob Sargent wrote:
>>
>>
>> On 06/21/2011 06:49 PM, Tom Lane wrote:
>>> Rob Sargent <robjsargent@gmail.com> writes:
>>>> Seems to me a lot of the needed standard libraries are in '/lib64' and
>>>> the linker isn't looking for them there?  So far I've hit libreadline
>>>> and libz.  Do I just keep making the sim-links into /usr/lib64?
>>>
>>> Most of the required libraries are in /lib64 on my Fedora box, too,
>>> and it works just fine.  You have not provided any information that
>>> would let anyone diagnose your problem, but making random symlinks
>>> in /usr/lib64 doesn't sound like the right path to a solution.
>>>
>>>             regards, tom lane
>>
>> Here's what I hope is relevant:
>>
>> gcc --version
>> gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
>> Copyright (C) 2010 Free Software Foundation, Inc.
>>
>> Here's my config call:
>>
>> ./configure --with-python --with-openssl --with-ldap --with-ossp-uuid
>> --with-libxml --with-libxslt --enable-debug --prefix=/opt/PostgreSQL/9.1
>>
>>
>> The tail of config.log follows.  As I confessed, libreadline had to be
>> simlinked into /usr/lib64, then I hit libz (as this log shows) and
>> started to doubt myself (even more).
>>
>> configure:8316: checking for library containing readline
>> configure:8358: gcc -o conftest -O2 -Wall -Wmissing-prototypes
>> -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
>> -Wformat-security -fno-strict-aliasing -fwrapv -g  -D_GNU_SOURCE
>> conftest.c -lreadline -lcrypt -ldl -lm  >&5
>> configure:8365: $? = 0
>> configure:8405: result: -lreadline
>> configure:8432: checking for inflate in -lz
>> configure:8467: gcc -o conftest -O2 -Wall -Wmissing-prototypes
>> -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
>> -Wformat-security -fno-strict-aliasing -fwrapv -g  -D_GNU_SOURCE
>> conftest.c -lz  -lreadline -lcrypt -ldl -lm  >&5
>> /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld:
>> cannot find -lz
>> collect2: ld returned 1 exit status
>> configure:8474: $? = 1
>> configure: failed program was:
>> | /* confdefs.h.  */
>> | #define PACKAGE_NAME "PostgreSQL"
>> | #define PACKAGE_TARNAME "postgresql"
>> | #define PACKAGE_VERSION "9.1beta2"
>> | #define PACKAGE_STRING "PostgreSQL 9.1beta2"
>> | #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org"
>> | #define PG_VERSION "9.1beta2"
>> | #define PG_MAJORVERSION "9.1"
>> | #define USE_INTEGER_DATETIMES 1
>> | #define DEF_PGPORT 5432
>> | #define DEF_PGPORT_STR "5432"
>> | #define BLCKSZ 8192
>> | #define RELSEG_SIZE 131072
>> | #define XLOG_BLCKSZ 8192
>> | #define XLOG_SEG_SIZE (16 * 1024 * 1024)
>> | #define ENABLE_THREAD_SAFETY 1
>> | #define PG_KRB_SRVNAM "postgres"
>> | #define USE_LDAP 1
>> | #define USE_SSL 1
>> | #define USE_LIBXML 1
>> | #define USE_LIBXSLT 1
>> | #define HAVE_LIBM 1
>> | #define HAVE_LIBREADLINE 1
>> | /* end confdefs.h.  */
>> |
>> | /* Override any GCC internal prototype to avoid an error.
>> |    Use char because int might match the return type of a GCC
>> |    builtin and then its argument prototype would still apply.  */
>> | #ifdef __cplusplus
>> | extern "C"
>> | #endif
>> | char inflate ();
>> | int
>> | main ()
>> | {
>> | return inflate ();
>> |   ;
>> |   return 0;
>> | }
>> configure:8495: result: no
>> configure:8508: error: zlib library not found
>> If you have zlib already installed, see config.log for details on the
>> failure.  It is possible the compiler isn't looking in the proper directory.
>> Use --without-zlib to disable zlib support.
>>
>
> Hm, ought I kick this over to an openSuse group?
>
>
> Suse's package manager seems a bit off:  for instance it shows
> readline-devel as installed and in the Files list: the includes are correct
>     /usr/include/readline
>         chardefs.h, history.h, keymaps.h, readline.h,
>         rlconf.h, rlstdc.h, rltypedefs.h, tilde.h
>
> but claims
>     /usr/lib64
>         libhistory.so, libreadline.so
>
> and those are not in the filesystem (after I unlinked of course)
>
> The package manager has libreadline's File list correct:
>     /lib64
>         libhistory.so.6, libreadline.so.6
> but that obviously disagrees with readline-devel.
>
>
>

Not sure who or what to blame here (secure in the knowledge that I'm the
most likely culprit) but I had to
    'ln -s /lib64/libreadline.so.6 /lib64/libreadline.so'
and same for libz

As a further note, the default destination of ossp-uuid is
/usr/local/lib so I added that to the configure line
(--with-libraries=/usr/local/lib).

Et viola: "All of PostgreSQL successfully made. Ready to install.
PostgreSQL installation complete."


Thanks all,


pgsql-general by date:

Previous
From: Michael Nolan
Date:
Subject: Re: postgresql and encfs?
Next
From: Steve Atkins
Date:
Subject: Re: Tuning for a tiny database