You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Warwick Richard (00101635)" <wa...@ubs.com> on 2009/08/25 14:14:57 UTC

Problems compiling qpidc-0.5 on Solaris 10

Hallo,

part of this problem was already posted to the users@ mailing list last 
Friday. Since I haven't received an answer yet I figured I might have 
more luck here. Please let me know if this is the wrong channel.

I have two problems compiling qpidc-0.5 on Solaris 10.

1.) Broker.cpp won't compile because of multiple warning messages.

"workaround" was to configure with the --enable-warnings=no option. The 
make then gets much further but stops in :

2.) replication_exchange.so won't build because the linker can't find 
libCrun.so.

More details on both problems below. I'm presuming that it's not a good 
idea to build with warnings disabled so would prefer to solve problem 
1.). I'm trying to build a demo implementation for our site so we can 
evaluate QPID. Has anyone else built on Solaris 10 yet ?

Can anyone offer any hints on how to get past this ?

Regards
Warwick

warwick.richard<at>ubs.com


Details for 1.)

depbase=`echo qpid/broker/Broker.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
       /bin/bash ../libtool --tag=CXX   --mode=compile g++ 
-DHAVE_CONFIG_H -I. -Igen -I./gen  -I/app/qpid/tools/include -Werror 
-pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual 
-Wcast-align -Wno-long-long -Winvalid-pch -Wno-system-headers 
-Woverloaded-virtual -g -O2 -MT qpid/broker/Broker.lo -MD -MP -MF 
$depbase.Tpo -c -o qpid/broker/Broker.lo qpid/broker/Broker.cpp &&\
       mv -f $depbase.Tpo $depbase.Plo
g++ -DHAVE_CONFIG_H -I. -Igen -I./gen -I/app/qpid/tools/include -Werror 
-pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual 
-Wcast-align -Wno-long-long -Winvalid-pch -Wno-system-headers 
-Woverloaded-virtual -g -O2 -MT qpid/broker/Broker.lo -MD -MP -MF 
qpid/broker/.deps/Broker.Tpo -c qpid/broker/Broker.cpp  -fPIC -DPIC -o 
qpid/broker/.libs/Broker.o
qpid/broker/Broker.cpp: In constructor 
`qpid::broker::Broker::Broker(const qpid::broker::Broker::Options&)':
qpid/broker/Broker.cpp:160: warning: cast from 
`qpid::management::ManagementAgent*' to 
`qpid::management::ManagementBroker*' increases required alignment of 
target type
qpid/broker/Broker.cpp:187: warning: cast from 
`qpid::management::ManagementAgent*' to 
`qpid::management::ManagementBroker*' increases required alignment of 
target type
qpid/broker/Broker.cpp:239: warning: cast from 
`qpid::management::ManagementAgent*' to 
`qpid::management::ManagementBroker*' increases required alignment of 
target type
qpid/broker/Broker.cpp:241: warning: cast from 
`qpid::management::ManagementAgent*' to 
`qpid::management::ManagementBroker*' increases required alignment of 
target type
make[2]: *** [qpid/broker/Broker.lo] Error 1
make[2]: Leaving directory `/app/qpid/stage/qpidc-0.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/app/qpid/stage/qpidc-0.5/src'
make: *** [all] Error 2

Quite a few programs have already compiled, the make was running for 19 
minutes before grounding to a halt.

Details for 2.)

make[3]: Entering directory `/app/qpid/stage/qpidc-0.5/src'
/bin/bash ../libtool --tag=CXX   --mode=link g++  -g -O2 -no-undefined 
-module -avoid-version -L/app/qpid/tools/lib -L/usr/lib/openais 
-L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync -o 
replication_exchange.la -rpath /app/qpid/lib/qpid/daemon 
qpid/replication/ReplicationExchange.lo libqpidbroker.la 
libqpidcommon.la -lboost_program_options -lCrun -luuid
g++ -shared -nostdlib -L/app/qpid/tools/lib -L/usr/lib/openais 
-L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crti.o 
/usr/ccs/lib/values-Xa.o 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtbegin.o  
qpid/replication/.libs/ReplicationExchange.o  -Wl,-R 
-Wl,/app/qpid/stage/qpidc-0.5/src/.libs -Wl,-R -Wl,/usr/local/lib -Wl,-R 
-Wl,/app/qpid/lib -Wl,-R -Wl,/usr/local/lib 
-L/app/qpid/stage/qpidc-0.5/src/.libs -L/app/qpid/tools/lib 
-L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync 
-L/usr/lib64/corosync ./.libs/libqpidbroker.so 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/libstdc++-v3/src 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/libstdc++-v3/src/.libs 
-L/usr/local/lib -L/usr/local/ssl/lib -L/usr/openwin/lib 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/gcc ./.libs/libqpidcommon.so 
-lboost_program_options -lCrun -luuid 
-L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6 -L/usr/ccs/bin 
-L/usr/ccs/lib -L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../.. 
/usr/local/lib/libstdc++.so -lm -lgcc_s 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtend.o 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtn.o  -Wl,-h 
-Wl,replication_exchange.so -o .libs/replication_exchange.so
ld: fatal: library -lCrun: not found
ld: fatal: File processing errors. No output written to 
.libs/replication_exchange.so
collect2: ld returned 1 exit status

