Re: postgres 8.3.8 and Solaris 10_x86 64 bit problems?

From: u235sentinel <u235sentinel(at)gmail(dot)com>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Chernow <ac(at)esilo(dot)com>
Subject: Re: postgres 8.3.8 and Solaris 10_x86 64 bit problems?
Date: 2009-10-20 18:22:08
Message-ID: 4ADDFFD0.70707@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala wrote:
> Andrew Chernow píše v po 19. 10. 2009 v 14:14 -0400:
>
>>> # ./pg_ctl
>>> ld.so.1: pg_ctl: fatal: relocation error: R_AMD64_32: file
>>> /usr/local/postgres64/lib/libpq.so.5: symbol (unknown): value
>>> 0xfffffd7fff1cf210 does not fit
>>> Killed
>>>
{snip}
>>> /usr/local/postgres64/lib/libpq.so.5: ELF 64-bit LSB dynamic lib AMD64
>>> Version 1 [SSE CMOV], dynamically linked, not stripped
>>>
>>> Ok. So looking good. Maybe there is a library or header libpq needs
>>> that I'm missing in 64 bit?
>>>
>>> # ldd /usr/local/postgres64/lib/libpq.so.5
>>>
>> Are you sure that all pg_ctl referenced libraries and all libpq.so
>> referenced libraries were built as 64-bit using PIC? Are you linking
>> with any static library that may contain 32-bit objects? That error is
>> most commonly PIC or arch-mismatch.
>>
>>
>
> Agree, I went through linker bugs and missing PIC is often root cause of
> this problem. See
>
> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6261066
>
> Problem was that ./configure badly setup PIC switch on amd64 platform.
>
> Please, could you compile pure postgreSQL without other own libraries
> like readline and openssl? It should help to find which library is
> culprit.
>
> Zdenek
>
>
>
>
I really appreciate all the comments about this problem. I'm not a
developer but I've been around the block a few times here.

I "think" I have it working now. At least it compiled and I was able to
run initdb, pg_ctl and psql to login to my new test database. All in 64
bit with openssl compiled in.

How I did it.

I've been SO focued on postgres thinking it was the entire problem that
I forgot about ssl. Even though openssl compiled just fine, it
contributed to the problem. After recompiling it with gcc and using
-fpic and -m64 I recompiled postgres also with -fpic and -m64. Seems
that was the magic sauce here.

Now I'm running and will add a few more things in like readline. The
goal is to build plr and plperl and load them into postgres.

Crossing my fingers those will go smoother.

Thanks a bunch!!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-10-20 18:25:13 Re: Going, going, GUCs!
Previous Message David Fetter 2009-10-20 17:49:33 Going, going, GUCs!