32 bit libpq.so on 64 host

Hello,

This is my first post here so greetings for everyone !

So I have to say that I'm software developer (windows mainly) not FreeBSD administrator so BSD world for me is not well known.

I need to run one of my application on FreeBSD 9.1 64 bit. This app is compiled by FPC 32 bit due to inner 64 bit compatibility problems.

Application start and run properly but the problem is with PostgreSQL access. Because this app use libpq.so (I can't change this) and this is 32 bit - standard libpq.so located at /usr/local/lib/ (which is 64 bit) can't be used of course. So I place 32 bit libpq.so at /usr/lib32 and my application load this properly (You can place this lib on other place and add path by ldconfig - this works too).

Unfortunately from this point I have big trouble. My app give error about wrong version (64 bit) of libintl.so.9 - this is understood.

So on my libpq.so 32 bit I ran:

[cmd=]ldd libpq.so[/cmd]

and the result is:
Code:
        libintl.so.9 => not found (0)
        libssl.so.6 => not found (0)
        libcrypto.so.6 => /usr/lib32/libcrypto.so.6 (0x281cb000)
        libthr.so.3 => /usr/lib32/libthr.so.3 (0x28327000)
        libc.so.7 => /usr/lib32/libc.so.7 (0x2806c000)

So I took libintl.so.9 from 32 bit os version and placed next to libpq.so at /usr/lib32. And this is my problem. Wherever I place this lib above - ldd looks like this. This 32 lib version can't be found - I tried every path which is possible and it doesn't work.

It looks like only place where this lib can be placed is /usr/local/lib path. When I temporary place my 32 libintl at this path ldd looks like this:
Code:
ldd libpq.so:
        libintl.so.9 => /usr/local/lib/libintl.so.9 (0x281cb000)
        libssl.so.6 => not found (0)
        libcrypto.so.6 => /usr/lib32/libcrypto.so.6 (0x281d4000)
        libthr.so.3 => /usr/lib32/libthr.so.3 (0x28330000)
        libc.so.7 => /usr/lib32/libc.so.7 (0x2806c000)
        libiconv.so.3 => not found (0)
So I conclude that this lib is ok but can not be found in other places. Of course 32-bit lib can't be placed at /usr/local/lib because this is system library and this break whole system.

Could anyone can help me with this? What can be wrong here? Why only one correct place for libintl.so is /usr/local/lib? How can I change this?

I know about 32-bit jail solution on my 64 OS but this is extreme solution for me.

Best regards from Poland
Jaromir
 
jaromir said:
I know about 32-bit jail solution on my 64 OS but this is extreme solution for me.
Well, I was going to suggest this actually :e

It's probably the easiest solution that's also still manageable.
 
Back
Top