I twiddled the Makefile and added :
LDFLAGS = -L/app/qpid/tools/lib -L/usr/lib -L/usr/lib/openais 
-L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync
but this didn't help.

There *is* a libCrun.so on the system :
qpidc-0.5 $ ls -l /usr/lib/libCrun*
-rwxr-xr-x   1 root     bin        63772 Oct 12  2006 /usr/lib/libCrun.so.1

... and /usr/lib is in the LD_LIBRARY_PATH (see below). I even tried 
"export LIBPATH=$LD_LIBRARY_PATH" but no luck.

# Some system details :
qpidc-0.5 $ uname -a
SunOS svbotanybay.flur.zuerich.ubs.ch 5.10 Generic_127111-11 sun4v sparc 
SUNW,Sun-Fire-T200

# The package
qpidc-0.5 $ ls -l ../../pkg/qpid-cpp-0.5.tar.gz
-rw-r--r--   1 t101635  t101635  4926139 Jul 28 11:13 
../../pkg/qpid-cpp-0.5.tar.gz

# The package was downloaded from :
http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz

# The offending source files
qpidc-0.5 $ ls -l src/qpid/broker/Broker.cpp
-rw-rw----   1 t101635  dev        16826 Mar 25 20:27 
src/qpid/broker/Broker.cpp

# I'm compiling with gcc
qpidc-0.5 $ g++ -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6

# the GNU tools are installed in /usr/local/bin, the Sun compiler in 
/usr/bin
# I've placed /usr/local/bin first in the path so the GNU tools are 
always found first
qpidc-0.5 $ echo $PATH
/usr/local/bin:/opt/bin:/opt/sbin:/opt/ubs/bin:/opt/ubs/sbin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin/home/t101635/.bin:/usr/sfw/bin:/home/t101635/share 

# ditto for the libpath :
qpidc-0.5 $ echo $LD_LIBRARY_PATH
/usr/local/lib:/opt/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib/usr/sfw/lib:/home/t101635/lib 


# qpid version
qpidc-0.5 $ ls -l RELEASE_NOTES
-rw-rw----   1 t101635  dev          677 May 17 14:33 RELEASE_NOTES

# before compiling, I configured with this command :
# this is where boost is installed
export CPPFLAGS=-I/app/qpid/tools/include
export LDFLAGS=-L/app/qpid/tools/lib

./configure --prefix=/app/qpid --exec-prefix=/app/qpid \
--with-help2man --with-doxygen --with-poller \
--without-sasl --without-xml --without-rdma --without-ssl

after problem 1.), I added --enable-warnings=no to the configure command 
and ran it (after make distclean)

The new config.log is attached. (this is the one used on the second 
compile - i.e. problem 2.)




Re: Problems compiling qpidc-0.5 on Solaris 10

Posted by Andrew Stitcher <as...@redhat.com>.
On Tue, 2009-08-25 at 14:14 +0200, Warwick Richard (00101635) wrote:
> Hallo,
> 
> part of this problem was already posted to the users@ mailing list last 
> Friday. Since I haven't received an answer yet I figured I might have 
> more luck here. Please let me know if this is the wrong channel.

I personally am not subscribed to the users list, so you're more likely
to get me here, I don't know about Manuel Teira who has done most of the
Solaris work.

> 
> I have two problems compiling qpidc-0.5 on Solaris 10.
> 
> 1.) Broker.cpp won't compile because of multiple warning messages.

Don't know about this, but warnings look serious enough to indicate a
real problem. What version of gcc are you using?

> 
> "workaround" was to configure with the --enable-warnings=no option. The 
> make then gets much further but stops in :
> 
> 2.) replication_exchange.so won't build because the linker can't find 
> libCrun.so.

If you are using gcc then libCrun should most definitely not be linked -
it must be an error in configure.ac

> 
> More details on both problems below. I'm presuming that it's not a good 
> idea to build with warnings disabled so would prefer to solve problem 
> 1.). I'm trying to build a demo implementation for our site so we can 
> evaluate QPID. Has anyone else built on Solaris 10 yet ?

The builds that have been done up till now have been using the Sun
Compiler I believe.


Regards

Andrew



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Problems compiling qpidc-0.5 on Solaris 10 : solved

Posted by "Warwick Richard (00101635)" <wa...@ubs.com>.
It's built now, thanks all who replied for the tips and good advice.
These are the things that I needed to tweak to build qpid at our site :

1.) use the Sun compiler
2.) make sure the boost libraries are in LD_LIBRARY_PATH
3.) edit src/qpid/Plugin.cpp as follows :
void Plugin::Target::finalize() {
    *std::*for_each(finalizers.begin(), finalizers.end(), invoke);
    finalizers.clear();
}
4.) configure with the *--with-poller=solaris-ecf* option

Regards
Warwick

Manuel Teira Paz wrote:
> It seems you're trying to build qpidc using a GNU compiler toolchain. 
> I did it using the Sun Workshop compiler.
> About the libCrun.so issue, I think it shouldn't be included while 
> using gnu tools (libstdc++ should be used instead), but perhaps some 
> autoconf script could be messing things up. I remember some issue 
> months ago about some plugin autoconf script including libCrun.so for 
> all the solaris builds, not only those based in Sun Workshop 
> compilers. Unfortunately I don't have any time now to look into that 
> issue, will try to go back into it as soon as I have some time to 
> dedicate to this project. Anyway, the answer could probably lie in 
> some plugin .ac file.
>
> Best regards.
> -- 
> Manuel.
>
>
>

Re: Problems compiling qpidc-0.5 on Solaris 10

Posted by Manuel Teira Paz <mt...@tid.es>.
Gordon Sim escribió:
> Warwick Richard (00101635) wrote:
>   
>> Hallo,
>>
>> part of this problem was already posted to the users@ mailing list last 
>> Friday. Since I haven't received an answer yet I figured I might have 
>> more luck here. Please let me know if this is the wrong channel.
>>     
>
> Either the user list or this list are the right place to ask. I'm sorry 
> we haven't been able to respond as yet. I myself don't actually have any 
> answers I'm afraid, but perhaps there are other people on the list who 
> do... (Andrew? Manuel?)
>   
It seems you're trying to build qpidc using a GNU compiler toolchain. I 
did it using the Sun Workshop compiler.
About the libCrun.so issue, I think it shouldn't be included while using 
gnu tools (libstdc++ should be used instead), but perhaps some autoconf 
script could be messing things up. I remember some issue months ago 
about some plugin autoconf script including libCrun.so for all the 
solaris builds, not only those based in Sun Workshop compilers. 
Unfortunately I don't have any time now to look into that issue, will 
try to go back into it as soon as I have some time to dedicate to this 
project. Anyway, the answer could probably lie in some plugin .ac file.

Best regards.
--
Manuel.



>   
>> I have two problems compiling qpidc-0.5 on Solaris 10.
>>
>> 1.) Broker.cpp won't compile because of multiple warning messages.
>>
>> "workaround" was to configure with the --enable-warnings=no option. The 
>> make then gets much further but stops in :
>>
>> 2.) replication_exchange.so won't build because the linker can't find 
>> libCrun.so.
>>     
>
> I'm guessing libCrun is the c/c++ library for Suns c++ compiler, and is 
> perhaps not actually needed when using gcc(?).
>
>  From your config.log: SUNCC_RUNTIME_LIBS='', so I wouldn't have 
> expected the libCrun library to be included anyway. However I don't 
> understand why its not found if it is on your path.
>
>   
>> More details on both problems below. I'm presuming that it's not a good 
>> idea to build with warnings disabled so would prefer to solve problem 
>> 1.). I'm trying to build a demo implementation for our site so we can 
>> evaluate QPID. Has anyone else built on Solaris 10 yet ?
>>     
>
> There has been some work towards getting it built on Solaris (using Suns 
> compiler though I think). I'm not sure whether that ever got the the 
> stage of a working broker and client or not.
>
>   
>> Can anyone offer any hints on how to get past this ?
>>     
>
> Sorry I could not be of more use, my knowledge is too limited I'm afraid.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Problems compiling qpidc-0.5 on Solaris 10

Posted by Gordon Sim <gs...@redhat.com>.
Warwick Richard (00101635) wrote:
> Hallo,
> 
> part of this problem was already posted to the users@ mailing list last 
> Friday. Since I haven't received an answer yet I figured I might have 
> more luck here. Please let me know if this is the wrong channel.

Either the user list or this list are the right place to ask. I'm sorry 
we haven't been able to respond as yet. I myself don't actually have any 
answers I'm afraid, but perhaps there are other people on the list who 
do... (Andrew? Manuel?)

> I have two problems compiling qpidc-0.5 on Solaris 10.
> 
> 1.) Broker.cpp won't compile because of multiple warning messages.
> 
> "workaround" was to configure with the --enable-warnings=no option. The 
> make then gets much further but stops in :
> 
> 2.) replication_exchange.so won't build because the linker can't find 
> libCrun.so.

I'm guessing libCrun is the c/c++ library for Suns c++ compiler, and is 
perhaps not actually needed when using gcc(?).

 From your config.log: SUNCC_RUNTIME_LIBS='', so I wouldn't have 
expected the libCrun library to be included anyway. However I don't 
understand why its not found if it is on your path.

> More details on both problems below. I'm presuming that it's not a good 
> idea to build with warnings disabled so would prefer to solve problem 
> 1.). I'm trying to build a demo implementation for our site so we can 
> evaluate QPID. Has anyone else built on Solaris 10 yet ?

There has been some work towards getting it built on Solaris (using Suns 
compiler though I think). I'm not sure whether that ever got the the 
stage of a working broker and client or not.

