Unix Technical Forum

Re: dependency on 32 bit libpq.so on 64 bit Postgres server.

This is a discussion on Re: dependency on 32 bit libpq.so on 64 bit Postgres server. within the Pgsql General forums, part of the PostgreSQL category; --> > let me explain with an example > say i have a 32 bit exceutable called Installer > > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 12:24 PM
Albe Laurenz
 
Posts: n/a
Default Re: dependency on 32 bit libpq.so on 64 bit Postgres server.

> let me explain with an example
> say i have a 32 bit exceutable called Installer
>
> it dynamically links to 4 libraries which are called:
> libdbx1, it is dependent on (ROOT)/postgres/arch/$(ARCH)d/lib -lpq

(specified in the makefile)
> libdbx2, it is also dependent on (ROOT)/postgres/arch/$(ARCH)d/lib

-lpq (specified in the makefile)
> libdbx3
> libdbx4
>
> the above directory (ROOT)/postgres/arch/$(ARCH)d/lib
>
> has libpq.so which i got by installing the 32 bit Postgres 8.1.5 on

fc4
> its sixe is : 116532
>
> now i put these 4 libs and the exe in the target mach
> and i run the executable Installer
>
> the traget m/c is FC4 has Postgres 8.1.5 installed which is 64 bit
>
> so it has libpq.so.4 and libpq.so.4.1 in /usr/lib64/ of that machine.
>
> rwxrwxrwx 1 root root 12 Nov 16 15:11 libpq.so.4 -> libpq.so.4.1*
> -rwxr-xr-x 1 root root 135960 Nov 16 00:30 libpq.so.4.1*
>
> so when i run the exe it gives me this error:
>
> | 2006-11-17 13:56:18.085 | 5659:1436573184 | DMF | 0 | ERROR
> | error@dmf | DMFConcreteRepositoryCreatorFactory.cxx:77 |
> Cannot find library for dbexpress: libpq.so.4: cannot open
> shared object file: No such file or directory
> | 2006-11-17 13:56:18.085 | 5659:1436573184 | DMF | 0 | ERROR
> | error@dmf | DMFConcreteRepositoryCreatorFactory.cxx:122 |
> Unknown repository: dbexpress


I see.

You will need the 32-bit library libpq.so.4 to run your installer
executable.

You can copy this library to some other place on the machine with the
64-bit libpq.so (I assume it is the database server) and try to make the
executable use this library.

First, check if the installer executable or libdbx<n> has an RPATH set:

objdump -p -j .dynstr <executable>|egrep RUNPATH\|RPATH

If yes, and it points to the location of the 64-bit library, you are out
of
luck and the only solution I can see is to install the server in another
directory...

If no, or the RPATH points somewhere else, you can use the environment
variable
LD_LIBRARY_PATH to make the installer executable use the correct
libpq.so.4:

env LD_LIBRARY_PATH=/location/of/32bit/lib <executable>

Yours,
Laurenz Albe

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 12:24 PM
surabhi.ahuja
 
Posts: n/a
Default Re: dependency on 32 bit libpq.so on 64 bit Postgres server.

thanks a lot i followed your instruction i have put the 32 bit libpq.so.4 in a separate folder which is pointed to by
LD_LIBRARY_PATH
and the exe functions.

thanks,
regards
Surabhi

________________________________

From: Albe Laurenz [mailto:all@adv.magwien.gv.at]
Sent: Fri 11/17/2006 3:12 PM
To: surabhi.ahuja; pgsql-general@postgresql.org
Subject: RE: [GENERAL] dependency on 32 bit libpq.so on 64 bit Postgres server.



> let me explain with an example
> say i have a 32 bit exceutable called Installer
>
> it dynamically links to 4 libraries which are called:
> libdbx1, it is dependent on (ROOT)/postgres/arch/$(ARCH)d/lib -lpq

(specified in the makefile)
> libdbx2, it is also dependent on (ROOT)/postgres/arch/$(ARCH)d/lib

-lpq (specified in the makefile)
> libdbx3
> libdbx4
>
> the above directory (ROOT)/postgres/arch/$(ARCH)d/lib
>
> has libpq.so which i got by installing the 32 bit Postgres 8.1.5 on

fc4
> its sixe is : 116532
>
> now i put these 4 libs and the exe in the target mach
> and i run the executable Installer
>
> the traget m/c is FC4 has Postgres 8.1.5 installed which is 64 bit
>
> so it has libpq.so.4 and libpq.so.4.1 in /usr/lib64/ of that machine.
>
> rwxrwxrwx 1 root root 12 Nov 16 15:11 libpq.so.4 -> libpq.so.4.1*
> -rwxr-xr-x 1 root root 135960 Nov 16 00:30 libpq.so.4.1*
>
> so when i run the exe it gives me this error:
>
> | 2006-11-17 13:56:18.085 | 5659:1436573184 | DMF | 0 | ERROR
> | error@dmf | DMFConcreteRepositoryCreatorFactory.cxx:77 |
> Cannot find library for dbexpress: libpq.so.4: cannot open
> shared object file: No such file or directory
> | 2006-11-17 13:56:18.085 | 5659:1436573184 | DMF | 0 | ERROR
> | error@dmf | DMFConcreteRepositoryCreatorFactory.cxx:122 |
> Unknown repository: dbexpress


I see.

You will need the 32-bit library libpq.so.4 to run your installer
executable.

You can copy this library to some other place on the machine with the
64-bit libpq.so (I assume it is the database server) and try to make the
executable use this library.

First, check if the installer executable or libdbx<n> has an RPATH set:

objdump -p -j .dynstr <executable>|egrep RUNPATH\|RPATH

If yes, and it points to the location of the 64-bit library, you are out
of
luck and the only solution I can see is to install the server in another
directory...

If no, or the RPATH points somewhere else, you can use the environment
variable
LD_LIBRARY_PATH to make the installer executable use the correct
libpq.so.4:

env LD_LIBRARY_PATH=/location/of/32bit/lib <executable>

Yours,
Laurenz Albe



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com