Operating System - HP-UX
1753795 Members
6828 Online
108799 Solutions
New Discussion юеВ

Unsatisfied symbol when building mozilla on PA-RISC

 
AdRao
Occasional Advisor

Unsatisfied symbol when building mozilla on PA-RISC

We trying to build mozilla on 11.23 pa. We use
the aCC compiler 3.73 version. We are getting below unsatisfied symbol error.
/usr/ccs/bin/ld: Unsatisfied symbols:
NS_TableDrivenQI(void *,const QITableEntry *,const nsID &,void **) (first referenced in perfcomp.o) (code)
nsISupports::COMTypeInfo::kIID (first referenced in perfcomp.o) (data)
main (Not referenced yet! Probably due to -u option)
abIEDTPPerformanceProfiler::COMTypeInfo::kIID (first referenced in perfcomp.o) (data)

/*nscore.h*/

#ifdef HAVE_VISIBILITY_HIDDEN_ATTRIBUTE
#define NS_VISIBILITY_HIDDEN __attribute__ ((visibility ("hidden")))
#else
#define NS_VISIBILITY_HIDDEN
#endif

#if defined(HAVE_VISIBILITY_ATTRIBUTE)
#define NS_VISIBILITY_DEFAULT __attribute__ ((visibility ("default")))
#else
#define NS_VISIBILITY_DEFAULT
#endif

#define NS_HIDDEN NS_VISIBILITY_HIDDEN

Code snippets are as follows:

/*nsID.h*/

#define NS_DECLARE_STATIC_IID_ACCESSOR(the_iid) \
template \
struct COMTypeInfo \
{ \
typedef nsIID COMTypeIID; \
static const COMTypeIID kIID NS_HIDDEN; \
}; \
static const nsIID& GetIID() {return COMTypeInfo::kIID;}

#define NS_DEFINE_STATIC_IID_ACCESSOR(the_interface, the_iid) \
template \
const nsIID the_interface::COMTypeInfo::kIID NS_HIDDEN = the_iid;

We have attached nscore.h file where NS_HIDDEN is defined. We would like to know is any paltform specific changes that we need to do ther above macros If require we can attach the code that completely builds shared library.

Machine details:

hp-ux 11.23
# aCC -V
aCC: HP ANSI C++ B3910B A.03.73
#

Compilation line:
aCC perfcomp.cpp -D__hppa__ -I/tmp/Temp/deps/mozilla/include -I/tmp/Temp/deps/mozilla/include/unix -AA -D_HPUX_SOURCE



4 REPLIES 4
TTr
Honored Contributor

Re: Unsatisfied symbol when building mozilla on PA-RISC

Dennis Handly
Acclaimed Contributor

Re: Unsatisfied symbol when building mozilla on PA-RISC

>We are getting below unsatisfied symbol error.

Where should these be defined? I see a possible definition of the two kIID variables, depending on the the macro NS_DEFINE_STATIC_IID_ACCESSOR.

>We would like to know is any platform specific changes that we need to do the above macros

You don't want those attributes.

AdRao
Occasional Advisor

Re: Unsatisfied symbol when building mozilla on PA-RISC

Thanks for replying. There defined under nsID.h as below: I have attached the same.

#define NS_DECLARE_STATIC_IID_ACCESSOR(the_iid) \
template \
struct COMTypeInfo \
{ \
typedef nsIID COMTypeIID; \
static const COMTypeIID kIID NS_HIDDEN; \
}; \
static const nsIID& GetIID() {return COMTypeInfo::kIID;}

#define NS_DEFINE_STATIC_IID_ACCESSOR(the_interface, the_iid) \
template \
const nsIID the_interface::COMTypeInfo::kIID NS_HIDDEN = the_iid;

/**
* A macro to build the static const CID accessor method
*/

#define NS_DEFINE_STATIC_CID_ACCESSOR(the_cid) \
static const nsID& GetCID() {static const nsID cid = the_cid; return cid;}

#define NS_GET_IID(T) (::T::COMTypeInfo::kIID)

#if defined (__hppa__) || defined (__hppa)

template
inline typename T::template COMTypeInfo::COMTypeIID
ReturnDestTypeCOMTypeInfo (T *)
{
typedef typename T::template COMTypeInfo DCI;
return DCI::kIID;
}
Dennis Handly
Acclaimed Contributor

Re: Unsatisfied symbol when building mozilla on PA-RISC

>There defined under nsID.h as below

Rather than feed me small chunks at a time, if your sources aren't proprietary, can you create a .i file for perfcomp.C with "-E -.i" and attach it?
(You may need to gzip it.)

And do the same for where you think those symbols should be defined.