> Can anyone offer any hints on how to get past this ?

Sorry I could not be of more use, my knowledge is too limited I'm afraid.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: Problems compiling qpidc-0.5 on Solaris 10

Posted by "Warwick Richard (00101635)" <wa...@ubs.com>.
Thanks for the tip. I've switched to the Sun compiler and it now gets a 
lot further, but still haven't made it to the end.
The first stop was here :

source='qpid/Plugin.cpp' object='qpid/Plugin.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \
/bin/bash ../libtool --tag=CXX    --mode=compile /usr/bin/CC 
-DHAVE_CONFIG_H -I. -Igen -I./gen   -I/app/qpid/tools/include  -g 
-library=stlport4 -mt -c -o qpid/Plugin.lo qpid/Plugin.cpp
 /usr/bin/CC -DHAVE_CONFIG_H -I. -Igen -I./gen -I/app/qpid/tools/include 
-g -library=stlport4 -mt -c qpid/Plugin.cpp  -KPIC -DPIC -o 
qpid/.libs/Plugin.o
"qpid/Plugin.cpp", line 45: Error: The function "for_each" must have a 
prototype.
1 Error(s) detected.
*** Error code 1
make: Fatal error: Command failed for target `qpid/Plugin.lo'
Current working directory /app/qpid/stage/qpidc-0.5/src

I changed src/qpid/Plugin.cpp, added std::

void Plugin::Target::finalize() {
    std::for_each(finalizers.begin(), finalizers.end(), invoke);
    finalizers.clear();
}

The make then continued for a while then stopped here :

Making all in .
/bin/bash ../libtool --tag=CXX    --mode=link /usr/bin/CC  -g 
-library=stlport4 -mt  -no-undefined -module -avoid-version 
-L/app/qpid/tools/lib -library=stlport4 -mt -L/usr/lib/openais 
-L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync -o acl.la 
-rpath /app/qpid/lib/qpid/daemon qpid/acl/Acl.lo qpid/acl/AclData.lo  
qpid/acl/AclPlugin.lo qpid/acl/AclReader.lo libqpidbroker.la 
libqmfagent.la libqmfconsole.la libqpidcommon.la -lboost_program_options 
-lCrun
/usr/bin/CC -G -zdefs -hacl.so -o .libs/acl.so   qpid/acl/.libs/Acl.o 
qpid/acl/.libs/AclData.o qpid/acl/.libs/AclPlugin.o 
qpid/acl/.libs/AclReader.o  -R/app/qpid/stage/qpidc-0.5/src/.libs 
-R/app/qpid/lib -L/app/qpid/stage/qpidc-0.5/src/.libs 
-L/app/qpid/tools/lib -library=stlport4 -L/usr/lib/openais 
-L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync 
./.libs/libqpidbroker.so ./.libs/libqmfagent.so ./.libs/libqmfconsole.so 
./.libs/libqpidcommon.so -lboost_program_options -lCrun -lc   -mt -mt
Undefined                       first referenced
 symbol                             in file
qpid::sys::Poller::Poller()         ./.libs/libqpidbroker.so
qpid::sys::PollerHandle::PollerHandle #Nvariant 1(const 
qpid::sys::IOHandle&) ./.libs/libqpidcommon.so
void 
qpid::sys::Poller::modFd(qpid::sys::PollerHandle&,qpid::sys::Poller::Direction) 
./.libs/libqpidcommon.so
void 
qpid::sys::Poller::addFd(qpid::sys::PollerHandle&,qpid::sys::Poller::Direction) 
./.libs/libqpidcommon.so
bool qpid::sys::Poller::interrupt(qpid::sys::PollerHandle&) 
./.libs/libqpidcommon.so
void qpid::sys::Poller::delFd(qpid::sys::PollerHandle&) 
./.libs/libqpidcommon.so
qpid::sys::PollerHandle::~PollerHandle #Nvariant 1() 
./.libs/libqpidcommon.so
qpid::sys::Poller::~Poller()         ./.libs/libqpidbroker.so
void qpid::sys::Poller::shutdown()  ./.libs/libqpidbroker.so
ld: fatal: Symbol referencing errors. No output written to .libs/acl.so
*** Error code 1
make: Fatal error: Command failed for target `acl.la'
Current working directory /app/qpid/stage/qpidc-0.5/src

I tried reconfiguring with the '--without-poller' option but it stopped 
in exactly the same place.

qpidc-0.5 $ CC -V
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25

qpidc-0.5 $ env | sort
...
CC=/usr/bin/cc
CPPFLAGS=-I/app/qpid/tools/include
CXX=/usr/bin/CC
...
LDFLAGS=-L/app/qpid/tools/lib
LD_LIBRARY_PATH=/opt/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib/usr/sfw/lib:/home/t101635/lib:/usr/local/lib
...
PATH=/opt/bin:/opt/sbin:/opt/ubs/bin:/opt/ubs/sbin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin/home/t101635/.bin:/usr/sfw/bin:/home/t101635/share:/usr/local/bin

