Re: qpid 0.12 make fails on Linux Mint 12 (I think derived from Ubuntu 11.10)
Hi again all, I've done a bit of Googling on this and it appears that this behaviour has something to do with changes that have been made to the linker behaviour http://fedoraproject.org/wiki/UnderstandingDSOLinkChange (this is a Fedora page and I'm using Mint but the symptoms seem identical). Has anyone else seen this and got a decent workaround? I'll have a play and see if I can hack the makefile, at a guess it probably just needs an *explicit* -lboost_program_options added to the right place in the Makefile my problem is that I'm clueless about automake, so if it doesn't just work I'm working blind. At a guess some work is needed to the automake generation templates to fix this properly, but I wouldn't know where to begin. I suspect that I'm not the only one who's going to be seeing this issue (my Mint 12 box uses gcc version 4.6.1) given the description in the Fedora page. I'd appreciate any thoughts/tips cheers, Frase On 31/12/11 14:07, Fraser Adams wrote: Hi all, in a fit of post Xmas madness I decided it would be a good idea to upgrade my old (but working) Ubuntu Studio 9 based box to something a bit more up to date. I opted for Linux Mint 12 which I believe is based on Ubuntu 11.10 I installed all of the packages that I believe were necessary to make and install qpid (I've done it several times on my old box) and configure seemed to complete fine with no issues of note. I installed Cajus Pollmeier's fix-unused.patch which gets rid of make problems relating to ignored return values from things like ::lockf, ::write and ::system in a couple of places. However when I run make I fail with the error a the bottom of this mail: The key thing seems to be undefined reference to symbol 'boost::program_options::validate. It seems a bit weird to me though as I've checked through on my package manager and I've got all of the boost and boost dev packages installed for boost 1.46. I'm suspecting a linker path issue, but all the automake stuff is voodoo to me so I'm not quite sure where to look first. I might have a play with LDFLAGS to see if I can get anywhere but I thought I'd post to see if anyone else has hit this issue. I'm guessing I'm not alone on this - has anyone else tried compiling qpid 0.12 on Linux Mint 12 or Ubuntu 11.10? Has anyone got it working? Cheers (and Happy New Year to everyone) Frase /bin/bash ../libtool --tag=CXX --mode=link g++ -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual -DQPID_LIBEXEC_DIR=\/usr/local/libexec/qpid\ -DBOOST_FILESYSTEM_VERSION=2 -DQPIDD_MODULE_DIR=\/usr/local/lib/qpid/daemon\ -DQPIDD_CONF_FILE=\/usr/local/etc/qpidd.conf\ -g -O2 -L/home/fadams/qpid/qpid-0.12/cpp/src/.libs -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync -o qpidd qpidd-qpidd.o posix/qpidd-QpiddBroker.o libqpidbroker.la libqpidcommon.la libtool: link: g++ -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual -DQPID_LIBEXEC_DIR=\/usr/local/libexec/qpid\ -DBOOST_FILESYSTEM_VERSION=2 -DQPIDD_MODULE_DIR=\/usr/local/lib/qpid/daemon\ -DQPIDD_CONF_FILE=\/usr/local/etc/qpidd.conf\ -g -O2 -o .libs/qpidd qpidd-qpidd.o posix/qpidd-QpiddBroker.o -L/home/fadams/qpid/qpid-0.12/cpp/src/.libs -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync ./.libs/libqpidbroker.so ./.libs/libqpidcommon.so /usr/bin/ld: posix/qpidd-QpiddBroker.o: undefined reference to symbol 'boost::program_options::validate(boost::any, std::vectorstd::basic_stringchar, std::char_traitschar, std::allocatorchar , std::allocatorstd::basic_stringchar, std::char_traitschar, std::allocatorcharconst, std::basic_stringchar, std::char_traitschar, std::allocatorchar *, int)' /usr/bin/ld: note: 'boost::program_options::validate(boost::any, std::vectorstd::basic_stringchar, std::char_traitschar, std::allocatorchar , std::allocatorstd::basic_stringchar, std::char_traitschar, std::allocatorcharconst, std::basic_stringchar, std::char_traitschar, std::allocatorchar *, int)' is defined in DSO /usr/lib/libboost_program_options.so.1.46.1 so try adding it to the linker command line /usr/lib/libboost_program_options.so.1.46.1: could not read symbols: Invalid operation collect2: ld returned 1 exit status - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscr...@qpid.apache.org
Re: qpid 0.12 make fails on Linux Mint 12 (I think derived from Ubuntu 11.10)
Hi again, I've now got a bit further forward and have got make to work. I had an awful lot of problems due to the explicit linkage issue that seems to be caused by recent versions of gcc (I'm using 4.6.1) From a virgin qpid-0.12.tar.gz download I had to cd qpid-0.12/cpp patch -p1 ../../fixed_unused.patch patch -p1 ../../fix-explicit-link-problem.patch ./bootstrap ./configure make I've attached the patches, the first of these is Cajus Pollmeier's patch the fix-explicit-link-problem.patch is a patch I've put together for a number of Makefile.am files to add the necessary explicit linkage. So far this seems to give me a make that completes and I can run qpidd in qpid-0.12/cpp/src OK but unfortunately sudo make install fails with the errors below. Previously when I had libtool linkage errors with make install I did: export LDFLAGS=-L`dirname $(pwd)`/cpp/src/.libs which used to work on my old Ubuntu 9.1 box. Unfortunately this doesn't seem to work on my Mint 12 box running gcc version 4.6.1 I'd really appreciate any help, this is really bugging me now - I don't think this is necessarily a qpid problem per se, but given what I'm seeing I'd be surprised if anyone has managed to build on Ubuntu 11.10 without a fight - am I wrong, have I missed something obvious hp Frase Making install in managementgen make[1]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' make[2]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' test -z /usr/local/bin || /bin/mkdir -p /usr/local/bin /usr/bin/install -c qmf-gen '/usr/local/bin' test -z /usr/local/lib/python2.7/site-packages/qmfgen || /bin/mkdir -p /usr/local/lib/python2.7/site-packages/qmfgen /usr/bin/install -c -m 644 qmfgen/__init__.py qmfgen/generate.py qmfgen/schema.py qmfgen/management-types.xml '/usr/local/lib/python2.7/site-packages/qmfgen' Byte-compiling python modules... __init__.pygenerate.pyschema.py Byte-compiling python modules (optimized versions) ... __init__.pygenerate.pyschema.py test -z /usr/local/lib/python2.7/site-packages/qmfgen/templates || /bin/mkdir -p /usr/local/lib/python2.7/site-packages/qmfgen/templates /usr/bin/install -c -m 644 qmfgen/templates/Args.h qmfgen/templates/Class.cpp qmfgen/templates/Class.h qmfgen/templates/Event.cpp qmfgen/templates/Event.h qmfgen/templates/Makefile.mk qmfgen/templates/Package.cpp qmfgen/templates/Package.h qmfgen/templates/V2Package.cpp qmfgen/templates/V2Package.h '/usr/local/lib/python2.7/site-packages/qmfgen/templates' Byte-compiling python modules... Byte-compiling python modules (optimized versions) ... make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' make[1]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' Making install in etc make[1]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/etc' make[2]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/etc' test -z /usr/local/etc || /bin/mkdir -p /usr/local/etc /usr/bin/install -c -m 644 qpidd.conf '/usr/local/etc/.' /bin/mkdir -p '/usr/local/etc/sasl2' /usr/bin/install -c -m 644 sasl2/qpidd.conf '/usr/local/etc/sasl2' test -z /usr/local/etc/qpid || /bin/mkdir -p /usr/local/etc/qpid /usr/bin/install -c -m 644 qpidc.conf '/usr/local/etc/qpid/.' test -z /usr/local/var/lib/qpidd || /bin/mkdir -p /usr/local/var/lib/qpidd /usr/bin/install -c -m 644 qpidd.sasldb '/usr/local/var/lib/qpidd' make[2]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/etc' make[1]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/etc' Making install in src make[1]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/src' Making install in . make[2]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/src' make[3]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/src' test -z /usr/local/lib/qpid/client || /bin/mkdir -p /usr/local/lib/qpid/client test -z /usr/local/lib/qpid/daemon || /bin/mkdir -p /usr/local/lib/qpid/daemon /bin/bash ../libtool --mode=install /usr/bin/install -c cluster.la watchdog.la acl.la xml.la replicating_listener.la replication_exchange.la '/usr/local/lib/qpid/daemon' libtool: install: warning: relinking `cluster.la' libtool: install: (cd /home/fadams/qpid/qpid-0.12/cpp/src; /bin/bash /home/fadams/qpid/qpid-0.12/cpp/libtool --tag CXX --mode=relink g++ -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual -DQPID_LIBEXEC_DIR=\/usr/local/libexec/qpid\ -DBOOST_FILESYSTEM_VERSION=2 -fno-strict-aliasing -g -O2 -no-undefined -module -avoid-version -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync -o cluster.la -rpath /usr/local/lib/qpid/daemon qpid/cluster/cluster_la-Quorum_cman.lo qpid/cluster/cluster_la-Cluster.lo qpid/cluster/cluster_la-ClusterTimer.lo qpid/cluster/cluster_la-Decoder.lo
Re: qpid 0.12 make fails on Linux Mint 12 (I think derived from Ubuntu 11.10)
I *think I've cracked this.. I built everything fresh and added the patches fresh and make install seemed to then work. I was a bit baffled then realised my shell had some environment variables set. My suspicion is that I needed to have export LDFLAGS=-L`dirname $(pwd)`/cpp/src/.libs set before calling ./bootstrap This would have been the case for the make that worked so it's got me wondering. I'll try again from absolute scratch tomorrow to see if I can get a systematic build (I must be mad uninstalling a working build, but I really want to be able to do a reproducible build) I'll keep you posted. Frase On 02/01/12 17:34, Fraser Adams wrote: Hi again, I've now got a bit further forward and have got make to work. I had an awful lot of problems due to the explicit linkage issue that seems to be caused by recent versions of gcc (I'm using 4.6.1) From a virgin qpid-0.12.tar.gz download I had to cd qpid-0.12/cpp patch -p1 ../../fixed_unused.patch patch -p1 ../../fix-explicit-link-problem.patch ./bootstrap ./configure make I've attached the patches, the first of these is Cajus Pollmeier's patch the fix-explicit-link-problem.patch is a patch I've put together for a number of Makefile.am files to add the necessary explicit linkage. So far this seems to give me a make that completes and I can run qpidd in qpid-0.12/cpp/src OK but unfortunately sudo make install fails with the errors below. Previously when I had libtool linkage errors with make install I did: export LDFLAGS=-L`dirname $(pwd)`/cpp/src/.libs which used to work on my old Ubuntu 9.1 box. Unfortunately this doesn't seem to work on my Mint 12 box running gcc version 4.6.1 I'd really appreciate any help, this is really bugging me now - I don't think this is necessarily a qpid problem per se, but given what I'm seeing I'd be surprised if anyone has managed to build on Ubuntu 11.10 without a fight - am I wrong, have I missed something obvious hp Frase Making install in managementgen make[1]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' make[2]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' test -z /usr/local/bin || /bin/mkdir -p /usr/local/bin /usr/bin/install -c qmf-gen '/usr/local/bin' test -z /usr/local/lib/python2.7/site-packages/qmfgen || /bin/mkdir -p /usr/local/lib/python2.7/site-packages/qmfgen /usr/bin/install -c -m 644 qmfgen/__init__.py qmfgen/generate.py qmfgen/schema.py qmfgen/management-types.xml '/usr/local/lib/python2.7/site-packages/qmfgen' Byte-compiling python modules... __init__.pygenerate.pyschema.py Byte-compiling python modules (optimized versions) ... __init__.pygenerate.pyschema.py test -z /usr/local/lib/python2.7/site-packages/qmfgen/templates || /bin/mkdir -p /usr/local/lib/python2.7/site-packages/qmfgen/templates /usr/bin/install -c -m 644 qmfgen/templates/Args.h qmfgen/templates/Class.cpp qmfgen/templates/Class.h qmfgen/templates/Event.cpp qmfgen/templates/Event.h qmfgen/templates/Makefile.mk qmfgen/templates/Package.cpp qmfgen/templates/Package.h qmfgen/templates/V2Package.cpp qmfgen/templates/V2Package.h '/usr/local/lib/python2.7/site-packages/qmfgen/templates' Byte-compiling python modules... Byte-compiling python modules (optimized versions) ... make[2]: Nothing to be done for `install-data-am'. make[2]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' make[1]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/managementgen' Making install in etc make[1]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/etc' make[2]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/etc' test -z /usr/local/etc || /bin/mkdir -p /usr/local/etc /usr/bin/install -c -m 644 qpidd.conf '/usr/local/etc/.' /bin/mkdir -p '/usr/local/etc/sasl2' /usr/bin/install -c -m 644 sasl2/qpidd.conf '/usr/local/etc/sasl2' test -z /usr/local/etc/qpid || /bin/mkdir -p /usr/local/etc/qpid /usr/bin/install -c -m 644 qpidc.conf '/usr/local/etc/qpid/.' test -z /usr/local/var/lib/qpidd || /bin/mkdir -p /usr/local/var/lib/qpidd /usr/bin/install -c -m 644 qpidd.sasldb '/usr/local/var/lib/qpidd' make[2]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/etc' make[1]: Leaving directory `/home/fadams/qpid/qpid-0.12/cpp/etc' Making install in src make[1]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/src' Making install in . make[2]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/src' make[3]: Entering directory `/home/fadams/qpid/qpid-0.12/cpp/src' test -z /usr/local/lib/qpid/client || /bin/mkdir -p /usr/local/lib/qpid/client test -z /usr/local/lib/qpid/daemon || /bin/mkdir -p /usr/local/lib/qpid/daemon /bin/bash ../libtool --mode=install /usr/bin/install -c cluster.la watchdog.la acl.la xml.la replicating_listener.la replication_exchange.la '/usr/local/lib/qpid/daemon' libtool: install: warning: relinking `cluster.la' libtool: install: (cd /home/fadams/qpid/qpid-0.12/cpp/src; /bin/bash