Operating System - Linux
1753379 Members
4870 Online
108792 Solutions
New Discussion юеВ

Re: correct way of linking postgresql from iexpress (32 vs. 64bit)?

 
SOLVED
Go to solution
Florian Heigl (new acc)
Honored Contributor

correct way of linking postgresql from iexpress (32 vs. 64bit)?

Hi,

I had the following command fail during a software build:

/opt/gcc343/pa20_64/bin/g++ -O -L../lib -L../cats -L../findlib -o bscan bscan.o block.o device.o dev.o label.o ansi_label.o dvd.o ebcdic.o autochanger.o acquire.o mount.o record.o match_bsr.o parse_bsr.o reserve.o butil.o read_record.o stored_conf.o spool.o wait.o \
-lsql -L/opt/iexpress/postgresql/lib -lpq -lz -lfind -lbac -lm -lpthread -lgen
/opt/iexpress/postgresql/lib/libpq.sl: file not recognized: File format not recognized
collect2: ld returned 1 exit status


my environment is set as follows:
export PATH=/opt/gcc343/pa20_64/bin:/usr/local/bin:$PATH
export MAKE=gmake
export CC=gcc

Upon checking I could see that /opt/iexpress/postgresql/lib/libpq.sl is a 32bit PA-RISC 1.0 library, while /opt/iexpress/postgresql/lib/pa20_64/libpq.sl is the 64bit version I need.

As my software is usually only supplied a base path (i.e. /opt/iexpress/mysql), I'm really curious to what the right way[tm] is in such a situation?

If I hadn't set out to resolve all issues on the way, I'd just move everything from lib/pa20_64/ to lib :)

Can anyone share some insight with me?
yesterday I stood at the edge. Today I'm one step ahead.
4 REPLIES 4
ranganath ramachandra
Esteemed Contributor

Re: correct way of linking postgresql from iexpress (32 vs. 64bit)?

looks like this problem is because of the

"-L /opt/iexpress/postgresql/lib"

in the link line. you simply have to change it to

"-L /opt/iexpress/postgresql/lib/pa20_64"

if you still have problems. look at all the other paths specified with "-L" and make sure that they point to directories containing the appropriate versions of libraries.
 
--
ranga
[i work for hpe]

Accept or Kudo

Florian Heigl (new acc)
Honored Contributor

Re: correct way of linking postgresql from iexpress (32 vs. 64bit)?

And how can I achieve the same before running ./configure ?
Is this an LDFLAG?
yesterday I stood at the edge. Today I'm one step ahead.
ranganath ramachandra
Esteemed Contributor

Re: correct way of linking postgresql from iexpress (32 vs. 64bit)?

well i'm not sure about the configure for this particular package. check if "configure --help" lists any option that configures the whole thing for 64bit.
 
--
ranga
[i work for hpe]

Accept or Kudo

Arunvijai_4
Honored Contributor
Solution

Re: correct way of linking postgresql from iexpress (32 vs. 64bit)?

Hello,

Yes, you can export LDFLAGS and SHLIB_PATH before starting ./configure..

Other way is, editing the corresponding makefile to add /opt/iexpress/postgresql/lib/pa20_64

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"