Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 85766 invoked from network); 27 Jul 2007 14:15:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jul 2007 14:15:33 -0000 Received: (qmail 1521 invoked by uid 500); 27 Jul 2007 14:15:34 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 1390 invoked by uid 500); 27 Jul 2007 14:15:33 -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 1380 invoked by uid 99); 27 Jul 2007 14:15:33 -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:15:33 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 14:15:26 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IEQaw-00087I-4a for dev@activemq.apache.org; Fri, 27 Jul 2007 07:15:06 -0700 Message-ID: <11830194.post@talk.nabble.com> Date: Fri, 27 Jul 2007 07:15:06 -0700 (PDT) From: stevejsaunders To: dev@activemq.apache.org Subject: Re: ActiveMQ-CPP on AIX using IBM compilers dynamic_cast in TCPTransport.cpp always returning NULL In-Reply-To: <46A92BC1.3030702@twcny.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ssaunders@docucorp.com References: <11820667.post@talk.nabble.com> <46A92BC1.3030702@twcny.rr.com> X-Virus-Checked: Checked by ClamAV on apache.org 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 -- View this message in context: http://www.nabble.com/ActiveMQ-CPP-on-AIX-using-IBM-compilers-dynamic_cast-in-TCPTransport.cpp-always-returning-NULL-tf4154632s2354.html#a11830194 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.