The next thing to try is a compiler upgrade, but could the problem be 
somewhere else ? It appears to me that sys/solaris/ECFPoller.cpp is not 
being compiled at all. I uncommented the following in the src/Makefile 
because it was always commented out regardless of the '--with-poller' 
configure option. This still didn't work either :

poller = qpid/sys/solaris/ECFPoller.cpp

Can anyone offer any advice ?

I've attached the config.log and the Makefile from the src directory.

Steve Huston wrote:
> The original work for the Solaris port was done with Sun C++ 12 (I
> believe) and not gcc. The configure script may need some help to get
> working with g++.
>
> -Steve
>
>   
>> -----Original Message-----
>> From: Warwick Richard (00101635) [mailto:warwick.richard@ubs.com] 
>> Sent: Tuesday, August 25, 2009 8:15 AM
>> To: dev@qpid.apache.org
>> Subject: Problems compiling qpidc-0.5 on Solaris 10
>>
>>
>> Hallo,
>>
>> part of this problem was already posted to the users@ mailing 
>> list last 
>> Friday. Since I haven't received an answer yet I figured I might
>>     
> have 
>   
>> more luck here. Please let me know if this is the wrong channel.
>>
>> I have two problems compiling qpidc-0.5 on Solaris 10.
>>
>> 1.) Broker.cpp won't compile because of multiple warning messages.
>>
>> "workaround" was to configure with the --enable-warnings=no 
>> option. The 
>> make then gets much further but stops in :
>>
>> 2.) replication_exchange.so won't build because the linker can't
>>     
> find 
>   
>> libCrun.so.
>>
>> More details on both problems below. I'm presuming that it's 
>> not a good 
>> idea to build with warnings disabled so would prefer to solve
>>     
> problem 
>   
>> 1.). I'm trying to build a demo implementation for our site so we
>>     
> can 
>   
>> evaluate QPID. Has anyone else built on Solaris 10 yet ?
>>
>> Can anyone offer any hints on how to get past this ?
>>
>> Regards
>> Warwick
>>
>> warwick.richard<at>ubs.com
>>
>>
>> Details for 1.)
>>
>> depbase=`echo qpid/broker/Broker.lo | sed 
>> 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
>>        /bin/bash ../libtool --tag=CXX   --mode=compile g++ 
>> -DHAVE_CONFIG_H -I. -Igen -I./gen  -I/app/qpid/tools/include -Werror
>>     
>
>   
>> -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual 
>> -Wcast-align -Wno-long-long -Winvalid-pch -Wno-system-headers 
>> -Woverloaded-virtual -g -O2 -MT qpid/broker/Broker.lo -MD -MP -MF 
>> $depbase.Tpo -c -o qpid/broker/Broker.lo qpid/broker/Broker.cpp &&\
>>        mv -f $depbase.Tpo $depbase.Plo
>> g++ -DHAVE_CONFIG_H -I. -Igen -I./gen 
>> -I/app/qpid/tools/include -Werror 
>> -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual 
>> -Wcast-align -Wno-long-long -Winvalid-pch -Wno-system-headers 
>> -Woverloaded-virtual -g -O2 -MT qpid/broker/Broker.lo -MD -MP -MF 
>> qpid/broker/.deps/Broker.Tpo -c qpid/broker/Broker.cpp  -fPIC 
>> -DPIC -o 
>> qpid/broker/.libs/Broker.o
>> qpid/broker/Broker.cpp: In constructor 
>> `qpid::broker::Broker::Broker(const
>>     
> qpid::broker::Broker::Options&)':
>   
>> qpid/broker/Broker.cpp:160: warning: cast from 
>> `qpid::management::ManagementAgent*' to 
>> `qpid::management::ManagementBroker*' increases required alignment
>>     
> of 
>   
>> target type
>> qpid/broker/Broker.cpp:187: warning: cast from 
>> `qpid::management::ManagementAgent*' to 
>> `qpid::management::ManagementBroker*' increases required alignment
>>     
> of 
>   
>> target type
>> qpid/broker/Broker.cpp:239: warning: cast from 
>> `qpid::management::ManagementAgent*' to 
>> `qpid::management::ManagementBroker*' increases required alignment
>>     
> of 
>   
>> target type
>> qpid/broker/Broker.cpp:241: warning: cast from 
>> `qpid::management::ManagementAgent*' to 
>> `qpid::management::ManagementBroker*' increases required alignment
>>     
> of 
>   
>> target type
>> make[2]: *** [qpid/broker/Broker.lo] Error 1
>> make[2]: Leaving directory `/app/qpid/stage/qpidc-0.5/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/app/qpid/stage/qpidc-0.5/src'
>> make: *** [all] Error 2
>>
>> Quite a few programs have already compiled, the make was 
>> running for 19 
>> minutes before grounding to a halt.
>>
>> Details for 2.)
>>
>> make[3]: Entering directory `/app/qpid/stage/qpidc-0.5/src'
>> /bin/bash ../libtool --tag=CXX   --mode=link g++  -g -O2 
>> -no-undefined 
>> -module -avoid-version -L/app/qpid/tools/lib -L/usr/lib/openais 
>> -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync -o 
>> replication_exchange.la -rpath /app/qpid/lib/qpid/daemon 
>> qpid/replication/ReplicationExchange.lo libqpidbroker.la 
>> libqpidcommon.la -lboost_program_options -lCrun -luuid
>> g++ -shared -nostdlib -L/app/qpid/tools/lib -L/usr/lib/openais 
>> -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync 
>> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crti.o 
>> /usr/ccs/lib/values-Xa.o 
>> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtbegin.o  
>> qpid/replication/.libs/ReplicationExchange.o  -Wl,-R 
>> -Wl,/app/qpid/stage/qpidc-0.5/src/.libs -Wl,-R 
>> -Wl,/usr/local/lib -Wl,-R 
>> -Wl,/app/qpid/lib -Wl,-R -Wl,/usr/local/lib 
>> -L/app/qpid/stage/qpidc-0.5/src/.libs -L/app/qpid/tools/lib 
>> -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync 
>> -L/usr/lib64/corosync ./.libs/libqpidbroker.so 
>> -L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/li
>> bstdc++-v3/src 
>> -L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/li
>> bstdc++-v3/src/.libs 
>> -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/openwin/lib 
>> -L/sol10/SOURCES/S10/gcc-3.4.6/objdir/gcc ./.libs/libqpidcommon.so 
>> -lboost_program_options -lCrun -luuid 
>> -L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6 -L/usr/ccs/bin 
>> -L/usr/ccs/lib 
>> -L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../.. 
>> /usr/local/lib/libstdc++.so -lm -lgcc_s 
>> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtend.o 
>> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtn.o  -Wl,-h 
>> -Wl,replication_exchange.so -o .libs/replication_exchange.so
>> ld: fatal: library -lCrun: not found
>> ld: fatal: File processing errors. No output written to 
>> .libs/replication_exchange.so
>> collect2: ld returned 1 exit status
>>
>> I twiddled the Makefile and added :
>> LDFLAGS = -L/app/qpid/tools/lib -L/usr/lib -L/usr/lib/openais 
>> -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync
>> but this didn't help.
>>
>> There *is* a libCrun.so on the system :
>> qpidc-0.5 $ ls -l /usr/lib/libCrun*
>> -rwxr-xr-x   1 root     bin        63772 Oct 12  2006 
>> /usr/lib/libCrun.so.1
>>
>> ... and /usr/lib is in the LD_LIBRARY_PATH (see below). I even tried
>>     
>
>   
>> "export LIBPATH=$LD_LIBRARY_PATH" but no luck.
>>
>> # Some system details :
>> qpidc-0.5 $ uname -a
>> SunOS svbotanybay.flur.zuerich.ubs.ch 5.10 Generic_127111-11 
>> sun4v sparc 
>> SUNW,Sun-Fire-T200
>>
>> # The package
>> qpidc-0.5 $ ls -l ../../pkg/qpid-cpp-0.5.tar.gz
>> -rw-r--r--   1 t101635  t101635  4926139 Jul 28 11:13 
>> ../../pkg/qpid-cpp-0.5.tar.gz
>>
>> # The package was downloaded from :
>> http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz
>>
>> # The offending source files
>> qpidc-0.5 $ ls -l src/qpid/broker/Broker.cpp
>> -rw-rw----   1 t101635  dev        16826 Mar 25 20:27 
>> src/qpid/broker/Broker.cpp
>>
>> # I'm compiling with gcc
>> qpidc-0.5 $ g++ -v
>> Reading specs from 
>> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
>> Configured with: ../configure --with-as=/usr/ccs/bin/as 
>> --with-ld=/usr/ccs/bin/ld --enable-shared
>>     
> --enable-languages=c,c++,f77
>   
>> Thread model: posix
>> gcc version 3.4.6
>>
>> # the GNU tools are installed in /usr/local/bin, the Sun compiler in
>>     
>
>   
>> /usr/bin
>> # I've placed /usr/local/bin first in the path so the GNU tools are 
>> always found first
>> qpidc-0.5 $ echo $PATH
>> /usr/local/bin:/opt/bin:/opt/sbin:/opt/ubs/bin:/opt/ubs/sbin:/
>> sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/
>> bin/home/t101635/.bin:/usr/sfw/bin:/home/t101635/share 
>>
>> # ditto for the libpath :
>> qpidc-0.5 $ echo $LD_LIBRARY_PATH
>> /usr/local/lib:/opt/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib/
>> usr/sfw/lib:/home/t101635/lib 
>>
>>
>> # qpid version
>> qpidc-0.5 $ ls -l RELEASE_NOTES
>> -rw-rw----   1 t101635  dev          677 May 17 14:33 RELEASE_NOTES
>>
>> # before compiling, I configured with this command :
>> # this is where boost is installed
>> export CPPFLAGS=-I/app/qpid/tools/include
>> export LDFLAGS=-L/app/qpid/tools/lib
>>
>> ./configure --prefix=/app/qpid --exec-prefix=/app/qpid \
>> --with-help2man --with-doxygen --with-poller \
>> --without-sasl --without-xml --without-rdma --without-ssl
>>
>> after problem 1.), I added --enable-warnings=no to the 
>> configure command 
>> and ran it (after make distclean)
>>
>> The new config.log is attached. (this is the one used on the second 
>> compile - i.e. problem 2.)
>>
>>
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   

