BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000904 [uClibc] Standards Compliance minor always 06-14-06 02:37 06-29-06 17:22
Reporter syn View Status public  
Assigned To uClibc
Priority normal Resolution no change required  
Status closed   Product Version 0.9.28
Summary 0000904: __ctype_touplow_t has incompatible type
Description In uClibc, __ctype_touplow_t is either __int16_t (if __UCLIBC_HAS_CTYPE_SIGNED__ is defined) or unsigned char otherwise. There is a comment from Manuel stating :

`` * Besides uClibc, I'm using this code in my libc for elks, which is
   * a 16-bit environment with a fairly limited compiler. It would make
   * things much easier for me if this file isn't modified unnecessarily. ''

But when building gcc 3.4.6 with C++ support, build fails with error :
In file included from ../../../../gcc-3.4.6/libstdc++-v3/src/ctype.cc:76:
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h: In constructor `std::ctype<char>::ctype(int*, const short unsigned int*, bool, size_t)':
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:85: error: cannot convert `const __ctype_touplow_t*' to `const int*' in assignment
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:86: error: cannot convert `const __ctype_touplow_t*' to `const int*' in assignment
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h: In constructor `std::ctype<char>::ctype(const short unsigned int*, bool, size_t)':
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:120: error: cannot convert `const __ctype_touplow_t*' to `const int*' in assignment
/usr/cross/src/gcc-3.4.6-i586-linux-uclibc-stage2-build/i586-linux-uclibc/libstdc++-v3/include/i586-linux-uclibc/bits/ctype_noninline.h:121: error: cannot convert `const __ctype_touplow_t*' to `const int*' in assignment

In bits/ctype_base.h (under libstdc++-v3 directory) :
    typedef const int* __to_type;

with a comment : // Information as gleaned from /usr/include/ctype.h.
__to_type is used to declare _M_toupper and _M_tolower, which are used in incompatible assignments above.

There are several solutions to this problem :
1/ We can patch uClibc so that it uses 32 bits integers, and 16 bits integers when a macro (say __ELKS_LIBC__ ;-)) is defined. This seems to be the best fix to me, since we really need glibc compatibility.
2/ We can patch gcc to correctly typedef __to_type (or even avoid defining this type and use __ctype_touplow_t instead), but I guess gcc guys had good reasons to do this code that way, and gcc isn't as reactive as uClibc is.
3/ Maybe other cool solutions I haven't thought about.
Additional Information
Attached Files

- Relationships

- Notes
(0001425)
syn
06-14-06 02:50

After some more searching, the bug seems to be fixed in gcc, but with a more or less hidden patch : http://gcc.gnu.org/bugzilla/attachment.cgi?id=6132 [^]
 
(0001426)
psm
06-14-06 02:58

you seem to try to compile vanilla gcc sources, you should at least apply the gcc
patches used in buildroot
 
(0001475)
vapier
06-29-06 17:22

nothing to change in uClibc
 

- Issue History
Date Modified Username Field Change
06-14-06 02:37 syn New Issue
06-14-06 02:37 syn Status new => assigned
06-14-06 02:37 syn Assigned To  => uClibc
06-14-06 02:50 syn Note Added: 0001425
06-14-06 02:58 psm Note Added: 0001426
06-29-06 17:22 vapier Note Added: 0001475
06-29-06 17:22 vapier Status assigned => closed
06-29-06 17:22 vapier Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker