[offtopic] cygwin and wchar

I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help? -- Eric Niebler BoostPro Computing http://www.boostpro.com

Eric Niebler wrote:
I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help?
Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v Robert Ramey

On 8/3/2010 9:06 PM, Robert Ramey wrote:
Eric Niebler wrote:
I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help?
Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v
Ah, I had to install the gcc4 package. It installs side-by-side with the earlier gcc package, which is gcc3. I wonder if it's a good idea for the cygwin toolset to just assume that wchar support is present, when really it's only present if the user has selected gcc4. Just-sayin'-ly, -- Eric Niebler BoostPro Computing http://www.boostpro.com

Eric Niebler wrote:
On 8/3/2010 9:06 PM, Robert Ramey wrote:
Eric Niebler wrote:
I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help?
Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v
Ah, I had to install the gcc4 package. It installs side-by-side with the earlier gcc package, which is gcc3.
I wonder if it's a good idea for the cygwin toolset to just assume that wchar support is present, when really it's only present if the user has selected gcc4.
What is 'cygwin' toolset? In any way, the ideal solution, of course, is to use compile or run checks to detect if enough of wchar_t support is available. See regex library for examples of how is it done. - Volodya

Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v
Ah, I had to install the gcc4 package. It installs side-by-side with the earlier gcc package, which is gcc3.
I wonder if it's a good idea for the cygwin toolset to just assume that wchar support is present, when really it's only present if the user has selected gcc4.
Almost certainly not, but I haven't had a chance to look into or test that change yet, so if Beman and yourself can work out something better between you, that would be great! John.

Eric Niebler wrote:
On 8/3/2010 9:06 PM, Robert Ramey wrote:
Eric Niebler wrote:
I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help?
Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v
Ah, I had to install the gcc4 package. It installs side-by-side with the earlier gcc package, which is gcc3.
I wonder if it's a good idea for the cygwin toolset to just assume that wchar support is present, when really it's only present if the user has selected gcc4.
I had this problem for the longest time with the serialization library where a large part of the library and tests make no sense without wchar support. I think I managed to fixup the v2 files to skip that part of the build to skip the irrelevent parts by making them dependent on some aspect of config library. Robert Ramey
Just-sayin'-ly,

On Wed, Aug 4, 2010 at 1:03 AM, Eric Niebler <eric@boostpro.com> wrote:
On 8/3/2010 9:06 PM, Robert Ramey wrote:
Eric Niebler wrote:
I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help?
Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v
Ah, I had to install the gcc4 package. It installs side-by-side with the earlier gcc package, which is gcc3.
I wonder if it's a good idea for the cygwin toolset to just assume that wchar support is present, when really it's only present if the user has selected gcc4.
Wide character support is currently detected by libstdcpp3.hpp. Is that detection not working? --Beman

On 8/5/2010 10:55 AM, Beman Dawes wrote:
On Wed, Aug 4, 2010 at 1:03 AM, Eric Niebler <eric@boostpro.com> wrote:
On 8/3/2010 9:06 PM, Robert Ramey wrote:
Eric Niebler wrote:
I see that the cygwin toolset now expects wchar support, and I've heard that cygwin does indeed support wchar now, but I don't know what I need to do to get it. Simply running the cygwin installer and letting it update everything doesn't seem to do the trick. Help?
Hmmm - that's all I did and it worked fine. I did notice one thing though - it seemed to leave some older version of gcc and libraries on there. Double check that the older ones aren't being invoked with gcc -v
Ah, I had to install the gcc4 package. It installs side-by-side with the earlier gcc package, which is gcc3.
I wonder if it's a good idea for the cygwin toolset to just assume that wchar support is present, when really it's only present if the user has selected gcc4.
Wide character support is currently detected by libstdcpp3.hpp.
Is that detection not working?
I guess not. The filesystem library failed to build on cygwin with wchar-ish errors until I installed gcc4. -- Eric Niebler BoostPro Computing http://www.boostpro.com

Wide character support is currently detected by libstdcpp3.hpp.
Is that detection not working?
I guess not. The filesystem library failed to build on cygwin with wchar-ish errors until I installed gcc4.
I've just investigated this and: * Boost.Config is defining the correct wide-character defect macros for both gcc-3 and gcc-4 on cygwin. * Boost.Filesystem either isn't making use of them at all (the v3 code) or has outdated workarounds (v2). I'm attaching a patch for the filesystem v2 code, but the v3 code Beman will have to fix if this is to work on non-wide-character platforms. BTW gcc 3 & 4 seem to co-exist quite happily on current cygwin, but as the default is still gcc-3 I guess we should still try and support non-wide-character platforms? HTH, John.

On 8/5/2010 12:18 PM, John Maddock wrote:
Eric Niebler wrote:
Beman Dawes wrote:
Wide character support is currently detected by libstdcpp3.hpp.
Is that detection not working?
I guess not. The filesystem library failed to build on cygwin with wchar-ish errors until I installed gcc4.
I've just investigated this and:
* Boost.Config is defining the correct wide-character defect macros for both gcc-3 and gcc-4 on cygwin. * Boost.Filesystem either isn't making use of them at all (the v3 code) or has outdated workarounds (v2).
I'm attaching a patch for the filesystem v2 code, but the v3 code Beman will have to fix if this is to work on non-wide-character platforms.
BTW gcc 3 & 4 seem to co-exist quite happily on current cygwin, but as the default is still gcc-3 I guess we should still try and support non-wide-character platforms?
Thanks for the patch, John. Beman, the remaining unpatched wchar failures in v3 seems like a fairly serious problem to me. Agree/disagree? Is it too late for 1.44? -- Eric Niebler BoostPro Computing http://www.boostpro.com

On Thu, Aug 5, 2010 at 12:18 PM, John Maddock <boost.regex@virgin.net> wrote:
Wide character support is currently detected by libstdcpp3.hpp.
Is that detection not working?
I guess not. The filesystem library failed to build on cygwin with wchar-ish errors until I installed gcc4.
I've just investigated this and:
* Boost.Config is defining the correct wide-character defect macros for both gcc-3 and gcc-4 on cygwin. * Boost.Filesystem either isn't making use of them at all (the v3 code) or has outdated workarounds (v2).
I'm attaching a patch for the filesystem v2 code,
Thank you, John! Apparently I never tested the v2 code with cygwin g++-3. I'm testing now, with your patches. There are still some snafus, but I should have a fix in plenty of time for the 1.44 final release.
but the v3 code Beman will have to fix if this is to work on non-wide-character platforms.
V3 requires wide-character support.
BTW gcc 3 & 4 seem to co-exist quite happily on current cygwin, but as the default is still gcc-3 I guess we should still try and support non-wide-character platforms?
If existing Boost code supports non-wide-character platforms, I guess we should still provide that support. But any new code could require wide support IMO. Thanks! --Beman
participants (5)
-
Beman Dawes
-
Eric Niebler
-
John Maddock
-
Robert Ramey
-
Vladimir Prus