[csw-maintainers] Need help on C++ linker issue
Rafael Ostertag
raos at opencsw.org
Tue Dec 13 22:42:58 CET 2011
Hi Dago
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.
Cheers
rafi
More information about the maintainers
mailing list