Operating System - HP-UX
1752590 Members
2969 Online
108788 Solutions
New Discussion

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

 
SOLVED
Go to solution
sunsl
Occasional Advisor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

"make clean" was always done before creating lib/libCommon.a. 

 

I didn't use XPADE.

 

Following contains most of the machinfo output: My server should be a Itanium instead of the PA-RISC machine.

machinfo
CPU info:
5 Intel(R) Itanium 2 9100 series processors (1.59 GHz, 12 MB)
266 MHz bus, CPU version A1

Memory: 12282 MB (11.99 GB)

Firmware info:
Firmware revision: 04.20.00
FP SWA driver revision: 1.18
IPMI is supported on this system.
BMC firmware revision: 4.14

Platform info:
Model: "ia64 hp server Integrity Virtual Machine"

 

OS info:
Nodename:

Release: HP-UX B.11.31
Version: U (unlimited-user license)
Machine: ia64
ID Number: 2730369916
vmunix _release_version:
@(#) $Revision: vmunix: B.11.31_LR FLAVOR=perf

 

Thanks again for looking into this,

Dennis Handly
Acclaimed Contributor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

>"make clean" was always done before creating lib/libCommon.a.

 

Please make sure you do a "rm -f lib/libCommon.a".

Make sure you hunt down all copies of libCommon.a and all copies of objects that go into that archive and remove them.

Make sure that you do a "file *.o" on each object file directory and the output is like:

foo.o:         ELF-64 relocatable object file - IA64

sunsl
Occasional Advisor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

After "make clean", all the .o and .a files were removed. Then the make command generated all the .o files and those two .a files without a problem as usual. The the result of all the "file ~.o" all showns "ELF-64 relocatable object file - IA64". But same ld  warning and error were reported again when trying to build another module and link it with -lCommon -lNet -lrwtool_v2. BTW, my aCC and ld are the 2009 version on this server. 

sunsl
Occasional Advisor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

Dennis: You are right. I searched libNet.a on the entire server and saw multiple copies and then realized that the LIBPATH pointed to a very old lib folder. After corrected it, the issues was resolved. You are great.

Dennis Handly
Acclaimed Contributor
Solution

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

>the issues was resolved. You are great.

 

Great!  Please click on the Kudos stars for all replies that were helpful.

Also pick one of them and use the Post Options to mark it as the solution.

sunsl
Occasional Advisor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

Dennis:  I wish that you will receive/enjoy www.biblesforamerica.org as a token of appreciation. BTW, may I know where to click Kudos stars? Also do you have an idea regarding the following ld errors?

 

aCC -v +DD64 +DSitanium2 -L/usr/lib/hpux64 -L/opt/langtools/lib/hpux64 -D_HP_SOURCE +z  -g xxx.o -L/home/users/vision/vision_src/comlib_cpp/lib -lCommon -lNet -lrwtool_v2 -o mascollectorreader
LPATH=/usr/lib/hpux64:/opt/langtools/lib/hpux64
/usr/ccs/bin/ld -o mascollectorreader -u___exit -umain -L/opt/aCC/lib/hpux64 -L
/usr/lib/hpux64 -L /opt/langtools/lib/hpux64 xxx.o -L /home/users/vision/vision_src/comlib_cpp/lib -lCommon -lNet -lrwtool_v2 -lstd_v2 -lCsup -lm -lunwind -lCsup -lc -ldl >/var/tmp/AAA025854 2>&1
/opt/aCC/bin/c++filt </var/tmp/AAA025854 1>&2
ld: Unsatisfied symbol "virtual table of Invalid_Directory" in file xxx.o
ld: Unsatisfied symbol "type info of Invalid_Directory" in file xxx.o

The class Invalid_Directory is defined in the comlib_cpp/include/ErrorLog.h as listed below:
class Invalid_Directory : public exception
{
private:
  const char *desc;

public:
  Invalid_Directory(const char* ExceptionName) : desc(ExceptionName) {;}
  virtual const char* what () const throw() {
    return (const char*)desc;
   }
  virtual ~Invalid_Directory() throw();
};

xxx.C has ”#include <ErrorLog.h>” and “ErrorLog ERROR_LOG; “ and the codes listed below:

        try {

            ERROR_LOG.open(ErrLogDir,ErrLogFile);

        } catch ( Invalid_Directory ) {

            cout << "Error: Failed to open logfile ( dir: " << ErrLogDir << " file: " << ErrLogFile << " )" << endl;
            exit(1);
        }

 

Dennis Handly
Acclaimed Contributor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

>may I know where to click Kudos stars?

 

The Kudos stars are the white stars to the bottom left of each post.

 

>do you have an idea regarding the following ld errors?

ld: Unsatisfied symbol "virtual table of Invalid_Directory"
ld: Unsatisfied symbol "type info of Invalid_Directory"

 

These unsat symbols occur because you haven't defined the key function for that class:

   virtual ~Invalid_Directory() throw();

 

You need to define this virtual destructor.

sunsl
Occasional Advisor

Re: ld: (Warning) Ignore library libCommon.a with bad machine type 15 and ld: Mismatched ABI

I will do the Kudos stars. virtual ~Invalid_Directory() throw() {}; cleared out those errors.