RE: Problems compiling qpidc-0.5 on Solaris 10

Posted by Steve Huston <sh...@riverace.com>.
The original work for the Solaris port was done with Sun C++ 12 (I
believe) and not gcc. The configure script may need some help to get
working with g++.

-Steve

> -----Original Message-----
> From: Warwick Richard (00101635) [mailto:warwick.richard@ubs.com] 
> Sent: Tuesday, August 25, 2009 8:15 AM
> To: dev@qpid.apache.org
> Subject: Problems compiling qpidc-0.5 on Solaris 10
> 
> 
> Hallo,
> 
> part of this problem was already posted to the users@ mailing 
> list last 
> Friday. Since I haven't received an answer yet I figured I might
have 
> more luck here. Please let me know if this is the wrong channel.
> 
> I have two problems compiling qpidc-0.5 on Solaris 10.
> 
> 1.) Broker.cpp won't compile because of multiple warning messages.
> 
> "workaround" was to configure with the --enable-warnings=no 
> option. The 
> make then gets much further but stops in :
> 
> 2.) replication_exchange.so won't build because the linker can't
find 
> libCrun.so.
> 
> More details on both problems below. I'm presuming that it's 
> not a good 
> idea to build with warnings disabled so would prefer to solve
problem 
> 1.). I'm trying to build a demo implementation for our site so we
can 
> evaluate QPID. Has anyone else built on Solaris 10 yet ?
> 
> Can anyone offer any hints on how to get past this ?
> 
> Regards
> Warwick
> 
> warwick.richard<at>ubs.com
> 
> 
> Details for 1.)
> 
> depbase=`echo qpid/broker/Broker.lo | sed 
> 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
>        /bin/bash ../libtool --tag=CXX   --mode=compile g++ 
> -DHAVE_CONFIG_H -I. -Igen -I./gen  -I/app/qpid/tools/include -Werror

> -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual 
> -Wcast-align -Wno-long-long -Winvalid-pch -Wno-system-headers 
> -Woverloaded-virtual -g -O2 -MT qpid/broker/Broker.lo -MD -MP -MF 
> $depbase.Tpo -c -o qpid/broker/Broker.lo qpid/broker/Broker.cpp &&\
>        mv -f $depbase.Tpo $depbase.Plo
> g++ -DHAVE_CONFIG_H -I. -Igen -I./gen 
> -I/app/qpid/tools/include -Werror 
> -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual 
> -Wcast-align -Wno-long-long -Winvalid-pch -Wno-system-headers 
> -Woverloaded-virtual -g -O2 -MT qpid/broker/Broker.lo -MD -MP -MF 
> qpid/broker/.deps/Broker.Tpo -c qpid/broker/Broker.cpp  -fPIC 
> -DPIC -o 
> qpid/broker/.libs/Broker.o
> qpid/broker/Broker.cpp: In constructor 
> `qpid::broker::Broker::Broker(const
qpid::broker::Broker::Options&)':
> qpid/broker/Broker.cpp:160: warning: cast from 
> `qpid::management::ManagementAgent*' to 
> `qpid::management::ManagementBroker*' increases required alignment
of 
> target type
> qpid/broker/Broker.cpp:187: warning: cast from 
> `qpid::management::ManagementAgent*' to 
> `qpid::management::ManagementBroker*' increases required alignment
of 
> target type
> qpid/broker/Broker.cpp:239: warning: cast from 
> `qpid::management::ManagementAgent*' to 
> `qpid::management::ManagementBroker*' increases required alignment
of 
> target type
> qpid/broker/Broker.cpp:241: warning: cast from 
> `qpid::management::ManagementAgent*' to 
> `qpid::management::ManagementBroker*' increases required alignment
of 
> target type
> make[2]: *** [qpid/broker/Broker.lo] Error 1
> make[2]: Leaving directory `/app/qpid/stage/qpidc-0.5/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/app/qpid/stage/qpidc-0.5/src'
> make: *** [all] Error 2
> 
> Quite a few programs have already compiled, the make was 
> running for 19 
> minutes before grounding to a halt.
> 
> Details for 2.)
> 
> make[3]: Entering directory `/app/qpid/stage/qpidc-0.5/src'
> /bin/bash ../libtool --tag=CXX   --mode=link g++  -g -O2 
> -no-undefined 
> -module -avoid-version -L/app/qpid/tools/lib -L/usr/lib/openais 
> -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync -o 
> replication_exchange.la -rpath /app/qpid/lib/qpid/daemon 
> qpid/replication/ReplicationExchange.lo libqpidbroker.la 
> libqpidcommon.la -lboost_program_options -lCrun -luuid
> g++ -shared -nostdlib -L/app/qpid/tools/lib -L/usr/lib/openais 
> -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync 
> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crti.o 
> /usr/ccs/lib/values-Xa.o 
> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtbegin.o  
> qpid/replication/.libs/ReplicationExchange.o  -Wl,-R 
> -Wl,/app/qpid/stage/qpidc-0.5/src/.libs -Wl,-R 
> -Wl,/usr/local/lib -Wl,-R 
> -Wl,/app/qpid/lib -Wl,-R -Wl,/usr/local/lib 
> -L/app/qpid/stage/qpidc-0.5/src/.libs -L/app/qpid/tools/lib 
> -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync 
> -L/usr/lib64/corosync ./.libs/libqpidbroker.so 
> -L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/li
> bstdc++-v3/src 
> -L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/li
> bstdc++-v3/src/.libs 
> -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/openwin/lib 
> -L/sol10/SOURCES/S10/gcc-3.4.6/objdir/gcc ./.libs/libqpidcommon.so 
> -lboost_program_options -lCrun -luuid 
> -L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6 -L/usr/ccs/bin 
> -L/usr/ccs/lib 
> -L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../.. 
> /usr/local/lib/libstdc++.so -lm -lgcc_s 
> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtend.o 
> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crtn.o  -Wl,-h 
> -Wl,replication_exchange.so -o .libs/replication_exchange.so
> ld: fatal: library -lCrun: not found
> ld: fatal: File processing errors. No output written to 
> .libs/replication_exchange.so
> collect2: ld returned 1 exit status
> 
> I twiddled the Makefile and added :
> LDFLAGS = -L/app/qpid/tools/lib -L/usr/lib -L/usr/lib/openais 
> -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync
> but this didn't help.
> 
> There *is* a libCrun.so on the system :
> qpidc-0.5 $ ls -l /usr/lib/libCrun*
> -rwxr-xr-x   1 root     bin        63772 Oct 12  2006 
> /usr/lib/libCrun.so.1
> 
> ... and /usr/lib is in the LD_LIBRARY_PATH (see below). I even tried

