autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to compile 32bit library on 64bit x86_64 systems?


From: Geeky Jim
Subject: Re: How to compile 32bit library on 64bit x86_64 systems?
Date: Fri, 14 Sep 2007 14:01:43 -0500

Hi Ralf,

I am one step closer.  I have partially answered my own question below:

On 9/14/07, Geeky Jim <address@hidden> wrote:
> Hi Ralf,
>
> > Hello Jim,
> >
> > * Geeky Jim wrote on Fri, Sep 14, 2007 at 08:00:30PM CEST:
> > >
> > > I am having difficulties creating libpqxx 2.6.9 as a 32bit library on 
> > > 64bit
> > > x86_64 systems.
> > > It is packaged using GNU buildtools.  I tried to insert all the flags 
> > > below
> > > within the
> > >  Makefile.am, but the build is very persistent in making
> >
> > Try not changing the package at all, but
> >
> >   ./configure CPPFLAGS=-m32 LDFLAGS=-m32
> >   make
> >
> > and if that fails, then please post the output of
> >   ./libtool --config
> >   ./libtool --version
> >
> > and the part of 'make' output where libpqxx.la is created.
>
> Your method of passing in the flag parameters via the configure script works.
> But the make process failed, because the library path is still pointed to here
>
> -L/usr/lib64
>
> (Is there a flag I can override -L/usr/lib64 to -L/usr/lib?)

./configure CPPFLAGS=-m32 LDFLAGS="-m32 -L/usr/lib"

This resolved most of my library link issues, except the following errors.
I was able to provide an extra library path to the linker but I don't
know how to dis-association any 64 bit file references.

/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2  -release 2.6.9
-rpath /home/jim/local/lib  -m32 -L/usr/lib -L/usr/lib64 -o libpqxx.la
-rpath /home/jim/local/lib binarystring.lo cachedresult.lo
connection_base.lo connection.lo cursor.lo dbtransaction.lo except.lo
largeobject.lo nontransaction.lo oldcursor.lo pipeline.lo
prepared_statement.lo result.lo robusttransaction.lo subtransaction.lo
tablereader.lo tablestream.lo tablewriter.lo transaction.lo
transaction_base.lo util.lo  -lpq -lpq
g++ -shared -nostdlib
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o
.libs/binarystring.o .libs/cachedresult.o .libs/connection_base.o
.libs/connection.o .libs/cursor.o .libs/dbtransaction.o .libs/except.o
.libs/largeobject.o .libs/nontransaction.o .libs/oldcursor.o
.libs/pipeline.o .libs/prepared_statement.o .libs/result.o
.libs/robusttransaction.o .libs/subtransaction.o .libs/tablereader.o
.libs/tablestream.o .libs/tablewriter.o .libs/transaction.o
.libs/transaction_base.o .libs/util.o  -L/usr/lib -L/usr/lib64 -lpq
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o  -m32
-Wl,-soname -Wl,libpqxx-2.6.9.so -o .libs/libpqxx-2.6.9.so
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libstdc++.so when searching for
-lstdc++
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libstdc++.a when searching for
-lstdc++
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgcc_s.so when searching for
-lgcc_s
/usr/bin/ld: warning: i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o' is
incompatible with i386 output
/usr/bin/ld: warning: i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o' is incompatible
with i386 output
/usr/bin/ld: warning: i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o' is incompatible
with i386 output
/usr/bin/ld: warning: i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o' is
incompatible with i386 output
(cd .libs && rm -f libpqxx.so && ln -s libpqxx-2.6.9.so libpqxx.so)
ar cru .libs/libpqxx.a  binarystring.o cachedresult.o
connection_base.o connection.o cursor.o dbtransaction.o except.o
largeobject.o nontransaction.o oldcursor.o pipeline.o
prepared_statement.o result.o robusttransaction.o subtransaction.o
tablereader.o tablestream.o tablewriter.o transaction.o
transaction_base.o util.o
ranlib .libs/libpqxx.a
creating libpqxx.la
(cd .libs && rm -f libpqxx.la && ln -s ../libpqxx.la libpqxx.la)
make[1]: Leaving directory `/home/jim/Download/libpqxx-2.6.9/src'
Making all in test
make[1]: Entering directory `/home/jim/Download/libpqxx-2.6.9/test'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jim/Download/libpqxx-2.6.9/test'
Making all in tools
make[1]: Entering directory `/home/jim/Download/libpqxx-2.6.9/tools'
g++ -DHAVE_CONFIG_H -I. -I../include/pqxx -I../include -I../include
-I/usr/include  -m32  -g -O2  -MT rmlo.o -MD -MP -MF .deps/rmlo.Tpo -c
-o rmlo.o rmlo.cxx
mv -f .deps/rmlo.Tpo .deps/rmlo.Po
/bin/sh ../libtool --tag=CXX   --mode=link g++  -g -O2   -m32
-L/usr/lib -L/usr/lib64 -o rmlo rmlo.o ../src/libpqxx.la  -lpq -lpq
mkdir .libs
g++ -g -O2 -m32 -o .libs/rmlo rmlo.o  -L/usr/lib -L/usr/lib64
../src/.libs/libpqxx.so -lpq -Wl,--rpath -Wl,/home/jim/local/lib
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/crti.o: In
function `call_gmon_start':
(.text+0x15): undefined reference to `__gmon_start__'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib/crti.o: In
function `call_gmon_start':
(.text+0x1e): undefined reference to `__gmon_start__'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/32/crtbegin.o: In function `frame_dummy':
crtstuff.c:(.text+0x70): undefined reference to `_Jv_RegisterClasses'
collect2: ld returned 1 exit status
make[1]: *** [rmlo] Error 1
make[1]: Leaving directory `/home/jim/Download/libpqxx-2.6.9/tools'
make: *** [all-recursive] Error 1

Thank you,
Jim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]