You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Zhuo Yang <zh...@symantec.com> on 2009/03/24 22:33:00 UTC

File type is incorrect when building xerces-c 2.8.0 on Linux x86_64 using GCC 3.4.5

Configure and build xerces-c 2.8.0 using GCC 3.4.6 on Linux x86_64
seemed to be okay.  But how come the binary shows file type is for AMD
processor even though my build system is Intel processor?  Is this a
problem?  
 
 
      Configure steps:
              # export XERCESCROOT=/path/to/xerces-c-src_2_8_0
              # cd $XERCESCROOT/src/xerces
              # ./runConfigure -plinux -cgcc -xg++ -rpthread -z-pthread
 
      Build step: 
             # make
 
      Validate:
             # /usr/sbin/dmidecode --type processor
             Family: Xeon
             Manufacturer: Intel

             # file xerces-c-src_2_8_0/lib/libxerces-c.so.28.0
             libxerces-c.so.28.0: ELF 64-bit LSB shared object, AMD
x86-64, version 1 (SYSV), not stripped
 
Randomly check other files.  The findings are interesting.  Is it
normal?    
 
             # file /usr/lib/libkntlm.so.0.0.0
             /usr/lib/libkntlm.so.0.0.0: ELF 32-bit LSB shared object,
Intel 80386, version 1 (SYSV), stripped

             # file /usr/lib64/libkntlm.so.0.0.0
             /usr/lib64/libkntlm.so.0.0.0: ELF 64-bit LSB shared object,
AMD x86-64, version 1 (SYSV), stripped

 
 
 

Re: File type is incorrect when building xerces-c 2.8.0 on Linux x86_64 using GCC 3.4.5

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Zhuo,

Zhuo Yang <zh...@symantec.com> writes:

> But how come the binary shows file type is for AMD processor even 
> though my build system is Intel processor?
>
> [...]  
>
>               # ./runConfigure -plinux -cgcc -xg++ -rpthread -z-pthread

Here is a note from build instructions[1]:

"If you are building a 64 bit Xerces-C++ using g++ that by default 
 generated 32 bit code (or vice versa), then you will need to specify
 additional compiler and linker options via the -z and -l runConfigure
 options in order to switch the compiler into 64 bit mode (or 32 bit
 mode). These options are architecture-specific and you may need to
 consult the GCC manual to determine which ones to use. For the x86-64,
 PowerPC, and SPARC architectures these options are -m64 (64 bit mode)
 and -m32 (32 bit mode)."

[1] http://xerces.apache.org/xerces-c/build-winunix-2.html#UNIX

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde