Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 87258 invoked from network); 27 Jul 2007 14:20:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jul 2007 14:20:45 -0000 Received: (qmail 8437 invoked by uid 500); 27 Jul 2007 14:20:46 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 8284 invoked by uid 500); 27 Jul 2007 14:20:46 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 8275 invoked by uid 99); 27 Jul 2007 14:20:46 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 07:20:46 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.105.164.5] (HELO smtpmail2.sensis.com) (199.105.164.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 14:20:38 +0000 Received: from dimstar3.ats.sensis.com ([172.21.1.34]) by smtpmail2.sensis.com with esmtp (Exim 4.50) id 1IEQfs-0006MG-JB for dev@activemq.apache.org; Fri, 27 Jul 2007 10:20:17 -0400 Received: from corpatsmail1.ats.sensis.com ([172.21.1.88] helo=corpatsmail1.corp.sensis.com) by dimstar3.ats.sensis.com with esmtp (Exim 4.63) (envelope-from ) id 1IEQfB-0000dS-AO for dev@activemq.apache.org; Fri, 27 Jul 2007 10:19:30 -0400 Received: from 172.21.6.29 ([172.21.6.29]) by corpatsmail1.corp.sensis.com ([172.21.1.88]) with Microsoft Exchange Server HTTP-DAV ; Fri, 27 Jul 2007 14:19:28 +0000 Received: from tbish-laptop.ats.sensis.com by corpatsmail1.corp.sensis.com; 27 Jul 2007 10:19:31 -0400 Subject: Re: ActiveMQ-CPP on AIX using IBM compilers dynamic_cast in TCPTransport.cpp always returning NULL From: Timothy Bish To: dev@activemq.apache.org In-Reply-To: <11830194.post@talk.nabble.com> References: <11820667.post@talk.nabble.com> <46A92BC1.3030702@twcny.rr.com> <11830194.post@talk.nabble.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 27 Jul 2007 10:19:31 -0400 Message-Id: <1185545971.4555.1.camel@tbish-laptop.ats.sensis.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-1.fc7) X-Sensis-MailScanner-Information: Scanned at Sensis Corporation by MailScanner X-Sensis-MailScanner: Found to be clean X-Sensis-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-2.912, required 5, ALL_TRUSTED -1.80, AWL -0.09, BAYES_00 -2.60, TW_DB 0.08, WHOIS_MYPRIVREG 1.50) X-Sensis-MailScanner-From: tim.bish@sensis.com X-Virus-Checked: Checked by ClamAV on apache.org The 2.1 Release candidate is available for download and supports building as a shared lib, you could try that to see if it makes any difference. Get it here: http://activemq.apache.org/cms/activemq-cpp-21-release.html Regards Tim. On Fri, 2007-07-27 at 07:15 -0700, stevejsaunders wrote: > > Tim Bish wrote: > > > > stevejsaunders wrote: > >> We have been testing some things with building ActiveMQ-CPP on Windows, > >> Linux > >> (RedHat Enterprise Linux v3.1), HP-UX (v11i (B.11.11)), Solaris 9 SPARC > >> and > >> AIX v5.2 and v5.3 all using the native commercial compilers (e.g. GNU for > >> Linux, aCC for HP-UX, Studio 8 on Solaris 9, v6 and v8 Visual C/C++ > >> Enterprise on AIX. > >> > >> With some minor coding changes to get it to build on Solaris and HP-UX > >> related to STL and getting the build work with our other DSOs and EXEs we > >> have been successfull so far. > >> > >> One thing we can't get to work is on AIX. On this OS we are using just > >> the > >> src/main/activemq/examples/example program and in > >> src/main/activemq/transport/TcpTransport.cpp line 61 the dynamic_cast > >> line > >> (IOTransport* ioTransport = dynamic_cast( next );) always > >> returns a NULL. > >> The next instance when dereferenced in the in the debugger shows a valid > >> Transport class. > >> > >> We are smart enough to know about having the RTTI turned on via the > >> compiler > >> and we have created several stand alone programs to verify that > >> dynamic_cast > >> works on these servers using several different compiler options. We even > >> created a static library that uses it and an EXE that loads it directly > >> and > >> indirectly through a DSO and it works fine. > >> > >> I am at a lost on what to do next. I have tried to compile it 50 > >> different > >> ways and such and nothing is working. > >> > >> Attached is the config.log from the configure run. > >> Here is what shows up on the command-line from running the example > >> program: > >> atl1ax03(rrc):/home/rrc/activemq-cpp-2.0.1-src/src/examples$ ./example > >> ===================================================== > >> Starting the example: > >> ----------------------------------------------------- > >> TcpTransport::TcpTransport - transport must be of type IOTransport > >> FILE: activemq/transport/TcpTransport.cpp, LINE: 64 > >> FILE: activemq/transport/TcpTransport.cpp, LINE: 89 > >> FILE: activemq/transport/TcpTransportFactory.cpp, LINE: 70 > >> FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 190 > >> TcpTransport::TcpTransport - transport must be of type IOTransport > >> FILE: activemq/transport/TcpTransport.cpp, LINE: 64 > >> FILE: activemq/transport/TcpTransport.cpp, LINE: 89 > >> FILE: activemq/transport/TcpTransportFactory.cpp, LINE: 70 > >> FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 190 > >> ----------------------------------------------------- > >> Finished with the example, ignore errors from this > >> point on as the sockets breaks when we shutdown. > >> ===================================================== > >> > >> > >> > >> > >> I even changed the dynamic_cast to a static_cast just to see what whould > >> happen and here is the dbx output: > >> atl1ax03(rrc):/home/rrc/activemq-cpp-2.0.1-src/src/examples$ dbx > >> `pwd`/example core > >> Type 'help' for help. > >> [using memory image in core] > >> reading symbolic information ... > >> > >> Illegal instruction (illegal opcode) in . at 0x0 ($t3) > >> warning: Unable to access address 0x0 from core > >> (dbx) where > >> warning: Unable to access address 0xfffffffffffffffc from core > >> warning: Unable to access address 0xfffffffffffffffc from core > >> warning: Unable to access address 0xfffffffffffffffc from core > >> warning: Unable to access address 0xfffffffffffffffc from core > >> .() at 0x0 > >> unnamed block $b21117, line 120 in "WireFormatInfoMarshaller.cpp" > >> unnamed block $b21116, line 120 in "WireFormatInfoMarshaller.cpp" > >> activemq::connector::openwire::marshal::v2::WireFormatInfoMarshaller::looseUnmarshal(activemq::connector::openwire::OpenWireFormat*,activemq::connector::openwire::commands::DataStructure*,activemq::io::DataInputStream*)(this > >> = 0x301899c8, wireFormat = 0x30189068, dataStructure = 0x301a855c, dataIn > >> = > >> 0x3018a008), line 120 in "WireFormatInfoMarshaller.cpp" > >> unnamed block $b5610, line 246 in "OpenWireFormat.cpp" > >> unnamed block $b5609, line 246 in "OpenWireFormat.cpp" > >> unnamed block $b5608, line 246 in "OpenWireFormat.cpp" > >> doUnmarshal(activemq::io::DataInputStream*)(this = 0x30189068, dis = > >> 0x3018a008), line 246 in "OpenWireFormat.cpp" > >> unnamed block $b5600, line 185 in "OpenWireFormat.cpp" > >> unnamed block $b5599, line 185 in "OpenWireFormat.cpp" > >> unmarshal(activemq::io::DataInputStream*)(this = 0x30189068, dis = > >> 0x3018a008), line 185 in "OpenWireFormat.cpp" > >> unnamed block $b5956, line 71 in "OpenWireCommandReader.cpp" > >> unnamed block $b5955, line 71 in "OpenWireCommandReader.cpp" > >> activemq::connector::openwire::OpenWireCommandReader::readCommand()(this > >> = > >> 0x30188b37), line 71 in "OpenWireCommandReader.cpp" > >> unnamed block $b8254, line 166 in "IOTransport.cpp" > >> activemq::transport::IOTransport::run()(this = 0x3012ee78), line 166 in > >> "IOTransport.cpp" > >> runCallback(void*)(param = 0x3018a118), line 152 in "Thread.cpp" > >> > >> > >> Here is the activemq server startup end: > >> INFO TransportServerThreadSupport - Listening for connections at: > >> tcp://atl1ax03:61616 > >> INFO TransportConnector - Connector default Started > >> INFO TransportServerThreadSupport - Listening for connections at: > >> stomp://atl1ax03:61613 > >> INFO TransportConnector - Connector stomp Started > >> INFO BrokerService - ActiveMQ JMS Message Broker > >> (localhost, ID:atl1ax03-61252-1185490832763-1:0) started > >> > >> > >> http://www.nabble.com/file/p11820667/config.log config.log > >> http://www.nabble.com/file/p11820667/config.status config.status > >> > >> > >> > >> > > We don't do any testing on AIX so its hard to say, it really sounds like > > rtti isn't enabled. You will definitely need it as ActiveMQ-CPP relies > > quite heavily on it, and no static_cast won't work as it doesn't > > navigate the inheritance hierarchy, so you won't get a vtable pointer > > that works. > > > > Its possible the configure script isn't getting CXXFLAGS setup correctly > > for AIX. You can compare the output of the compile to your own sample > > and see what flags are missing. You can have the script add more to > > CXXFLAGS by running ./configure CXXFLAGS= > > > > regards > > Tim. > > > > > > > > > > I kinda figured that the exposure to other Unix flavors other than Linux was > limited based on the postings I have seen. > > Thanks for your suggestions but these two things have already been checked > and double checked. The RTTI flag is on, this is what we suspected from the > beginning based on the behavior. The testing program and this program have > been compiled with the same exact arguments, the output from the builds were > captured and the compile and archive and link of the ActiveMQ-CPP example > were compared. > > I am starting to think because the very large size of the static library > generated for ActiveMQ-CPP that we are having some other sort of problem > with the linker. > > Thanks, > Steve > >