activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian McFarland (JIRA)" <>
Subject [jira] Commented: (AMQCPP-253) Problems with compiler aCC on HPUX
Date Tue, 10 Nov 2009 23:57:52 GMT


Brian McFarland commented on AMQCPP-253:

Before seeing this post, I decided to try the replacing the whole thing with a literal zero
which did the trick:

socketHandle( 0 )

NULL might be more appropriate, but 0 should have the same end result.

Once that made all the compiler errors go away, I started getting duplicate symbol errors
from the linker for INVALID_SOCKET_HANDLE.

The following generates an error:

class Socket{
static apr_socket_t* INVALID_SOCKET_HANDLE = 0;

One solution is to drop the "= 0;" and initialize the value outside of the class declaration.

However, the fix posted by Wolfgang also causes an error.  In other words, when adding the
following line to the header file, you get duplicate instances of INVALID_SOCKET_HANDLE.

apr_socket_t*  Socket::INVALID_SOCKET_HANDLE = 0;

To avoid the duplicate symbol problem, that line needs to go in a cpp file.  However, Socket
is a purely abstract class (i.e. only pure virtual functions), so no cpp file existed.  I
created a Socket.cpp with the following content:

#include "Socket.h"
#include <apr_network_io.h>

namespace decaf{
namespace net{
   apr_socket_t* Socket::INVALID_SOCKET_HANDLE = 0;

Everything now builds & links in the main library.  On to the example and test directories.....
 This is the latest round of errors:

Error 19: "advisories/TempDestinationAdvisoryConsumer.cpp", line 77 # Unexpected '>'.
Error 902: "advisories/TempDestinationAdvisoryConsumer.cpp", line 77 # Template deduction
failed to find a
    match for the call to 'operator <' with signature 'void (void (),activemq::commands::DestinationInfo)'.
Error 226: "advisories/TempDestinationAdvisoryConsumer.cpp", line 76 # No appropriate function
found for
    call of 'Pointer::Pointer'. Last viable candidate was
    ["./../main/decaf/lang/Pointer.h", line 129]. Argument of type 'int' could not be converted
to 'const
                    Pointer<DestinationInfo> info =

It would be nice to be able to run "make check" to get a sanity check, but since
is built w/o running the unit tests, it might not be 100% necessary.

It's probably also worth notiing that I see several warnings during the compilation.   I'm
rebuilding from scratch right now with all the output sent to a log file.

> Problems with compiler aCC on HPUX
> ----------------------------------
>                 Key: AMQCPP-253
>                 URL:
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>    Affects Versions: 3.0
>         Environment: HP-UX gemma1 B.11.23 U 9000/800
> aCC: HP ANSI C++ B3910B A.03.77
>            Reporter: Wolfgang.Klein
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 3.1
>         Attachments: amq_cpp_30.tar, TcpSocket.cpp
> compile errors with native HP compiler

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message