[csw-maintainers] Need help on C++ linker issue

Dagobert Michelsen dam at opencsw.org
Wed Dec 14 00:27:46 CET 2011


Hi Rafi,

Am 13.12.2011 um 22:42 schrieb Rafael Ostertag:
> On Tue, Dec 13, 2011 at 11:13:27AM +0100, Dagobert Michelsen wrote:
>> Hi folks,
>> 
>> in my effort to build imagemagick 64 bit I encountered a problem with the latest
>> libfpx, where I get unresolved symbols. When look at the methods I see a function
>> with a different mangled name, which has however the same unmangled signature.
>> It would be cool if someone with more expertise on C++ could lend me a hand in
>> this, everything is checked in GAR in pkg/libfpx/trunk:
>> 
>> unstable9s% ldd -r work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so | c++filt 
>>        /usr/lib/secure/s9_preload.so.1
>>        libCrun.so.1 =>  /usr/lib/libCrun.so.1
>>        libm.so.1 =>     /usr/lib/libm.so.1
>>        libc.so.1 =>     /usr/lib/libc.so.1
>>        libdl.so.1 =>    /usr/lib/libdl.so.1
>>        /usr/platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
>>        symbol not found: int CExposedDocFile::RenameElement(const char*,const char*)           (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
>>        symbol not found: int CExposedDocFile::RenameElement(const char*,const char*)           (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
>>        symbol not found: unsigned char OLEHeaderStream::Seek(const long,const unsigned long)           (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
>>        symbol not found: std::ostream &std::ostream::write(const char*,long)           (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
>>        symbol not found: std::ostream &std::ostream::put(char)         (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
> 
> I submitted two patches to libfpx which sould get rid of the ::RenameElement()
> and ::Seek() symbols not being found:
> 
> unstable9s$ ldd -r work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so | c++filt
>        /usr/lib/secure/s9_preload.so.1
>        libCrun.so.1 =>  /usr/lib/libCrun.so.1
>        libm.so.1 =>     /usr/lib/libm.so.1
>        libc.so.1 =>     /usr/lib/libc.so.1
>        libdl.so.1 =>    /usr/lib/libdl.so.1
>        /usr/platform/SUNW,SPARC-Enterprise-T5220/lib/libc_psr.so.1
>        symbol not found: std::ostream &std::ostream::write(const char*,long)           (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
>        symbol not found: std::ostream &std::ostream::put(char)         (work/solaris9-sparc/pkgroot/opt/csw/lib/libfpx.so)
> 
> However, the std::ostream:write() and ::put() symbols appear to be more
> serious. I guess they are caused by a combination of -D_RWSTD_NO_WSTR=1 and the
> way libfpx handles wchar. The file oless/h/owchar.h states following:
> 
> //  Note:        These routines uses WCHAR which is unsigned short (2 bytes)
> //               They are not compatible with some systems that uses 4 bytes
> /                wide characters
> 
> and it appears Solaris is using 4 bytes (sizeof(wchar_t)==4). This might explain why one
> has to use -D_RWSTD_NO_WSTR=1 in the first place. I might add, that I did not
> spend a great deal of time hunting down the ostream issue, so my conjecture
> might be off by miles.
> 
> Hope this helps.

These were exactly the changes I needed. The std::ostream can easily be added by using
-lCstd and I have now a fully working libfpx, the *last* thing missing to ImageMagick64 !


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