This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Problem, 32-bit vs. 64-bit?

Amiri Barksdale writes:
 > I am a developer running CentOS 4 on a web server (no desktop), and am  
 > running into what I can only imagine must be a problem with 32 bit  
 > versus 64 bit code.
 > I am trying to compile an unfortunately closed-source module from a  
 > company called Cybersource. The error message is the following:
 > gcc -c  -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe - 
 > Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE - 
 > D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m64   - 
 > DVERSION=\"5.0.0\" -DXS_VERSION=\"5.0.0\" -fPIC "-I/usr/lib64/ 
 > perl5/5.8.8/x86_64-linux-thread-multi/CORE"   SOAPI.c
 > In file included from SOAPI.xs:5:
 > ppport.h:227:1: warning: "PERL_UNUSED_DECL" redefined
 > In file included from SOAPI.xs:2:
 > /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perl.h:163:1:  
 > warning: this is the location of the previous definition
 > Running Mkbootstrap for CyberSource::SOAPI ()
 > chmod 644
 > rm -f blib/arch/auto/CyberSource/SOAPI/
 > LD_RUN_PATH="/home/amiri/simapi-perl-5.0.0/lib" gcc  -shared SOAPI.o  - 
 > o blib/arch/auto/CyberSource/SOAPI/ 	\
 >     -L/home/amiri/simapi-perl-5.0.0/lib -lcybersource -lspapache -lstdc 
 > ++ -lxalan-c1_5_0 -lxerces-c  	\
 > /usr/bin/ld: skipping incompatible /home/amiri/simapi-perl-5.0.0/lib/ 
 > libcybersource.a when searching for -lcybersource
 > /usr/bin/ld: cannot find -lcybersource
 > collect2: ld returned 1 exit status
 > make: *** [blib/arch/auto/CyberSource/SOAPI/] Error 1
 > I see quite clearly that it is skipping an incompatible binary. But I  
 > should be able to make it use the proper tool, no? I do not know how.
 > I have tried aliasing gcc to gcc -m32; I have tried changing my  
 > Makefile so that LDFLAGS=-m32, and so that CC=gcc -m32, etc., but none  
 > of that worked.
 > If I do use those -m32 flags, I get the following:
 > cp lib/libcybersource.a blib/lib/libcybersource.a
 > cp lib/ blib/lib/
 > cp lib/ blib/lib/
 > cp lib/ blib/lib/
 > cp blib/lib/CyberSource/
 > AutoSplitting blib/lib/CyberSource/ (blib/lib/auto/CyberSource/ 
 > cp lib/ blib/lib/
 > cp lib/ blib/lib/
 > /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/ 
 > perl5/5.8.8/ExtUtils/typemap -typemap typemap  SOAPI.xs > SOAPI.xsc &&  
 > mv SOAPI.xsc SOAPI.c
 > Please specify prototyping behavior for SOAPI.xs (see perlxs manual)

 > /usr/bin/gcc -m32 -c  -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict- 
 > aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include - 
 > D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g - 
 > pipe -m64   -DVERSION=\"5.0.0\" -DXS_VERSION=\"5.0.0\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"   SOAPI.c

This wrong: if you're using -m32, you can't also use -m64.  You should
be including /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE instead
of /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/.


Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]