> "export LIBPATH=$LD_LIBRARY_PATH" but no luck.
> 
> # Some system details :
> qpidc-0.5 $ uname -a
> SunOS svbotanybay.flur.zuerich.ubs.ch 5.10 Generic_127111-11 
> sun4v sparc 
> SUNW,Sun-Fire-T200
> 
> # The package
> qpidc-0.5 $ ls -l ../../pkg/qpid-cpp-0.5.tar.gz
> -rw-r--r--   1 t101635  t101635  4926139 Jul 28 11:13 
> ../../pkg/qpid-cpp-0.5.tar.gz
> 
> # The package was downloaded from :
> http://www.apache.org/dist/qpid/0.5/qpid-cpp-0.5.tar.gz
> 
> # The offending source files
> qpidc-0.5 $ ls -l src/qpid/broker/Broker.cpp
> -rw-rw----   1 t101635  dev        16826 Mar 25 20:27 
> src/qpid/broker/Broker.cpp
> 
> # I'm compiling with gcc
> qpidc-0.5 $ g++ -v
> Reading specs from 
> /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
> Configured with: ../configure --with-as=/usr/ccs/bin/as 
> --with-ld=/usr/ccs/bin/ld --enable-shared
--enable-languages=c,c++,f77
> Thread model: posix
> gcc version 3.4.6
> 
> # the GNU tools are installed in /usr/local/bin, the Sun compiler in

