[
https://issues.apache.org/activemq/browse/AMQCPP-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Bish resolved AMQCPP-123.
---------------------------------
Resolution: Fixed
Applied in trunk
> Link error when trying to link another shared library against AMQCPP on
> 64-bit Linux
> ------------------------------------------------------------------------------------
>
> Key: AMQCPP-123
> URL: https://issues.apache.org/activemq/browse/AMQCPP-123
> Project: ActiveMQ C++ Client
> Issue Type: Improvement
> Affects Versions: 2.1
> Reporter: Albert Strasheim
> Assignee: Nathan Mittler
> Priority: Minor
> Fix For: 2.1
>
>
> When trying to link another shared library against libactivemq-cpp.a on
> 64-bit Fedora Core 6, I get the following error:
> /usr/bin/ld: libactivemq-cpp.a(ActiveMQConnectionFactory.o): relocation
> R_X86_64_32 against `a local symbol' can not be used when making a shared
> object; recompile with -fPIC
> libactivemq-cpp.a: could not read symbols: Bad value
> Adding -fPIC to the CXXFLAGS seems to do the trick:
> Index: configure.ac
> ===================================================================
> --- configure.ac (revision 544508)
> +++ configure.ac (working copy)
> @@ -86,7 +86,7 @@
> AM_PATH_CPPUNIT(1.10.2, cppunit=yes, cppunit=no; AC_MSG_RESULT([no. Unit and
> Integration tests disabled]))
> AM_CONDITIONAL(BUILD_CPPUNIT_TESTS, test x$cppunit = xyes)
>
> -CXXFLAGS="$CXXFLAGS -W -Wall -fstrict-aliasing -Wstrict-aliasing=2
> -Wno-long-long"
> +CXXFLAGS="$CXXFLAGS -W -Wall -fstrict-aliasing -Wstrict-aliasing=2
> -Wno-long-long -fPIC"
> # CPPUNIT_CXXFLAGS="$CPPUNIT_CXXFLAGS -Wno-non-virtual-dtor
> -Wno-unused-parameter -Wno-uninitialized"
> LIBS="$LIBS"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.