Re: Build issues on HP-UX: -mt (501 Views)
Reply
Occasional Advisor
slash_blog
Posts: 10
Registered: ‎05-14-2007
Message 1 of 6 (561 Views)
Accepted Solution

Build issues on HP-UX

I am trying to build a software on HP-UX (HP-UX 11.00). It links against Xerces and Xalan libraries (amongst others).

I am getting the following errors during the final linking phase.
Can somebody help me understand the problem?

I compiled Xerces and Xalan using aCC (
as recommended) while I am using gcc/g++ for building this software, could that be a problem?

 

/usr/ccs/bin/ld: Duplicate symbol "global constructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/Test.o
/usr/ccs/bin/ld: Duplicate symbol "ISSECURE" in files
objs/HP-UX/Main.o and objs/HP-UX/Test.o
/usr/ccs/bin/ld: Duplicate symbol "global destructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/Test.o
/usr/ccs/bin/ld: Duplicate symbol "ISSECURE" in files
objs/HP-UX/Main.o and objs/HP-UX/DataCollector.o
/usr/ccs/bin/ld: Duplicate symbol "global constructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/DataCollector.o
/usr/ccs/bin/ld: Duplicate symbol "global destructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/DataCollector.o
/usr/ccs/bin/ld: Duplicate symbol "ISSECURE" in files
objs/HP-UX/Main.o and objs/HP-UX/ObjectCollector.o
/usr/ccs/bin/ld: Duplicate symbol "global constructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/ObjectCollector.o
/usr/ccs/bin/ld: Duplicate symbol "global destructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/ObjectCollector.o
/usr/ccs/bin/ld: Duplicate symbol "ISSECURE" in files
objs/HP-UX/Main.o and objs/HP-UX/ProbeFactory.o
/usr/ccs/bin/ld: Duplicate symbol "global constructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/ProbeFactory.o
/usr/ccs/bin/ld: Duplicate symbol "global destructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/ProbeFactory.o
/usr/ccs/bin/ld: Duplicate symbol "ISSECURE" in files
objs/HP-UX/Main.o and objs/HP-UX/ShadowProbe.o
/usr/ccs/bin/ld: Duplicate symbol "global constructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/ShadowProbe.o
/usr/ccs/bin/ld: Duplicate symbol "global destructors keyed to
ISSECURE" in files objs/HP-UX/Main.o and objs/HP-UX/ShadowProbe.o
/usr/ccs/bin/ld: Unsatisfied symbols:
  xalanc_1_10::NodeRefList::~NodeRefList()(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanSourceTreeParserLiaison::setEntityResolver(xercesc_2_8::EntityResolver*)
       (first referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanSourceTreeDOMSupport::~XalanSourceTreeDOMSupport()(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMemory::operator delete(void*)(first referenced in
objs/HP-UX/AbsComponent.o) (code)
  xalanc_1_10::OutputString(std::basic_ostream<char,
std::char_traits<char> >&, unsigned short const*,
xercesc_2_8::MemoryManager&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XPathEvaluator::initialize(xercesc_2_8::MemoryManager&)
       (first referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLString::transcode(char const*)(first referenced in
objs/HP-UX/CollectedObject.o) (code)
  xalanc_1_10::XalanSourceTreeParserLiaison::~XalanSourceTreeParserLiaison()(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanSourceTreeParserLiaison::XalanSourceTreeParserLiaison(xalanc_1_10::XalanSourceTreeDOMSupport&,
xercesc_2_8::MemoryManager&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLString::transcode(unsigned short const*)(first
referenced in objs/HP-UX/XmlCommon.o) (code)
  Process58Probe::GetPSInfo(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, std::vector<Item*, std::allocator<Item*> >*)(first referenced in
objs/HP-UX/Process58Probe.o) (code)
  xercesc_2_8::InputSource::setSystemId(unsigned short const*)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::NodeRefList::item(unsigned int) const(first referenced
in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanDOMString::XalanDOMString(xercesc_2_8::MemoryManager&)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XPathEvaluator::selectSingleNode(xalanc_1_10::DOMSupport&,
xalanc_1_10::XalanNode*, unsigned short const*,
xalanc_1_10::PrefixResolver const&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  typeinfo for xercesc_2_8::DOMException(first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  typeinfo for xercesc_2_8::XMLEntityDecl(first referenced in
objs/HP-UX/AbsComponent.o) (data)
  xercesc_2_8::XMLPlatformUtils::fgMemoryManager       (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  typeinfo for xercesc_2_8::BinInputStream(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (data)
  xercesc_2_8::XMLUni::fgDOMWRTFormatPrettyPrint      (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  xalanc_1_10::TranscodeToLocalCodePage(unsigned short const*,
xalanc_1_10::XalanVector<char,
xalanc_1_10::MemoryManagedConstructionTraits<char> >&, bool,
char)(first referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLUni::fgXercescDefaultLocale      (first referenced
in objs/HP-UX/XmlProcessor.o) (data)
  xalanc_1_10::XPathEvaluator::terminate()     (first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLUni::fgDOMComments      (first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  typeinfo for xercesc_2_8::XMLException(first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::XMLUni::fgXercesValidationErrorAsFatal      (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::LocalFileFormatTarget::LocalFileFormatTarget(char
const*, xercesc_2_8::MemoryManager*)(first referenced in
objs/HP-UX/XmlProcessor.o) (code)
  xercesc_2_8::LocalFileInputSource::~LocalFileInputSource()(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanMemMgrs::getDummyMemMgr()      (first referenced
in objs/HP-UX/XmlFileContentProbe.o) (code)
  typeinfo for xercesc_2_8::InputSource(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (data)
  typeinfo for xalanc_1_10::XSLException(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (data)
  xalanc_1_10::XalanSourceTreeDOMSupport::XalanSourceTreeDOMSupport()(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLString::transcode(char const*, unsigned short*,
unsigned int, xercesc_2_8::MemoryManager*)(first referenced in
objs/HP-UX/XmlProcessor.o) (code)
  ProcessProbe::GetPSInfo(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>, std::vector<Item*, std::allocator<Item*> >*)(first referenced in
objs/HP-UX/ProcessProbe.o) (code)
  xalanc_1_10::XPathEvaluator::XPathEvaluator(xercesc_2_8::MemoryManager&)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLAttDefList::serialize(xercesc_2_8::XSerializeEngine&)(first
referenced in objs/HP-UX/AbsComponent.o) (code)
  xalanc_1_10::NodeRefList::NodeRefList(xalanc_1_10::NodeRefListBase
const&, xercesc_2_8::MemoryManager&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanDOMString::s_empty      (first referenced in
objs/HP-UX/XmlFileContentProbe.o) (data)
  xalanc_1_10::XPathEvaluator::~XPathEvaluator()(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLUni::fgDOMNamespaces      (first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::StdOutFormatTarget::StdOutFormatTarget()(first
referenced in objs/HP-UX/XmlProcessor.o) (code)
  xercesc_2_8::DTDEntityDecl::getProtoType() const (first referenced
in objs/HP-UX/AbsComponent.o) (code)
  xalanc_1_10::XalanSourceTreeParserLiaison::parseXMLStream(xercesc_2_8::InputSource
const&, xalanc_1_10::XalanDOMString const&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::DOMImplementationRegistry::getDOMImplementation(unsigned
short const*)(first referenced in objs/HP-UX/XmlProcessor.o) (code)
  xalanc_1_10::XalanSourceTreeInit::XalanSourceTreeInit(xercesc_2_8::MemoryManager&)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanDocumentPrefixResolver::XalanDocumentPrefixResolver(xalanc_1_10::XalanDocument
const*, xalanc_1_10::XalanDOMString const&,
xercesc_2_8::MemoryManager&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::XalanSourceTreeInit::~XalanSourceTreeInit()(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::BinInputStream::~BinInputStream()(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLAttDefList::getProtoType() const (first referenced
in objs/HP-UX/AbsComponent.o) (code)
  getspnam (first referenced in objs/HP-UX/ShadowProbe.o) (code)
  xercesc_2_8::InputSource::InputSource(xercesc_2_8::MemoryManager*)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMemory::operator new(unsigned long)(first referenced
in objs/HP-UX/XmlProcessor.o) (code)
  xercesc_2_8::InputSource::setPublicId(unsigned short const*)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLUni::fgDOMWRTDiscardDefaultContent      (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  xalanc_1_10::XalanReferenceCountedObject::removeReference(xalanc_1_10::XalanReferenceCountedObject*)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::BinInputStream::BinInputStream()(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::LocalFileInputSource::LocalFileInputSource(unsigned
short const*, xercesc_2_8::MemoryManager*)(first referenced in
objs/HP-UX/XmlProcessor.o) (code)
  endspent (first referenced in objs/HP-UX/ShadowProbe.o) (code)
  xercesc_2_8::XMLEntityDecl::~XMLEntityDecl()(first referenced in
objs/HP-UX/AbsComponent.o) (code)
  xercesc_2_8::DTDEntityDecl::serialize(xercesc_2_8::XSerializeEngine&)(first
referenced in objs/HP-UX/AbsComponent.o) (code)
  xercesc_2_8::XMLUni::fgDOMWRTSplitCdataSections      (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::InputSource::setEncoding(unsigned short const*)(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLAttDefList::isSerializable() const (first
referenced in objs/HP-UX/AbsComponent.o) (code)
  xercesc_2_8::PSVIItem::getActualValue() const(first referenced in
objs/HP-UX/AbsComponent.o) (code)
  xercesc_2_8::XMLUni::fgXercesSchemaFullChecking      (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  xalanc_1_10::XalanDocumentPrefixResolver::~XalanDocumentPrefixResolver()(first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLPlatformUtils::Initialize(char const*, char const*,
xercesc_2_8::PanicHandler*, xercesc_2_8::MemoryManager*, bool)(first
referenced in objs/HP-UX/XmlProcessor.o) (code)
  xalanc_1_10::XalanDOMString::XalanDOMString(char const*,
xercesc_2_8::MemoryManager&, unsigned int)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLString::release(unsigned short**)(first referenced
in objs/HP-UX/CollectedObject.o) (code)
  xercesc_2_8::XMLString::release(char**)(first referenced in
objs/HP-UX/XmlCommon.o) (code)
  xercesc_2_8::InputSource::~InputSource()(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xalanc_1_10::NodeRefList::getLength() const(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLPlatformUtils::Terminate()     (first referenced in
objs/HP-UX/XmlProcessor.o) (code)
  xercesc_2_8::XMLUni::fgDOMValidation      (first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::XMLUni::fgXercesDOMHasPSVIInfo      (first referenced
in objs/HP-UX/XmlProcessor.o) (data)
  getspent (first referenced in objs/HP-UX/ShadowProbe.o) (code)
  xalanc_1_10::XalanMemMgrs::getDefaultXercesMemMgr()      (first
referenced in objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::XMLUni::fgDOMDatatypeNormalization      (first
referenced in objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::XMLUni::fgDOMWRTBOM      (first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::XMLUni::fgXercesSchema      (first referenced in
objs/HP-UX/XmlProcessor.o) (data)
  xercesc_2_8::Wrapper4InputSource::Wrapper4InputSource(xercesc_2_8::InputSource*,
bool, xercesc_2_8::MemoryManager*)(first referenced in
objs/HP-UX/XmlProcessor.o) (code)
  xalanc_1_10::XPathEvaluator::evaluate(xalanc_1_10::DOMSupport&,
xalanc_1_10::XalanNode*, unsigned short const*,
xalanc_1_10::PrefixResolver const&)(first referenced in
objs/HP-UX/XmlFileContentProbe.o) (code)
  xercesc_2_8::DTDEntityDecl::isSerializable() const (first
referenced in objs/HP-UX/AbsComponent.o) (code)
/usr/ccs/bin/ld: Found 15 duplicate symbol(s)
collect2: ld returned 1 exit status
make: *** [Release/HP-UX/bl-ovaldi] Error 1

 Thanks for any help,

 

Acclaimed Contributor
Dennis Handly
Posts: 25,199
Registered: ‎03-06-2006
Message 2 of 6 (550 Views)

Re: Build issues on HP-UX

>I compiled Xerces and Xalan using aCC (as recommended) while I am using gcc/g++ for building this software, could that be a problem?

 

Yes, you can't mix g++ with aC++.

 

>ld: Duplicate symbol "ISSECURE" in files

 

This would also be a problem.  This variable should only be defined in one source file, not in a .h file.

 

 

Occasional Advisor
slash_blog
Posts: 10
Registered: ‎05-14-2007
Message 3 of 6 (515 Views)

Re: Build issues on HP-UX


Dennis Handly wrote:

Yes, you can't mix g++ with aC++.


Ok I got that. Thanks Dennis.

I used aCC for building Xerces, Xalan and this software. Now it builds correctly, however it is giving errors during runtime.


$ SHLIB_PATH=/home/obd/HP-UX/lib Release/HP-UX/bl-ovaldi
Segmentation fault (core dumped)

 



The directory /home/obd/HP-UX/lib contains all the libraries required to run bl-ovaldi.



On executing gdb I am getting the following call stack:

Program received signal SIGSEGV, Segmentation fault.
0x77f3da2c in free+0x12c () from /usr/lib/libc.2
(gdb) where
#0  0x77f3da2c in free+0x12c () from /usr/lib/libc.2
#1  0x77fbe5a4 in __thread_mutex_free+0x8c () from /usr/lib/libc.2
#2  0x77d303cc in _HPMutexWrapper::~_HPMutexWrapper+0x34 () from /usr/lib/libstd_v2.2
#3  0x18aaa8 in Version::GetBuild (#aggretxform#426=@0x77ff0794) at ../../src/Version.cpp:74
#4  0x139224 in main (argc=1, argv=0x77ff060c) at ../../src/Main.cpp:70

 



The GetBuild () function (from Version.cpp) is as follows:

#define BUILD 1
string Version::GetBuild() {

       string version;
       ostringstream bld;
       bld << BUILD;
       version.append(bld.str());
   return(version);
}

 



As far as I can see, there is nothing that should dump core here.
Further, this code is working on Linux, Solaris and AIX.

Can somebody help me in further troubleshooting this problem?
Acclaimed Contributor
Dennis Handly
Posts: 25,199
Registered: ‎03-06-2006
Message 4 of 6 (510 Views)

Re: Build issues on HP-UX: -mt

[ Edited ]

>I am getting the following call stack:

 

If you are using libpthread, you must consistently compile with -mt.

 

>#0 0x77f3da2c in free+0x12c /usr/lib/libc.2

 

You could also have heap corruption.

 

Occasional Advisor
slash_blog
Posts: 10
Registered: ‎05-14-2007
Message 5 of 6 (507 Views)

Re: Build issues on HP-UX


Dennis Handly wrote:

If you are using libpthread, you must consistently compile with -mt.


 

That was exactly what was needed. Thanks for your help.

Acclaimed Contributor
Dennis Handly
Posts: 25,199
Registered: ‎03-06-2006
Message 6 of 6 (501 Views)

Re: Build issues on HP-UX: -mt

>That was exactly what was needed.

 

If you are happy with the answers you got, please assign kudos.

Also the solution should be my post not yours.  You can use the Options menu on the right to remove and add the solution.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.