Обсуждение: help: cross compiling PG7.4.1 on IA64 from IA32
Hello, I have been trying unsuccessfully to get PG 7.4.1 built for an IA64 environment using the following: Redhat Taroon (IA64) beta headers and libs installed in /usr/local/ia64-linux Build host: Redhat 9 I386 Build Target: ia64-linux binutils: 2.14 built using IA64 headers (as above) gcc:3.3.3 built using IA64 headers and binutils above, built using --sysroot to /usr/local/ia64-linux Configure script for PG7.4.1: ./configure \ --prefix=/opt/sonar/DB64 \ --with-java \ --enable-thread-safety \ --build=i686-pc-linux-gnu \ --host=ia64-linux \ --with-libraries=/usr/local/ia64-linux/lib \ --with-libs=/usr/local/ia64-linux/include \ LDFLAGS=-L/usr/local/ia64-linux/lib \ CPPFLAGS=-I/usr/local/ia64-linux/include What I get when compiling PG is the following error trying to find /lib/libpthread.so.0. It doesn't seem to be able to find my IA64 version of this library, even though all the other libraries seems to be found okay. The IA64 version of this libaries is definately there (/usr/local/ia64-linux/lib). Any ideas appreciated. --snip of compile output -- ia64-linux-gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing -declarations -fpic -shared -Wl,-soname,libpq.so.3 fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o dllist.o md5.o ip.o wchar.o encnames.o path.o thread.o -L../../../src/port -L/usr/local/ia64-linux/lib -L/usr/local/ia64-l inux/include -lcrypt -lresolv -lnsl -lpthread -Wl,-rpath,/opt/sonar/DB64/lib -o libpq.so.3.1 /usr/local/lib/gcc-lib/ia64-linux/3.3.3/../../../../ia64-linux/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0 /usr/local/lib/gcc-lib/ia64-linux/3.3.3/../../../../ia64-linux/bin/ld: cannot find /lib/libpthread.so.0 collect2: ld returned 1 exit status gmake[3]: *** [libpq.so.3.1] Error 1 gmake[3]: Leaving directory `/development/3.0.0/BUILD-IA64/postgresql-7.4.1/src/interfaces/libpq' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/development/3.0.0/BUILD-IA64/postgresql-7.4.1/src/interfaces' gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory `/development/3.0.0/BUILD-IA64/postgresql-7.4.1/src' gmake: *** [all] Error 2
"Andrew Hall" <temp02@bluereef.com.au> writes: > I have been trying unsuccessfully to get PG 7.4.1 built for an IA64 > environment using the following: > Redhat Taroon (IA64) beta headers and libs installed in > /usr/local/ia64-linux Hmm, PG builds fine for me in Red Hat's RPM build environment. Would you like to try downloading the 7.4.2 RPM or SRPM from fedora.redhat.com? regards, tom lane
Yep, PG 7.4.1 installs fine on a native IA64 box, but not when cross compiling on a IA32 box for IA64. Regardless of what I do, PG always seem to want to link libpthread from /lib (which is the IA32 version) and ignores the LDFLAGS directive pointing it at /usr/local/ia64-linux/lib. I'm suspecting this is hardcoded somewhere in the GCC environment because even when I explicitly tell it to link to the IA64 lib, it completely ignores it. ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "Andrew Hall" <temp02@bluereef.com.au> Cc: <pgsql-ports@postgresql.org> Sent: Tuesday, March 23, 2004 5:11 PM Subject: Re: [PORTS] help: cross compiling PG7.4.1 on IA64 from IA32 > "Andrew Hall" <temp02@bluereef.com.au> writes: > > I have been trying unsuccessfully to get PG 7.4.1 built for an IA64 > > environment using the following: > > > Redhat Taroon (IA64) beta headers and libs installed in > > /usr/local/ia64-linux > > Hmm, PG builds fine for me in Red Hat's RPM build environment. Would > you like to try downloading the 7.4.2 RPM or SRPM from fedora.redhat.com? > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly
"Andrew Hall" <temp02@bluereef.com.au> writes: > Yep, PG 7.4.1 installs fine on a native IA64 box, but not when cross > compiling on a IA32 box for IA64. Regardless of what I do, PG always seem to > want to link libpthread from /lib (which is the IA32 version) and ignores > the LDFLAGS directive pointing it at /usr/local/ia64-linux/lib. I'm > suspecting this is hardcoded somewhere in the GCC environment because even > when I explicitly tell it to link to the IA64 lib, it completely ignores it. I asked about cross-compiling inside Red Hat and was told: : this can only work if you build a cross compile toolchain; it : doesn't look like he did that. (note we don't ship nor support such a : thing). So my guess is there's something wrong with your cross-compilation setup. What exactly is wrong is beyond my field of expertise ... you might try asking some gcc-oriented mailing list. regards, tom lane