Thread: Linux PowerPC 64bits issue

Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
Hi, I compiled PostgreSql 9.1 from sources in a OpenSuse 10.1 PowerPC
machine. While trying to test one application, I've got errors just
before connecting to the database, and found my app is loading
linux-vdso64.so.1 while libpq.so uses linux-vdso32.so.1

This means the PostgreSql libraries where compiled in 32 bits?. This is
what ldd gives:

ldd /usr/local/pgsql/lib/libpq.so
linux-vdso32.so.1 => (0x00100000)
libpthread.so.0 => /lib/power6x/libpthread.so.0 (0x6ff85000)
libc.so.6 => /lib/power6x/libc.so.6 (0x6fe11000)
/lib/ld.so.1 (0x08000000)

How can I force PostgreSql to compile in 64 bits?.

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292



Re: Linux PowerPC 64bits issue

From
"ac@hsk.hk"
Date:
Hi,

Could you provide the steps and commands you used to compile 9.1?

I want to reproduce your case in my machine

Regards
Arthur

On 27 Sep 2012, at 7:46 AM, Leonardo M. Ramé wrote:

> Hi, I compiled PostgreSql 9.1 from sources in a OpenSuse 10.1 PowerPC
> machine. While trying to test one application, I've got errors just
> before connecting to the database, and found my app is loading
> linux-vdso64.so.1 while libpq.so uses linux-vdso32.so.1
>
> This means the PostgreSql libraries where compiled in 32 bits?. This is
> what ldd gives:
>
> ldd /usr/local/pgsql/lib/libpq.so
> linux-vdso32.so.1 => (0x00100000)
> libpthread.so.0 => /lib/power6x/libpthread.so.0 (0x6ff85000)
> libc.so.6 => /lib/power6x/libc.so.6 (0x6fe11000)
> /lib/ld.so.1 (0x08000000)
>
> How can I force PostgreSql to compile in 64 bits?.
>
> Regards,
> --
> Leonardo M. Ramé
> Medical IT - Griensu S.A.
> Av. Colón 636 - Piso 8 Of. A
> X5000EPT -- Córdoba
> Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
> Cel.: +54 9 351 6629292
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general



Re: Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
> Hi,
>
> Could you provide the steps and commands you used to compile 9.1?
>
> I want to reproduce your case in my machine
>
> Regards
> Arthur
>

Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
then did this:

tar xvfz postgresql-9.1.5.tar.gz
cd postgresql-9.1.5
./configure
make
make install

This, apart from copying the server files, created the
/usr/local/pgsql/lib directory, where I have libpq.so and many more
shared libraries.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292



Re: Linux PowerPC 64bits issue

From
"ac@hsk.hk"
Date:
Hi,

I have tried to compile it in my local machine, I could not reproduce the issue yet.

Does anyone else have idea what the reason would be? Would the issue come from the config file?

Regards
Arthur

On 27 Sep 2012, at 7:46 PM, Leonardo M. Ramé wrote:

> On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
>> Hi,
>>
>> Could you provide the steps and commands you used to compile 9.1?
>>
>> I want to reproduce your case in my machine
>>
>> Regards
>> Arthur
>>
>
> Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> then did this:
>
> tar xvfz postgresql-9.1.5.tar.gz
> cd postgresql-9.1.5
> ./configure
> make
> make install
>
> This, apart from copying the server files, created the
> /usr/local/pgsql/lib directory, where I have libpq.so and many more
> shared libraries.
>
> --
> Leonardo M. Ramé
> Medical IT - Griensu S.A.
> Av. Colón 636 - Piso 8 Of. A
> X5000EPT -- Córdoba
> Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
> Cel.: +54 9 351 6629292
>



Re: Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
On 2012-09-27 21:44:21 +0800, ac@hsk.hk wrote:
> Hi,
>
> I have tried to compile it in my local machine, I could not reproduce the issue yet.
>
> Does anyone else have idea what the reason would be? Would the issue come from the config file?
>
> Regards
> Arthur
>
> On 27 Sep 2012, at 7:46 PM, Leonardo M. Ramé wrote:
>
> > On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
> >> Hi,
> >>
> >> Could you provide the steps and commands you used to compile 9.1?
> >>
> >> I want to reproduce your case in my machine
> >>
> >> Regards
> >> Arthur
> >>
> >
> > Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> > then did this:
> >
> > tar xvfz postgresql-9.1.5.tar.gz
> > cd postgresql-9.1.5
> > ./configure
> > make
> > make install
> >
> > This, apart from copying the server files, created the
> > /usr/local/pgsql/lib directory, where I have libpq.so and many more
> > shared libraries.
> >
> > --
> > Leonardo M. Ramé
> > Medical IT - Griensu S.A.
> > Av. Colón 636 - Piso 8 Of. A
> > X5000EPT -- Córdoba
> > Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
> > Cel.: +54 9 351 6629292
> >
>

Arthur, could you post the results of "ldd
/usr/local/pgsql/lib/libpq.so" ?.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292



Re: Linux PowerPC 64bits issue

From
Adrian Klaver
Date:
On 09/27/2012 04:46 AM, Leonardo M. Ramé wrote:
> On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
>> Hi,
>>
>> Could you provide the steps and commands you used to compile 9.1?
>>
>> I want to reproduce your case in my machine
>>
>> Regards
>> Arthur
>>
>
> Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> then did this:
>
> tar xvfz postgresql-9.1.5.tar.gz
> cd postgresql-9.1.5
> ./configure
> make
> make install

By any chance did you in the past install a Postgres RPM that may
introduced 32 bit libraries that the source is linking against?