> /usr/bin
> # I've placed /usr/local/bin first in the path so the GNU tools are 
> always found first
> qpidc-0.5 $ echo $PATH
> /usr/local/bin:/opt/bin:/opt/sbin:/opt/ubs/bin:/opt/ubs/sbin:/
> sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/
> bin/home/t101635/.bin:/usr/sfw/bin:/home/t101635/share 
> 
> # ditto for the libpath :
> qpidc-0.5 $ echo $LD_LIBRARY_PATH
> /usr/local/lib:/opt/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib/
> usr/sfw/lib:/home/t101635/lib 
> 
> 
> # qpid version
> qpidc-0.5 $ ls -l RELEASE_NOTES
> -rw-rw----   1 t101635  dev          677 May 17 14:33 RELEASE_NOTES
> 
> # before compiling, I configured with this command :
> # this is where boost is installed
> export CPPFLAGS=-I/app/qpid/tools/include
> export LDFLAGS=-L/app/qpid/tools/lib
> 
> ./configure --prefix=/app/qpid --exec-prefix=/app/qpid \
> --with-help2man --with-doxygen --with-poller \
> --without-sasl --without-xml --without-rdma --without-ssl
> 
> after problem 1.), I added --enable-warnings=no to the 
> configure command 
> and ran it (after make distclean)
> 
> The new config.log is attached. (this is the one used on the second 
> compile - i.e. problem 2.)
> 
> 
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org