[csw-maintainers] setting *FLAGS?
Dagobert Michelsen
dam at opencsw.org
Fri Apr 20 12:56:36 CEST 2012
Hi Daniel,
Am 19.04.2012 um 17:48 schrieb Daniel Pocock:
> On 19/04/12 17:36, Dagobert Michelsen wrote:
>> Am 19.04.2012 um 17:31 schrieb Daniel Pocock:
>>> Today I'm trying to build with mgar - I've added resiprocate to the mgar
>>> repository.
>>>
>>> However, I still find that the binaries refuse to link. All the
>>> libraries compile and link, but when it tries to make a binary, it fails
>>>
>>> Exactly the same code compiles and runs on Linux, so I suspect it is
>>> some variation in CXXFLAGS or LDFLAGS - are there any common problems
>>> with C++ code that need a particular flag on Solaris/SunPro?
>>>
>>> $ mgar clean && mgar build
>>>
>>> ....
>>>
>>> libtool: link: /opt/SUNWspro/bin/CC -xO3 -m32 -xarch=sparc
>>> -I/opt/csw/bdb48/include -DRESIP_OSTYPE_SUNOS -DRESIP_ARCH_SPARC
>>> -DRESIP_LARCH_SPARC -D_REENTRANT -DRESIP_TOOLCHAIN_SUNPRO -m32
>>> -xarch=sparc -o .libs/repro repro.o -L/opt/csw/lib -L/opt/csw/bdb48/lib
>>> ./.libs/librepro.so -ldb_cxx ../resip/dum/.libs/libdum.so
>>> ../resip/stack/.libs/libresip.so ../rutil/.libs/librutil.so
>>> -library=stlport4 -lcares -lrt -lssl -lpthread -lsocket -lnsl -R/opt/csw/lib
>>> Undefined first referenced
>>> symbol in file
>>> void resip::SipStack::post(const
>>> std::auto_ptr<resip::ApplicationMessage>) ./.libs/librepro.so
>>> bool resip::RRCache::lookup(const
>>> resip::Data&,int,int,std::vector<resip::DnsResourceRecord*>&,int&)
>>> ../rutil/.libs/librutil.so
>>> ld: fatal: Symbol referencing errors. No output written to .libs/repro
>>> gmake[3]: *** [repro] Error 1
>>
>> Do you have committed your work? In which location in the GAR tree are
>> you building? Maybe other maintainers can have a look...
>
> Yes, the latest work is committed
>
> https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/resiprocate/trunk
>
> I get the error just running
>
> mgar clean && mgar build
>
> another useful test is
>
> $ (cd work/build-isa-sparcv8plus/resiprocate-1.8.0 && gmake -C rutil
> check)
>
> That should just build and run the most simple test cases - but it also
> fails with the same linker error when it gets to the first binary
Indeed:
> unstable9s% nm -A .libs/librepro.so | c++filt | grep post
> ...
> .libs/librepro.so: [1272] | 0| 0|FUNC |GLOB |0 |UNDEF |void resip::SipStack::post(const std::auto_ptr<resip::ApplicationMessage>)
> ...
The problem is here:
> unstable9s% nm -A ../resip/stack/.libs/libresip.so | c++filt | grep post
> ...
> ../resip/stack/.libs/libresip.so: [6069] | 1561800| 104|FUNC |GLOB |0 |10 |void resip::SipStack::post(std::auto_ptr<resip::ApplicationMessage>)
Please note the missing "const" here.
As expected the header definitions differ from the method signature:
> SipStack.hxx: void post(const std::auto_ptr<ApplicationMessage> message);
> SipStack.cxx:SipStack::post(std::auto_ptr<ApplicationMessage> message)
Sun Studio honours "const" for mangling whereas GCC does not, so the error is a result
of the stricter checks of Sun Studio (which is IMHO a good thing).
After removing the "const" in the header definition compilation succeeds to another
"const"-error which should be easy to fix.
Additionally, there are some warnings which you may want to address:
> "../../rutil/dns/DnsStub.hxx", line 20: Warning: Last line in file "../../rutil/dns/DnsAAAARecord.hxx" is not terminated with a newline.
> "../../rutil/dns/DnsStub.hxx", line 21: Warning: Last line in file "../../rutil/dns/DnsCnameRecord.hxx" is not terminated with a newline.
> "../../rutil/dns/DnsStub.hxx", line 22: Warning: Last line in file "../../rutil/dns/DnsHostRecord.hxx" is not terminated with a newline.
> "../../rutil/dns/DnsStub.hxx", line 23: Warning: Last line in file "../../rutil/dns/DnsNaptrRecord.hxx" is not terminated with a newline.
> "../../rutil/dns/DnsStub.hxx", line 24: Warning: Last line in file "../../rutil/dns/DnsSrvRecord.hxx" is not terminated with a newline.
> "../../rutil/dns/RRFactory.hxx", line 5: Warning: Last line in file "../../rutil/dns/RROverlay.hxx" is not terminated with a newline.
> "../../rutil/dns/ExternalDns.hxx", line 26: Warning: Identifier expected instead of "}".
> "../../resip/stack/DnsInterface.hxx", line 12: Warning: Last line in file "../../rutil/dns/RRVip.hxx" is not terminated with a newline.
> 8 Warning(s) detected.
Best regards
-- Dago
--
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896
More information about the maintainers
mailing list