Build for Windows Mobile Failed

Dear Readers,

I searched the ruby-talk archives and googled but both left me alone.

After I read the README.wince documentation for the build process I
installed all the required files. My setup is:

  • Windows Embedded Visual C++ 4.0 SP4

  • DELL Axim X51 ARMV5T XScale CPU

  • Windows Mobile 5.0

The following batch set the env variables and provide me a command line
for the build process.

–>8—

set INCLUDE=F:\Programme\Windows CE
Tools\wce400\STANDARDSDK\Include\Armv4t

set LIB=F:\Programme\Windows CE Tools\wce400\STANDARDSDK\Lib\Armv4t
set CE_TOOLS_DIR=F:\Programme\Windows CE Tools\wce400
set EMBEDDED_TOOLS_DIR=C:\Programme\Microsoft eMbedded C++
4.0\EVC\WCE400\BIN

set
PATH=%PATH%;%EMBEDDED_TOOLS_DIR%;%CE_TOOLS_DIR%;C:\Programme\Microsoft
eMbedded C++ 4.0\Common\EVC\Bin

start /D F:\ cmd.exe

I successfully ran configure.bat (without an architecture type as
parameter for two reasons: first I don’t habe any idea how to look up
the target string for my pda like ‘arm-hpc-wince’, second this parameter
seems to be optional)

I ran nmake and he complaint following:

—>8-------
F:\ruby-1.8.4\wince>configure.bat
Creating Makefile
type `NMAKE’ to make ruby for mswince.
F:\ruby-1.8.4\wince>nmake

Microsoft ® Program Maintenance Utility Version 6.00.8168.0
Copyright © Microsoft Corp 1988-1998. All rights reserved.

Creating fake.rb
Creating config.h
config.h updated.
Creating config.status
rbconfig.rb updated
cl -nologo -Zi -w -O2b2xg- -G6 -DRUBY_EXPORT -I. -I./…
-I./…/missing -I./…/wince -I. -I./
… -I./…/missing -I./…/wince -DUNDER_CE -D_WIN32_WCE=
-DFILENAME_MAX=MAX_PATH -DTLS_OUT_OF_INDE
XES=0xFFFFFFFF -DBUFSIZ=512 -D_UNICODE -DUNICODE -c -Tc./…/array.c
array.c
.\config.h(92) : fatal error C1017: invalid integer constant expression
NMAKE : fatal error U1077: ‘cl’ : return code ‘0x2’
Stop.

It seems that he stops as the -D variable _WIN32_WCE= is empty. Okay.
Opened the makefile in my editor and look up the line.

----->8-------
PROCESSOR_ARCHITECTURE = x86
PROCESSOR_LEVEL = 6

RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)

CFLAGS = -nologo $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)

CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -I$(srcdir)/wince
$(CECPUDEF) -DUNDER_CE -D_WIN32_WCE=$(SUBSYSVERSION:.=)
-DFILENAME_MAX=MAX_PATH -DTLS_OUT_OF_INDEXES=0xFFFFFFFF
-DBUFSIZ=512 -D_UNICODE -DUNICODE $(QSH4)

How does he resolve the SUBSYSVERSION? It shouldn’t be empty (I guess).
Sorry for the long post, but I hope to demonstrate that I try to figure
out the problem.

TIA,

Daniel Völkerts wrote:

I searched the ruby-talk archives and googled but both left me alone.

After I read the README.wince documentation for the build process I
installed all the required files.

Join the club. I have tried building a WinCE version against Ruby
versions 1.6.8 through 1.8.4 with no luck. I wound up installing a
binary version I found on this website →
ruby-mswince. It seemed to work up to a
certain point but then the Ruby interpreter would error out trying to
parse the scripts it was given as a command line argument.The string
module must be incompatible between the Ruby binary version and my
WinCE platform (in this case a Dell Axim x50 running Windows Mobile
5.0). Since I had to port my client app to this platform I rewrote the
whole thing in Python. Not fun but it was the best tool for the job.

Daniel Völkerts wrote:

Thanks. I googled your tries. It is a bit frustrating as this option is
provided by the sources, so my guess was that anybody is mainting this.
So I thought their might be someone who knows what is going on. It’s a
pitty that ruby loses ground on that sector :frowning:

I’ll try one and report a success.

As for the sources, from what I’ve read there was a version of Ruby
called PocketRuby that was compiled for Windows CE devices. But this
version hasn’t been officially supported for awhile AFAIK, although the
wince build directory is still there. The only guess I have is that the
MSVC build process fails but perhaps the Cygwin route might produce
better results. I frankly didn’t have the time to try every option and
combination of compilers and gave up. Hopefully you have better luck.
Please provide an update if anything comes about…

gregarican schrieb:

Join the club. I have tried building a WinCE version against Ruby
versions 1.6.8 through 1.8.4 with no luck. I wound up installing a
binary version I found on this website →
ruby-mswince. It seemed to work up to a
certain point but then the Ruby interpreter would error out trying to
parse the scripts it was given as a command line argument.The string
module must be incompatible between the Ruby binary version and my
WinCE platform (in this case a Dell Axim x50 running Windows Mobile
5.0). Since I had to port my client app to this platform I rewrote the
whole thing in Python. Not fun but it was the best tool for the job.

Thanks. I googled your tries. It is a bit frustrating as this option is
provided by the sources, so my guess was that anybody is mainting this.
So I thought their might be someone who knows what is going on. It’s a
pitty that ruby loses ground on that sector :frowning:

I’ll try one and report a success.

TIA,

gregarican schrieb:

As for the sources, from what I’ve read there was a version of Ruby
called PocketRuby that was compiled for Windows CE devices. But this
version hasn’t been officially supported for awhile AFAIK, although the
wince build directory is still there. The only guess I have is that the
MSVC build process fails but perhaps the Cygwin route might produce
better results. I frankly didn’t have the time to try every option and
combination of compilers and gave up. Hopefully you have better luck.
Please provide an update if anything comes about…

First I’ll give the CVS version a try. If this fails I use the cygwin /
linux build environment. I read about Mozilla Minimo to use Linux as a
build environment for Pocket PC. So there is more experience on this I
hope.

Greetings,

Oh it is going on. By your hint, I searched for PocketRuby and patch and
found an thread on ruby-dev. Great I thought. Unfortunatly the thread is
in japanese?

I can spanish, french, english, german and Java™ g. A automatic
translation failed. Any help is appreciated.

g,

Daniel Völkerts wrote:

Oh it is going on. By your hint, I searched for PocketRuby and patch and
found an thread on ruby-dev. Great I thought. Unfortunatly the thread is
in japanese?

I can spanish, french, english, german and Java™ g. A automatic
translation failed. Any help is appreciated.

I would try Babelfish, although the translations that I try for
Japanese->English tend to make things sound a little silly. But at
least it gives me some hints as to what is going on. Frankly this is
still the one aspect of Ruby that leaves it lacking for me as a
production solution for some areas in my company. After over a year of
trying I have still found it isn’t totally friendly toward Win32/MSVC
and seems biased toward Linux/GCC. And trying to rig my own solution is
tough because key documentation can be Japanese only in certain
situations I have run into (e.g. - PocketRuby, DL).

I love Ruby’s syntax, intuitiveness, mindset, and elegance. It makes
sense to me more
than any other language. And perhaps that’s what frustrates me the
most, since I have to resort to other (less preferred) languages for
certain tasks. I’d rather be doing it in Ruby. Not to troll, but if
Python is a more prominent language compared to Ruby I would bet in
part it’s because it’s more Windows-friendly. Sure it’s been around
longer and had more libraries and extensions built for it. But if
Windows clients make up the vast majority of OS market share it’s
certainly easier to deploy solutions that don’t involve digging deep
under the hood to compile things :slight_smile: