[KW] 2/23/05 - Trying to build Perl 5.8.5 for CE
\perl 5.8.5\perl.h(380) : fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory NMAKE : fatal error U1077: 'clarm.exe' : return code '0x2' Stop.
In my latest attempt to build Perl for Windows CE, I have come across the error reported above. Part of my problem is trying to understand everything the makefile is doing. For example, what exactly is miniperl.exe all about? Although I have followed the instructions at http://perlce.sourceforge.net/, I still have this problem.
[VK] 24-feb-2005 I'll try building PerlCE? on this weekend (or two:), so I'll either reproduce your errors and will try fixing them, or will resolve things somehow else. Meanwhile:
[KW] 24-feb-2005 Which configuration file are you referring, exactly?
This eveningI decided to start fresh, re-baseline, and go from there. I downloaded the latest stable source for Perl 5.8.6, uncompressed the .tar.gz archive, and then edited the ..\wince\Makefile.ce file with the following directory paths unique to my Windows XP environment:
# INSTALL_ROOT specifies a path where this perl will be installed on CE device INSTALL_ROOT=/storage card/perl INST_TOP=$(INSTALL_ROOT) INST_VER=
# PERLCEDIR shoud be set to current directory PERLCEDIR = E:\MYLIBR~1\PERL58~1.6\wince
# WCEROOT is a directory where Windows CE Tools was installed WCEROOT = C:\Windows CE Tools
# HPERL stands for host perl, which is perl on local desktop machine # which is usually ..\miniperl.exe #HPERL = N:\Programme\perl\bin\perl.exe #HPERL = $(MAKEDIR)\..\miniperl.exe HPERL = C:\perl\bin\perl.exe
CEPATH = C:\PROGRA~1\MICROS~1.0\EVC\wce420 CELIBDLLDIR = E:\MYLIBR~1\CELIB-~1.11- CECONSOLEDIR = E:\MYLIBR~1\CONSOL~1.3-S
# Specify following options to build perl on local machine, by MSVC MSVCDIR = C:\PROGRA~1\MICROS~1.NET\Vc7 CCHOME = $(MSVCDIR) CCINCDIR = $(CCHOME)\include CCLIBDIR = $(CCHOME)\lib
Now, when I attempt to build using "nmake -f Makefile.ce" I get the following error:
cd ../win32 nmake -nologo -f Makefile "CCHOME=C:\PROGRA~1\MICROS~1.NET\Vc7" "CCINCDI R=C:\PROGRA~1\MICROS~1.NET\Vc7\include" "CCLIBDIR=C:\PROGRA~1\MICROS~1.NET\Vc7\l ib" "INCLUDE=C:\PROGRA~1\MICROS~1.NET\Vc7\include" "LIB=C:\PROGRA~1\MICROS~1.NET \Vc7\lib" "LINK_FLAGS=" .\config.h ..\miniperl.exe
NMAKE : fatal error U1052: file 'Makefile' not found Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET 2003 VC7\BIN\nmake.exe"' : return code '0x2' Stop.
[VK] 1. you do not edit makefile.ce, rather you should edit sample .bat file to reflect your settings. 2. looks like you fail at stage of building of [miniperl.exe], strangest thing is an error about lack of "Makefile" inside "./win32" which certaily should be there. Can you check this?
should be changed to
I will try building for PerlCE? quite soon. Meanwhile, it is obvious that you should be able to build perl for Win32. You're using MSVC .NET 2003; is it supported right now? I saw information about building with free MSVC compiler on [perlmonks] site at http://perlmonks.org/index.pl?node_id=387070, but not sure at the moment about your compiler. I guess you build perl with it quite good; am I right?
Is it supported? Good question. After doing a search on Google, I came across the following link which details how to build Perl 5.8.6 with Microsoft Visual Studio .NET (I suspect the instructions can be applied to 2002 or 2003, Vc 7.0 or 7.1, respectively). The link is: http://www.devside.net/web/server/windows/perl
This afternoon I started fresh again and re-baseline. I started once again with the latest stable source for Perl 5.8.6, uncompressed the .tar.gz archive, and then edited the ..\wince\compile.bat file with the following directory paths unique to my Windows XP environment:
set ARG-1=PV= set ARG-2=INST_VER= set ARG-3=INSTALL_ROOT=/storage card/perl set ARG-4=WCEROOT=%SDKROOT% set ARG-5=CEPATH=%WCEROOT% set ARG-6=CELIBDLLDIR=E:\MYLIBR~1\CELIB-~1.11- set ARG-7=CECONSOLEDIR=E:\MYLIBR~1\CONSOL~1.3-S
...REM... set ARG-10=MACHINE=wince-arm-pocket-wce300
set ARG-11=PERLCEDIR=$(MAKEDIR) set ARG-12=MSVCDIR=C:\PROGRA~1\MICROS~1.NET\Vc7 set ARG-13=CECOPY=$(HPERL) -I$(PERLCEDIR)\lib $(PERLCEDIR)\comp.pl --copy
Prior to running this batch file, I run the batch file WCEARMV4.BAT which sets SDKROOT as well as other environment variables.
When I execute the compile.bat file, I receive the following error:
e:\My Libraries\Perl 5.8.6\win32\win32.h(59) : fatal error C1083: Cannot open in clude file: 'windows.h': No such file or directory NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft eMbedded C++ 4.0\COMMON EVC\bin\NMAKE.EXE"' : return code '0x2' Stop.
My next attempt is to attempt to build Perl 5.8.6 using VS .NET 2003 (VC 7.1). Once I have this working, I can go back to building Perl for Windows CE. Does this sound a good path to pursue?
[VK] 27-feb-2005 well, as it became obvious, you should be able building [miniperl.exe] on Win32 at first, and then continue building PerlCE?. This is what build process begins with.
Further, I see you placed your build tree in a path containing space. While very windows-ish, you're calling for trouble: remember that space will sometimes break your file-path to many arguments. I am not sure whether pel will pass tests or not in such circumstances, but probabliity of getting unneeded breaking of building process increases greatly (even for native build, not a cross-build!)
Whether or not building of perl currently supported by your compiler - please read in README.win32 of perl distribution or even better yet ask on p5p porters mailing list.
[KW] 27-feb-2005 (2) You are exactly right on building Perl from a directory (path) that contains no spaces.
The following paragraph is taken from URL: http://perlmonks.org/index.pl?node_id=387490
"Note that Perl should be unpacked into a directory path that does not contain any spaces otherwise MakeMaker? will experience some problems. There is no harm in having the MS toolkit and other packages installed into their default C:\Program Files locations."
Thus, in my next attempt I will unpack the Perl 5.8.6 distribution to a local directory without spaces. First, I will attempt to build Perl for Win32. Once I am successful with this, I will move on to building Perl for Windows CE.
From our dicussions, I have two articles for building Perl for Windows.
If anyone else knows of other, please post to the Wiki page.
[VK] You did not fully follow the situation.
Building Perl on Win32 is trivial task. May be you need to set up your environment variables, but this is really easy, and after that a single 'nmake' should rebuild and 'nmake test' test your build.
I am sorry, but I must repeat: advices at http://perlmonks.org/index.pl?node_id=387070 are low quality. I stated this on [perlmonks] site and this is easy to argue: those go into detail in obvious things, and just "set up following variables" - how, when, why? - on the other side. Moreover, those advices exist in much better shape at MSVC's readme and perl's README.win32, pointing to right places or may be quoting those is better than frustrating people with doubtful pieces of information.
http://perlmonks.org/index.pl?node_id=346164 is much better.
However, the point is not how to build perl on Win32 - you must start there but this is not where complications begin :):):)
[KW] 28-feb-2005 Ok VK, I'll go through information in perl's README.win32 and see if I can't follow that to build Perl for Windows successfully. I am going to be busy over the next few days so I don't expect I'll be able to try until Thursday or Friday. Take care for now. :)
[KW] 13-Mar-2005 When we last left, I was had mentioned that I would first focus on building Perl for Windows (using Visual Studio .NET 2003). I was able to accomplish and it turned out to be rather easy. Following compilation of Perl for Windows, I then switched back to the ../wince directory to pick-up with building Perl for Windows CE. When I attempt this build, I am back to the following error:
Compiling for wince-arm-pocket-wce300 LIB=C:\Windows CE Tools\WCE300\Pocket PC 2002\lib\ARM INCLUDE=C:\Windows CE Tools\WCE300\Pocket PC 2002\include PATH=C:\Program Files\Microsoft eMbedded C++ 4.0
clarm.exe -c -nologo -Gf -W3 -I.\include -I..\win32\include -I. -I.. -DW IN32 -D_CONSOLE -DNO_STRICT -D_WINDOWS -D_WIN32_WCE=300 -DUNDER_CE=300 -D ARM -D arm -D _ARM_ -D _arm_ -DPROCESSOR_ARM -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SI ZE -I E:\MYLIBR~1\CELIB-~1.11-\inc -D PERL -O2 -Ot -DPERLDLL -DPERL_CORE -D _WINDOWS -D_WIN32_WCE=300 -DUNDER_CE=300 -D ARM -D arm -D _ARM_ -D _arm_ -DPROC ESSOR_ARM -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SIZE -I E:\MYLIBR~1\CELIB-~1.11- \inc -D PERL -O2 -Ot -DUSE_PERLIO -DPERL_EXTERNAL_GLOB -Fowince-arm-pocket-wce30 0\dll\ ..\av.c av.c e:\perl\perl.h(380) : fatal error C1083: Cannot open include file: 'sys/types.h'
Looking more closing at the list of directories to include, we have the following:
INCLUDES = -I.\include -I..\win32\include -I. -I.. (#line 468)
There is also -I E:\MYLIBR~1\CELIB-~1.11-\inc. From what I have been to see, none of the directories related to EVC or the Pocket PC platform SDK have the sys/types.h header file.
If you go back to Visual Studio .NET 2003, you will find the types.h header file in the following directory:
Where should this header file be source from? Does it need to be part of the EVC or WinCe?/PPC platform SDK, or can it come from Visual Studio .NET 2003?
VK 16-mar-2005 Sorry for delay.
From brief review of your situation, I understand that you should point your build system to namely that 'sys/types.h' which comes with CELIB source distribution.
Item 6. of list in http://perlce.sf.net mentions this, when talking about environment variable CELIBDLLDIR, and looks like you miss namely that.
Naming of env vars a bit messy, and I hope to fix this mess sometimes soon.
Besides, checkpoint: am I right that you build host miniperl.exe not as an independent step, but it is built as a subtask of a larger "nmake -f makefile.ce" call from within 'wince' subdirectory?
When I uncompressed CELIB, it did not retain the directory paths. That turned to the major problem. Having said that, it defaults to wanting to put the files in a subdirectory named "inc". Thus, my directory structure now looks like:
and so... Since I had already modified the compile.bat to specify celib-3.11-dll-src, I decided to copy all the files and subdirectories in inc up one level. This allowed me to move on.
Now I am receiving compilation errors from Tstatbuf, Tstatcache, etc. Based on some quick investigation, this appears to be related to threading (5005 threads, etc.). Any thoughts? I am definately getting closer.
e:\perl\wince\win32iop.h(330) : warning C4005: 'getpid' : macro redefinition
e:\mylibr~1\celib-~2.11-\cecrt_defs.h(132) : see previous definition of'getpid' e:\perl\thrdvar.h(85) : error C2079: 'Tstatbuf' uses undefined struct '_stati64'
e:\perl\thrdvar.h(86) : error C2079: 'Tstatcache' uses undefined struct '_stati6 4' e:\mylibr~1\celib-~2.11-\fcntl.h(28) : warning C4005: '_O_NOINHERIT' : macro red efinition
e:\perl\wince\win32.h(217) : see previous definition of '_O_NOINHERIT'e:\perl\doio.c(564) : warning C4133: 'function' : incompatible types - from 'int
*' to 'struct xcestat *'e:\perl\doio.c(575) : error C2224: left of '.st_mode' must have struct/union typ e e:\perl\doio.c(683) : error C2224: left of '.st_mode' must have struct/union typ e e:\perl\doio.c(759) : error C2224: left of '.st_mode' must have struct/union typ e e:\perl\doio.c(760) : error C2224: left of '.st_uid' must have struct/union type
e:\perl\doio.c(761) : error C2224: left of '.st_gid' must have struct/union type
e:\perl\doio.c(868) : warning C4133: 'function' : incompatible types - from 'int
*' to 'struct xcestat *'e:\perl\doio.c(877) : error C2224: left of '.st_uid' must have struct/union type
e:\perl\doio.c(877) : error C2224: left of '.st_gid' must have struct/union type
e:\perl\doio.c(892) : warning C4133: 'function' : incompatible types - from 'int
*' to 'struct xcestat *'e:\perl\doio.c(893) : error C2224: left of '.st_mode' must have struct/union typ e e:\perl\doio.c(1335) : warning C4133: 'function' : incompatible types - from 'in t *' to 'struct xcestat *' e:\perl\doio.c(1366) : warning C4133: 'function' : incompatible types - from 'in t *' to 'struct xcestat *' e:\perl\doio.c(1403) : warning C4133: 'function' : incompatible types - from 'in t *' to 'struct xcestat *' e:\perl\doio.c(1757) : warning C4133: 'function' : incompatible types - from 'in t *' to 'struct xcestat *' e:\perl\doio.c(1757) : error C2224: left of '.st_mode' must have struct/union ty pe e:\perl\doio.c(1848) : error C2037: left of 'st_mode' specifies undefined struct /union '_stati64' e:\perl\doio.c(1848) : warning C4033: 'Perl_cando' must return a value NMAKE : fatal error U1077: 'clarm.exe' : return code '0x2'
Perl rebuild problems
Tcl/Tk? rebuild problems