On 2/23/22 17:36, james wing wrote:
You read my mind. I was literally drafting my follow-up question when this
arrived. It was to ask about exactly that -- a generic AMQP C++ client that
would work with ActiveMQ. This one, being so 'Java-ized', with dependencies on
libraries familiar only to Java folks, (and some of those libraries
unmaintained,) is going to be challenging for C++ folks (like me) to use. I
appreciate the pointer to Qpid, and the hint that STOMP clients might be an
alternative too.
I wanted to feed back an update, in case anyone is curious:
The part that was failing was ~/activemq-cpp/activemq-cpp/m4/find_cppunit.m4,
as part of the autoconfiguration scripts for the build. I could rewrite that
to properly use pkg-config instead of the deprecated cppunit-config, but there
would surely be a steep learning curve, and no guarantee I wouldn't encounter
insurmountable obstacles. So, I decided to try an older version of
libcppunit-dev, which still includes the cppunit-config tool. I don't know if
this was the smart way to do it or not, but I found version 1.13.2-2.1 in the
Stretch repository, so I added that repo to my /etc/apt/sources.list, updated
my apt cache, and then:
$ sudo apt-get install libcppunit-dev=1.13.2-2.1
I think some folks have made it work with newer versions by pulling
forward a copy of the cppunit-config file and tweaking it to supply the
correct locations for the new version install.
$ make check now builds the unit tests as promised, and only 3 of the
2275 tests failed.
The integration tests didn't fair as well, with 132 of 133 failing with errors.
I'd estimate at least a quarter of those result from no username/password
being supplied. I recall that being the problem with the example provided in
the Windows version that I tried a few days ago. I'll go look on the Java side
for the same tests to see if they've been updated. I have a hunch that old
ActiveMQ allowed anonymous messages and new ActiveMQ does not.
You broker will need to be configuration without a security policy in
place for those integration tests to pass from what I recall so if you
are using something that requires a login password then that would
explain it.
That being said the library is well out of date at this point and I'd
encourage you to look at something that's actually maintained. An AMQP
client would ensure compatibility with either ActiveMQ 5 or ActiveMQ
Artemis along with other brokers as would a STOMP client. AMQP is more
suitable for complex messaging where things like flow control need to be
managed whereas STOMP is quite basic and good for limited use cases that
can deal with its limitations.
I'll go down this path a bit further in hopes I can make it work before giving
up on it (unless you warn me I'm wasting my time).
I truly appreciate your help, Tim. I owe you a giant happy-hour schooner of
beer and bowl of shrimp at the Anchor Bar at The Fish Market at the bottom of
King Street. 😊
Great, now I want some beer and shrimp ;)
--Jim
(former Old Town Alexandria resident)
-----Original Message-----
From: Timothy Bish <tabish...@gmail.com>
Sent: Wednesday, February 23, 2022 3:05 PM
To: users@activemq.apache.org
Subject: Re: activemq-cpp unit tests not building
On 2/23/22 15:02, james wing wrote:
Thanks Tim! Is ActiveMQ just not being maintained anymore? Or it is just the
C++ client that has been abandoned? Just not enough demand on the C++ end?
The ActiveMQ brokers are being maintained however the C++ doesn't have any
volunteers maintaining it at this time. You can try other C or C++ clients
such as the AMQP clients hosted by the Qpid project or a STOMP client of which
there are many.
--Jim
-----Original Message-----
From: Timothy Bish <tabish...@gmail.com>
Sent: Wednesday, February 23, 2022 12:26 PM
To: users@activemq.apache.org
Subject: Re: activemq-cpp unit tests not building
On 2/23/22 14:16, james wing wrote:
I'm attempting to build & install activemq-cpp client on a Debian system, with
unit and integration tests.
After git-ing the latest source and following instructions in the README.txt
(and/or here:
https://activemq.apache.org/components/cms/developers/building ) , I
run the "make check" command that reportedly "will verify that the library is
functioning correctly on the target platform. In addition, it will generate the integration tests
binary."
It reports entering and leaving some directories (main and examples) and reports "Nothing to
be done for 'check'." In those directories. It also reports entering and leaving the parent
directory (activemq-cpp), but doesn't report doing anything there. If it builds anything, there is
certainly no indication of it, and the "activemq-test-integration" executable that it is
reportedly intended to build is nowhere to be found.
To confirm the CppUnit libraries are installed:
$ apt list --installed |grep cppunit
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libcppunit-1.14-0/oldstable,now 1.14.0-3 amd64 [installed,automatic]
libcppunit-dev/oldstable,now 1.14.0-3 amd64 [installed]
But I am unsure of one piece of the instructions:
"Make sure that the paths to the installed CppUnit library and includes are visible
in your current shell before you try building the tests."
How do I do that? I don't know what is meant by a path being "visible", nor
which includes, nor which CppUnit 'library' (the .so, and the .a files?).
Somebody understanding what that ambiguous (to me) instruction means could
probably instantly spot the answer in the following:
$ echo $PATH
/opt/bitnami/activemq/bin:/opt/bitnami/common/bin:/opt/bitnami/gonit/
b
in:/opt/bitnami/java/bin:/opt/bitnami/java/jre/bin:/opt/bitnami/nami/
b
in:/opt/bitnami/activemq/bin:/opt/bitnami/common/bin:/opt/bitnami/gon
i
t/bin:/opt/bitnami/java/bin:/opt/bitnami/java/jre/bin:/opt/bitnami/na
m i/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
And...
$ dpkg -L libcppunit-dev
/.
/usr
/usr/include
/usr/include/cppunit
/usr/include/cppunit/AdditionalMessage.h
/usr/include/cppunit/Asserter.h
/usr/include/cppunit/BriefTestProgressListener.h
/usr/include/cppunit/CompilerOutputter.h
/usr/include/cppunit/Exception.h
/usr/include/cppunit/Message.h
/usr/include/cppunit/Outputter.h
/usr/include/cppunit/Portability.h
/usr/include/cppunit/Protector.h
/usr/include/cppunit/SourceLine.h
/usr/include/cppunit/SynchronizedObject.h
/usr/include/cppunit/Test.h
/usr/include/cppunit/TestAssert.h
/usr/include/cppunit/TestCaller.h
/usr/include/cppunit/TestCase.h
/usr/include/cppunit/TestComposite.h
/usr/include/cppunit/TestFailure.h
/usr/include/cppunit/TestFixture.h
/usr/include/cppunit/TestLeaf.h
/usr/include/cppunit/TestListener.h
/usr/include/cppunit/TestPath.h
/usr/include/cppunit/TestResult.h
/usr/include/cppunit/TestResultCollector.h
/usr/include/cppunit/TestRunner.h
/usr/include/cppunit/TestSuccessListener.h
/usr/include/cppunit/TestSuite.h
/usr/include/cppunit/TextOutputter.h
/usr/include/cppunit/TextTestProgressListener.h
/usr/include/cppunit/TextTestResult.h
/usr/include/cppunit/TextTestRunner.h
/usr/include/cppunit/XmlOutputter.h
/usr/include/cppunit/XmlOutputterHook.h
/usr/include/cppunit/config
/usr/include/cppunit/config/CppUnitApi.h
/usr/include/cppunit/config/SelectDllLoader.h
/usr/include/cppunit/config/SourcePrefix.h
/usr/include/cppunit/config/config-bcb5.h
/usr/include/cppunit/config/config-evc4.h
/usr/include/cppunit/config/config-mac.h
/usr/include/cppunit/config/config-msvc6.h
/usr/include/cppunit/config-auto.h
/usr/include/cppunit/extensions
/usr/include/cppunit/extensions/AutoRegisterSuite.h
/usr/include/cppunit/extensions/ExceptionTestCaseDecorator.h
/usr/include/cppunit/extensions/HelperMacros.h
/usr/include/cppunit/extensions/Orthodox.h
/usr/include/cppunit/extensions/RepeatedTest.h
/usr/include/cppunit/extensions/TestCaseDecorator.h
/usr/include/cppunit/extensions/TestDecorator.h
/usr/include/cppunit/extensions/TestFactory.h
/usr/include/cppunit/extensions/TestFactoryRegistry.h
/usr/include/cppunit/extensions/TestFixtureFactory.h
/usr/include/cppunit/extensions/TestNamer.h
/usr/include/cppunit/extensions/TestSetUp.h
/usr/include/cppunit/extensions/TestSuiteBuilderContext.h
/usr/include/cppunit/extensions/TestSuiteFactory.h
/usr/include/cppunit/extensions/TypeInfoHelper.h
/usr/include/cppunit/plugin
/usr/include/cppunit/plugin/DynamicLibraryManager.h
/usr/include/cppunit/plugin/DynamicLibraryManagerException.h
/usr/include/cppunit/plugin/PlugInManager.h
/usr/include/cppunit/plugin/PlugInParameters.h
/usr/include/cppunit/plugin/TestPlugIn.h
/usr/include/cppunit/plugin/TestPlugInDefaultImpl.h
/usr/include/cppunit/portability
/usr/include/cppunit/portability/FloatingPoint.h
/usr/include/cppunit/portability/Stream.h
/usr/include/cppunit/tools
/usr/include/cppunit/tools/Algorithm.h
/usr/include/cppunit/tools/StringHelper.h
/usr/include/cppunit/tools/StringTools.h
/usr/include/cppunit/tools/XmlDocument.h
/usr/include/cppunit/tools/XmlElement.h
/usr/include/cppunit/ui
/usr/include/cppunit/ui/text
/usr/include/cppunit/ui/text/TestRunner.h
/usr/include/cppunit/ui/text/TextTestRunner.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libcppunit.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/cppunit.pc
/usr/share
/usr/share/doc
/usr/share/doc/libcppunit-dev
/usr/share/doc/libcppunit-dev/README.Debian
/usr/share/doc/libcppunit-dev/changelog.Debian.gz
/usr/share/doc/libcppunit-dev/changelog.gz
/usr/share/doc/libcppunit-dev/copyright
/usr/lib/x86_64-linux-gnu/libcppunit-1.14.so
/usr/lib/x86_64-linux-gnu/libcppunit.so
So, I took a guess and decided to
$
PATH=$PATH:/usr/include:/usr/include/cppunit:/usr/lib/x86_64-linux-gn
u
$ export PATH
$ ./autogen.sh
$ ./configure
I think the important part of the output from configure is:
checking for cppunit-config... no
checking for Cppunit - version >= 1.10.2... no no. Unit and
Integration tests disabled
In the past it was observed that newer versions of cppunit don't ship with a
cppunit-config script or if one is present it no longer works with the autoconf
tooling in ActiveMQ-CPP which is now unmaintained for quite some time. It's
quite likely you'd need to modify the autoconf scripts to figure out where
cppunit is installed on a modern linux distro with a newer CPPUnit library that
probably uses more current pkg config data.
I have nary-a-clue when it comes to makefiles (and related). Can anybody point
me in the right direction?
Thanks,
--Jim
--
Tim Bish
--
Tim Bish
--
Tim Bish