Different bitness

Started by Igor Korotover 5 years ago3 messagesgeneral
Jump to latest
#1Igor Korot
ikorot01@gmail.com

Hi, ALL,

[code]

CC -m64 -std=c++11 -o
dist/Debug/OracleDeveloperStudio-Solaris-x86/liblibpostgres.so
build/Debug/OracleDeveloperStudio-Solaris-x86/database_postgres.o
-L../postgresql/src/interfaces/libpq -lpq -m64 -std=c++11 -G -KPIC
-norunpath -h liblibpostgres.so
ld: fatal: file ../postgresql/src/interfaces/libpq/libpq.so: wrong ELF
class: ELFCLASS32
*** Error code 2
[/code]

However testing the library reveals:

[code]

igor@solaris:~/dbhandlerSol/libpq/src/interfaces/libpq$ file libpq.so
libpq.so: ELF 64-bit LSB dynamic lib AMD64 Version 1 [SSE2 SSE],
dynamically linked, not stripped
[/code]

What is wrong here?

I did do the clean the default 32-bit build and then rebuild with:

[code]
CFLAGS="-m64" LDFLAGS="-m64" ./configure && cd src/interface/libpq && gmake
[/code]

What am I missing?

Thank you.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Igor Korot (#1)
Re: Different bitness

Igor Korot <ikorot01@gmail.com> writes:

ld: fatal: file ../postgresql/src/interfaces/libpq/libpq.so: wrong ELF
class: ELFCLASS32

That path doesn't seem to quite agree with this one:

igor@solaris:~/dbhandlerSol/libpq/src/interfaces/libpq$ file libpq.so

regards, tom lane

#3Igor Korot
ikorot01@gmail.com
In reply to: Tom Lane (#2)
Re: Different bitness

Thx, Tom.

Show quoted text

On Sun, Nov 8, 2020 at 2:21 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Igor Korot <ikorot01@gmail.com> writes:

ld: fatal: file ../postgresql/src/interfaces/libpq/libpq.so: wrong ELF
class: ELFCLASS32

That path doesn't seem to quite agree with this one:

igor@solaris:~/dbhandlerSol/libpq/src/interfaces/libpq$ file libpq.so

regards, tom lane