activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Undefined symbols of building ActiveMQ-CPP with Sun CC5.8
Date Fri, 22 May 2009 15:45:31 GMT
On Thu, 2009-05-21 at 19:17 -0700, ymjzxw wrote:
> Hi Tim, 
> 
> I do have set CC and CXX environment variables before config, but I did not
> see -library=stlport4 option was added to the Makefile both of src/main and
> src/example after config.
> 
> It had compile errors until I added this option to these two Makefiles
> manually. this option was added to the AMQ_CXXFLAGS and AMQ_TEST_CXXFLAGS.
> 
> After I got the libactivemq-cpp.so, I got following info:
> 
> bash-3.00# ldd src/main/.libs/libactivemq-cpp.so.3.0.0
>         libm.so.2 =>     /usr/lib/libm.so.2
>         libapr-1.so.0 =>         /usr/local/apr/lib/libapr-1.so.0
>         libuuid.so.1 =>  /usr/lib/libuuid.so.1
>         libsendfile.so.1 =>      /usr/lib/libsendfile.so.1
>         librt.so.1 =>    /usr/lib/librt.so.1
>         libsocket.so.1 =>        /usr/lib/libsocket.so.1
>         libnsl.so.1 =>   /usr/lib/libnsl.so.1
>         libpthread.so.1 =>       /usr/lib/libpthread.so.1
>         libaprutil-1.so.0 =>     /usr/local/apr/lib/libaprutil-1.so.0
>         libgdbm.so.3 =>  /usr/local/lib/libgdbm.so.3
>         libdb-4.2.so =>  /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so
>         libexpat.so.1 =>         /usr/local/lib/libexpat.so.1
>         libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
>         libc.so.1 =>     /usr/lib/libc.so.1
>         libstlport.so.1 =>      
> /compilers/WS11/SUNWspro/lib/stlport4/libstlport.so.1
>         libCrun.so.1 =>  /usr/lib/libCrun.so.1
>         libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
>         libaio.so.1 =>   /lib/libaio.so.1
>         libmd5.so.1 =>   /lib/libmd5.so.1
>         libmp.so.2 =>    /lib/libmp.so.2
>         libscf.so.1 =>   /lib/libscf.so.1
>         libexpat.so.0 =>         /usr/local/lib/libexpat.so.0
>         libm.so.1 =>     /lib/libm.so.1
>         libdoor.so.1 =>  /lib/libdoor.so.1
>         libuutil.so.1 =>         /lib/libuutil.so.1
>         /platform/SUNW,Sun-Fire-V215/lib/libc_psr.so.1
>         /platform/SUNW,Sun-Fire-V215/lib/libmd5_psr.so.1
> 
> stlport4/libstlport.so.1 was linked into.
> 
> Any mistakes I have done?
> 
> Thanks
> 
> 
> 
> 
> 
> 
> Timothy Bish wrote:
> > 
> > On Thu, 2009-05-21 at 08:20 -0700, ymjzxw wrote:
> >> The libactivemq-cpp.so was successfully built, but the executable file
> >> example was failed:
> >> Undefined                       first referenced
> >>  symbol                             in file
> >> std::smanip<int>::smanip(std::ios_base&(*)(std::ios_base&,int),int)
> >> ../main/.libs/libactivemq-cpp.so
> >> std::smanip_fill<char,std::char_traits<char> >::smanip_fill(std::ios
> >> &(*)(std::ios &,char),char) ../main/.libs/libactivemq-cpp.so
> >> int std::char_traits<char>::eof()   ../main/.libs/libactivemq-cpp.so
> >> void std::__initialize<unsigned>(__type_0&,__type_0) 
> >> ../main/.libs/libactivemq-cpp.so
> >> std::ostream &std::operator<<(std::ostream &,const char*)
> >> ../main/.libs/libactivemq-cpp.so
> >> char std::ios::fill(char) ../main/.libs/libactivemq-cpp.so
> >> int std::string::compare(const std::string &)const
> >> ../main/.libs/libactivemq-cpp.so
> >> std::ostream &std::operator<<(std::ostream &,char)
> >> ../main/.libs/libactivemq-cpp.so
> >> std::ios_base&std::swidth(std::ios_base&,int)
> >> ../main/.libs/libactivemq-cpp.so
> >> std::string::basic_string(const std::allocator<char>&)
> >> ../main/.libs/libactivemq-cpp.so
> >> int std::ios_base::setf(int,int)       ../main/.libs/libactivemq-cpp.so
> >> ld: fatal: Symbol referencing errors. No output written to .libs/example
> >> 
> >> 
> >> PS: I added -library=stlport4  option when build libactivemq-cpp.so and
> >> example.
> >> And the CC compiler version is Sun C++ 5.8 2005/10/13 (WS11)
> >> 
> >> What's going on here? Did it mean I have an old or wrong CC compiler?
> >> 
> >> Thanks
> > 
> > I'm not sure on the exact Sun Compilers that people have used to build
> > with, Sun compilers have always been a mystery to me.  It looks like the
> > code wasn't built with the stlport4 option, since you said its been
> > added then I'd make sure you did a clean build with it added.
> > 
> > The STLPort stuff should get added automatically buy the configure
> > script If you follow the recommendations on the FAQ page here:
> > http://activemq.apache.org/cms/using-the-solaris-cc-compiler.html
> > 
> > Regards
> > Tim.
> > 
> > -- 
> > Tim Bish
> > http://fusesource.com
> > http://timbish.blogspot.com/
> > 
> > 
> > 
> > 
> > 
> 

I don't see anything that looks wrong with what you have done.  I'm not
sure why the stlport stuff isn't getting added for you.  I will say that
the 3.0 code has not been built on a Solaris machine as far as I know, I
don't have access to one myself.  I'd make sure you use the latest code
from SVN right now as there have been some fixes since the last release
candidate.

Regards
Tim.


-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/




Mime
View raw message