problems with std::wstring on Solaris

Anthony Feick afeick@hotmail.com
Fri Aug 30 12:06:00 GMT 2002


>Probably 4764 instead.

I didn't see 4764 before, but 6702 and 4764 look to be related.

On our system there was a problem with iswblank as well as vwscanf, 
vfwscanf, vswscanf, and wcstof.  Here's what I had to do to get gcc3.2 
working effectively on Solaris:

##############

gunzip < gcc-3.2.tar.gz | tar xvf -

mkdir gcc-3.2-obj
cd gcc-3.2-obj

cp ../gcc-3.2/libstdc++-v3/include/c_std/std_cwctype.h  \
   ../gcc-  3.2/libstdc++-v3/include/c_std/std_cwctype.h-bak

pico ../gcc-3.2/libstdc++-v3/include/c_std/std_cwctype.h
##comment out 'iswblank' lines 58 and 86

cp ../gcc-3.2/libstdc++-v3/include/c_std/std_cwchar.h \
   ../gcc-3.2/libstdc++-v3/include/c_std/std_cwchar.h-bak
pico ../gcc-3.2/libstdc++-v3/include/c_std/std_cwchar.h
##comment out 'vfwscanf' lines 95 and 157
##comment out 'vswscanf' lines 97 and 159
##comment out 'vwscanf' lines 99 and 161
##comment out 'wcstof' lines 118 and 176

../gcc-3.2/configure --prefix=/users/afeick/local  \
  --enable-threads=posix --enable-shared  \
  --disable-multilib --disable-nls   \
  --with-gnu-ld --with-ld=/users/afeick/local/bin/ld \
  --with-gnu-as --with-as=/users/afeick/local/bin/as \
  --enable-languages=c,c++,f77,objc --disable-libgcj

make -j 2 bootstrap

cp sparc-sun-solaris2.8/libstdc++-v3/config.h  \
     sparc-sun-solaris2.8/libstdc++-v3/config.h-bak

pico +20 sparc-sun-solaris2.8/libstdc++-v3/config.h
# line 21: change
#	/* #undef _GLIBCPP_USE_WCHAR_T */
#  to
#	#define _GLIBCPP_USE_WCHAR_T 1

cd sparc-sun-solaris2.8/libstdc++-v3/
make clean
cd ../..

make -j 2 bootstrap

make install
'mv' /users/afeick/local/lib/sparcv9/* /users/afeick/local/lib/.


#################
Don't laugh because I use pico!!! I don't know how to use vi very well, and 
we don't have emacs on the system.


I was also using these packages when I built gcc:

binutils-2.12.1  **bunutils-2.13 breaks gcc3.2 on Solaris
make-3.79.1
texinfo-4.2
m4-1.4
autoconf-2.53
automake-1.6.3
bison-1.35
flex-2.5.4
libtool-1.4.2

There was also the issue of defining "char_traits<unsigned short>" instead 
of using --enable-cxx-flags="-fshort-wchar".

-Tony



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com



More information about the Libstdc++ mailing list