>
> This, apart from copying the server files, created the
> /usr/local/pgsql/lib directory, where I have libpq.so and many more
> shared libraries.
>


--
Adrian Klaver
adrian.klaver@gmail.com


Re: Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
On 2012-09-27 06:53:57 -0700, Adrian Klaver wrote:
> On 09/27/2012 04:46 AM, Leonardo M. Ramé wrote:
> >On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
> >>Hi,
> >>
> >>Could you provide the steps and commands you used to compile 9.1?
> >>
> >>I want to reproduce your case in my machine
> >>
> >>Regards
> >>Arthur
> >>
> >
> >Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> >then did this:
> >
> >tar xvfz postgresql-9.1.5.tar.gz
> >cd postgresql-9.1.5
> >./configure
> >make
> >make install
>
> By any chance did you in the past install a Postgres RPM that may
> introduced 32 bit libraries that the source is linking against?
>

Well, this is an inherited server, so everything is possible. Let me
check.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292



Re: Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
On 2012-09-27 06:53:57 -0700, Adrian Klaver wrote:
> On 09/27/2012 04:46 AM, Leonardo M. Ramé wrote:
> >On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
> >>Hi,
> >>
> >>Could you provide the steps and commands you used to compile 9.1?
> >>
> >>I want to reproduce your case in my machine
> >>
> >>Regards
> >>Arthur
> >>
> >
> >Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> >then did this:
> >
> >tar xvfz postgresql-9.1.5.tar.gz
> >cd postgresql-9.1.5
> >./configure
> >make
> >make install
>
> By any chance did you in the past install a Postgres RPM that may
> introduced 32 bit libraries that the source is linking against?
>

Is it possible to force linking against only to libraries residing in my
/usr/lib64 ?.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292



Re: Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
On 2012-09-27 11:02:48 -0300, Leonardo M. Ramé wrote:
> On 2012-09-27 06:53:57 -0700, Adrian Klaver wrote:
> > On 09/27/2012 04:46 AM, Leonardo M. Ramé wrote:
> > >On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
> > >>Hi,
> > >>
> > >>Could you provide the steps and commands you used to compile 9.1?
> > >>
> > >>I want to reproduce your case in my machine
> > >>
> > >>Regards
> > >>Arthur
> > >>
> > >
> > >Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> > >then did this:
> > >
> > >tar xvfz postgresql-9.1.5.tar.gz
> > >cd postgresql-9.1.5
> > >./configure
> > >make
> > >make install
> >
> > By any chance did you in the past install a Postgres RPM that may
> > introduced 32 bit libraries that the source is linking against?
> >
>
> Is it possible to force linking against only to libraries residing in my
> /usr/lib64 ?.
>
> --
> Leonardo M. Ramé
> Medical IT - Griensu S.A.
> Av. Colón 636 - Piso 8 Of. A
> X5000EPT -- Córdoba
> Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
> Cel.: +54 9 351 6629292
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

I'd executed this command to remove all 32 bit packages from the system
(remember this is an OpenSuse system):

rpm -qa --qf '%{name}.%{arch}\n' | grep 'i[36]86$' | xargs rpm -e

But it returned "rpm: no packages given for erase". So, there shouldn't
be 32bit libraries in the system.


Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292



Re: Linux PowerPC 64bits issue

From
Leonardo M. Ramé
Date:
On 2012-09-27 11:21:04 -0300, Leonardo M. Ramé wrote:
> On 2012-09-27 11:02:48 -0300, Leonardo M. Ramé wrote:
> > On 2012-09-27 06:53:57 -0700, Adrian Klaver wrote:
> > > On 09/27/2012 04:46 AM, Leonardo M. Ramé wrote:
> > > >On 2012-09-27 11:51:46 +0800, ac@hsk.hk wrote:
> > > >>Hi,
> > > >>
> > > >>Could you provide the steps and commands you used to compile 9.1?
> > > >>
> > > >>I want to reproduce your case in my machine
> > > >>
> > > >>Regards
> > > >>Arthur
> > > >>
> > > >
> > > >Yes, I downloaded postgresql-9.1.5.tar.gz from the PostgreSql web site,
> > > >then did this:
> > > >
> > > >tar xvfz postgresql-9.1.5.tar.gz
> > > >cd postgresql-9.1.5
> > > >./configure
> > > >make
> > > >make install
> > >
> > > By any chance did you in the past install a Postgres RPM that may
> > > introduced 32 bit libraries that the source is linking against?
> > >
> >
> > Is it possible to force linking against only to libraries residing in my
> > /usr/lib64 ?.
> >
> > --
> > Leonardo M. Ramé
> > Medical IT - Griensu S.A.
> > Av. Colón 636 - Piso 8 Of. A
> > X5000EPT -- Córdoba
> > Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
> > Cel.: +54 9 351 6629292
> >
> >
> >
> > --
> > Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-general
>
> I'd executed this command to remove all 32 bit packages from the system
> (remember this is an OpenSuse system):
>
> rpm -qa --qf '%{name}.%{arch}\n' | grep 'i[36]86$' | xargs rpm -e
>
> But it returned "rpm: no packages given for erase". So, there shouldn't
> be 32bit libraries in the system.
>
>

I've found the culpit:

:#ldd /lib/libpthread-2.4.so
linux-vdso32.so.1 =>  (0x00100000)
libc.so.6 => /lib/power6x/libc.so.6 (0x07e8c000)
/lib/ld.so.1 (0xf7fe1000)

Now I must find out how to install libpthread for 64 bits.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 351 6629292