Front page | perl.perl5.porters |
Postings from August 2013
[perl #119443] recent 5.19 changes break WinCE build/no locale platforms
Thread Previous
From:
bulk88
Date:
August 23, 2013 16:42
Subject:
[perl #119443] recent 5.19 changes break WinCE build/no locale platforms
Message ID:
rt-3.6.HEAD-1873-1377276151-358.119443-75-0@perl.org
# New Ticket Created by bulk88
# Please include the string: [perl #119443]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=119443 >
This is a bug report for perl from bulk88@hotmail.com,
generated with the help of perlbug 1.39 running under perl 5.19.0.
-----------------------------------------------------------------
[Please describe your issue here]
The formatting on this message will probably be screwed up since I'm not posting with my normal email client.
I recently got in a couple months of work on Perl on WinCE into git in http://perl5.git.perl.org/perl.git/commit/58ff4bd059d6ce9e478ad12c8132ee7025c0c2ed . That patch was written for the old 5.19.0 blead perl whose -V is in this ticket but was applied to current blead. When I tried building the core for WinCE, it syntaxed errored out because of locale code problems. This is something to do with changes in the last couple months (since May 2013), but I can't bisect it unfortunately.
The problem is, some of the defines probably changed accidentally in the win32/wince layer, or code for locale support was written that doesn't support dumber platforms. IDK which happened.
WinCE's locale support is non-existant. localeconv doesn't exist. setlocale is the following
____________________________________________________________
char * xcesetlocale(int category, const char *locale)
{
if(locale == NULL)
return "C";
if(strcmp(locale, "C") != 0)
return NULL;
return "C";
}
____________________________________________________________
Trying to compile locale.c makes a syntax error, look for "#######..." to see error
____________________________________________________________
cl.exe -c -nologo -GF -W3 -I.\include -I. -I.. -DWIN32 -D_CONSOLE -DNO_S
TRICT -D_WINDOWS -D_WIN32_WCE=300 -DUNDER_CE=300 -D _MT -D _DLL -D ARM -D arm
-D _arm_ -D _ARM_ -DPROCESSOR_ARM -DPALM_SIZE -IC:\sources\celib-palm-3.0\inc
-D PERL -GS- -O2 -Ot -DPERLDLL -DPERL_CORE -D_WINDOWS -D_WIN32_WCE=300 -DUND
ER_CE=300 -D _MT -D _DLL -D ARM -D arm -D _arm_ -D _ARM_ -DPROCESSOR_ARM -DPAL
M_SIZE -IC:\sources\celib-palm-3.0\inc -D PERL -GS- -O2 -Ot -DUSE_CROSS_COMPILE
-DUSE_PERLIO -DPERL_EXTERNAL_GLOB -Fowince-arm-hpc-wce300\dll\ ..\locale.c
locale.c
HAS_SETLOCALE ############################# a preproc message I added to perl.h
c:\sources\celib-palm-3.0\inc\cewin32_defs.h(81) : warning C4005: 'ExitProcess'
: macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 9.0\SmartDevices\SDK\Pock
etPC2003\Include\winbase.h(2179) : see previous definition of 'ExitProcess'
.\win32.h(317) : warning C4028: formal parameter 1 different from declaration
.\win32.h(317) : warning C4273: 'xcekill' : inconsistent dll linkage
C:\sources\celib-palm-3.0\inc\signal.h(60) : see previous definition of
'xcekill'
.\win32.h(323) : warning C4273: 'xcegetlogin' : inconsistent dll linkage
c:\sources\celib-palm-3.0\inc\cecrt.h(146) : see previous definition of
'xcegetlogin'
.\win32.h(324) : warning C4028: formal parameter 2 different from declaration
.\win32.h(324) : warning C4028: formal parameter 3 different from declaration
.\win32.h(324) : warning C4273: 'xcechown' : inconsistent dll linkage
c:\sources\celib-palm-3.0\inc\cecrt.h(137) : see previous definition of
'xcechown'
.\win32.h(379) : warning C4142: benign redefinition of type
.\include\sys/socket.h(303) : warning C4005: 'getprotobyname' : macro redefiniti
on
c:\sources\celib-palm-3.0\inc\cecrt_defs.h(161) : see previous definitio
n of 'getprotobyname'
.\include\sys/socket.h(304) : warning C4005: 'getprotobynumber' : macro redefini
tion
c:\sources\celib-palm-3.0\inc\cecrt_defs.h(162) : see previous definitio
n of 'getprotobynumber'
.\include\sys/socket.h(305) : warning C4005: 'getservbyname' : macro redefinitio
n
c:\sources\celib-palm-3.0\inc\cecrt_defs.h(159) : see previous definitio
n of 'getservbyname'
.\include\sys/socket.h(306) : warning C4005: 'getservbyport' : macro redefinitio
n
c:\sources\celib-palm-3.0\inc\cecrt_defs.h(160) : see previous definitio
n of 'getservbyport'
.\wince.h(66) : warning C4005: 'gettimeofday' : macro redefinition
c:\p519\src\win32\win32iop.h(443) : see previous definition of 'gettimeo
fday'
.\wince.h(79) : warning C4028: formal parameter 2 different from declaration
.\wince.h(79) : warning C4028: formal parameter 3 different from declaration
.\wince.h(79) : warning C4273: 'xcechown' : inconsistent dll linkage
c:\sources\celib-palm-3.0\inc\cecrt.h(137) : see previous definition of
'xcechown'
.\wince.h(116) : warning C4005: 'isatty' : macro redefinition
c:\p519\src\win32\win32iop.h(336) : see previous definition of 'isatty'
.\wince.h(119) : warning C4005: 'chsize' : macro redefinition
c:\p519\src\win32\win32iop.h(310) : see previous definition of 'chsize'
.\wince.h(121) : warning C4273: 'xcegetlogin' : inconsistent dll linkage
c:\sources\celib-palm-3.0\inc\cecrt.h(146) : see previous definition of
'xcegetlogin'
################################################################################
..\locale.c(57) : error C2065: 'PERL_ARGS_ASSERT_STDIZE_LOCALE' : undeclared ide
ntifier
..\locale.c(520) : warning C4013: 'is_cur_LC_category_utf8' undefined; assuming
extern returning int
..\locale.c(520) : error C2065: 'LC_CTYPE' : undeclared identifier
..\locale.c(622) : warning C4013: 'stdize_locale' undefined; assuming extern ret
urning int
..\locale.c(622) : warning C4013: 'xcesetlocale' undefined; assuming extern retu
rning int
..\locale.c(622) : warning C4047: '=' : 'char *' differs in levels of indirectio
n from 'int'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\ce\bin\x86_arm\cl.exe"' : return code '0x2'
Stop.
_______________________________________________________________
git blame shows that stdize_locale has been under the "#if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE)" in embed.fnc since 2005. The other function under that define is is_cur_LC_category_utf8 which was added on 6-24-2013 as http://perl5.git.perl.org/perl.git/commit/7d74bb61140f55c3b1a63a3ca309682bfca6a465?f=embed.fnc .
Before I think about if, why, and should, USE_LOCALE_NUMERIC and USE_LOCALE_COLLATE should be defined, the following problem comes up. Per an irc message from Nicholas, all platforms compile locale.c, there are no exceptions. S_stdize_locale is always compiled for locale.c, but in embed.fnc, it conditionally exists under "#if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE)". Which is it supposed to be? Either S_stdize_locale is to always be compiled, or only under "#if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE)". locale.c and embed.fnc are in conflict with each other.
I've played around with NO_LOCALE and I_LOCALE/i_locale from config.ce, but that lead to more syntax errors, especially since sv.c in some places conditionally uses PL_numeric_radix_sv and in other places sv.c always uses PL_numeric_radix_sv (for example, this 6-22-2013 commit http://perl5.git.perl.org/perl.git/commit/28acfe03fc59abea4ef2451b134d560f411183ab?f=sv.c ) but PL_numeric_radix_sv is conditionally defined in intrpvar.h as
_________________________________________________________________
#ifdef USE_LOCALE_NUMERIC
PERLVARI(I, numeric_standard, bool, TRUE)
/* Assume simple numerics */
PERLVARI(I, numeric_local, bool, TRUE)
/* Assume local numerics */
PERLVAR(I, numeric_name, char *) /* Name of current numeric locale */
PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */
#endif /* !USE_LOCALE_NUMERIC */
_________________________________________________________________
I dont know how to proceed.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.19.0:
Configured by Administrator at Sun May 19 19:59:16 2013.
Summary of my perl5 (revision 5 version 19 subversion 0 patch blead 2013-05-19.21:05:35 bb003204009d113d60d4173c3ed72b10c8169f14 v5.18.0-25-gbb00320) configuration:
Snapshot of: bb003204009d113d60d4173c3ed72b10c8169f14
Platform:
osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GS- -GL -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',
optimize='-O1 -MD -Zi -DNDEBUG -GS- -GL',
cppflags='-DWIN32'
ccversion='15.00.30729.01', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\p519\lib\CORE" -machine:x86'
libpth=\lib
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl519.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\p519\lib\CORE" -machine:x86'
Locally applied patches:
---
@INC for perl 5.19.0:
C:/p519/site/lib
C:/p519/lib
.
---
Environment for perl 5.19.0:
CYGWIN=tty
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/lib/x86:/usr/X11R6/lib
LOGDIR (unset)
PATH=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64;c:\WINDOWS\Microsoft.NET\Framework64\v3.5;c:\WINDOWS\Microsoft.NET\Framework64\v3.5\Microsoft .NET Framework 3.5 (Pre-Release Version);c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\win64\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64;c:\WINDOWS\Microsoft.NET\Framework64\v3.5;c:\WINDOWS\Microsoft.NET\Framework64\v3.5\Microsoft .NET Framework 3.5 (Pre-Release Version);c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPacka
ges;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\win64\x64;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files (x86)\Intel\Composer XE 2011 SP1\redist\ia32\tbb\vc9;C:\Program Files (x86)\Intel\Composer XE 2011 SP1\redist\intel64\tbb\vc9;C:\Program Files (x86)\Intel\Composer XE 2011 SP1\redist\intel64\ipp;C:\Program Files (x86)\Intel\Composer XE 2011 SP1\redist\ia32\ipp;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC;C:\Program Files\TortoiseGit\bin;
PERL_BADLANG (unset)
PERL_JSON_BACKEND=JSON::XS
PERL_YAML_BACKEND=YAML
SHELL (unset)
Thread Previous