Skip to main content

compiling on windows?

11 replies [Last post]
myhouwei
Offline
Joined: 2007-01-31

hi
I managed to get the source to compile on windows OS. when I was compiling, I got a error. It displayed:

D:\phoneME_feature\cldc\build\win32_i386>make debug
=========================================================
JVMWorkSpace must be set. See build documentation
Note: forward slash / must be used on Win32 and
no slash allowed at the end
=========================================================
exit: Illegal number: -1
make: *** [sanity] Error 2

but I have already set the JVMWorkSpace Environment Variables.
set JVMWorkSpace=D:/phoneME_feature/cldc
In my os, the source code is in D:/phoneME_feature/cldc/src, and the build file is in D:/phoneME_feature/cldc/bulid

I have tried to set JVMWorkSpace=D:/phoneME_feature/cldc/src or
set JVMWorkSpace=D:\phoneME_feature\cldc\src.
but it seems to have no effect.

Message was edited by: myhouwei

Message was edited by: myhouwei

Message was edited by: myhouwei

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yevgenydiomidov
Offline
Joined: 2006-08-07

Hi Jonathan,

You are right cyg4me does not require mounting directories. I think it is a key feature of cyg4me - do not make the users to execute extra actions (like mount) to build phoneME Feature.

Thanks,
Yevgeny

jonathan
Offline
Joined: 2003-06-12

It is possible to build on Windows using Windows batch files. I think it's more convenient and reliable to build on Windows using shell scripts via Cyg4Me, but I'm still learning about this too.

Here is a script that I use to run the CLDC build:

-----
export Acme=d:/jwc
export Scripts=`pwd`
export Output=$Acme/output
export Log=$Acme/log.txt
rm -f $Log

cd $Acme/cldc/build/javacall_i386_vc
make \
JDK_DIR=d:/j2sdk1.4.2_13 \
JVMWorkSpace=$Acme/cldc \
JVMBuildSpace=$Output/cldc \
ENABLE_PCSL=true \
PCSL_OUTPUT_DIR=$Output/pcsl \
JAVACALL_OUTPUT_DIR=$Output/javacall \
$1

if [ $? -ne 0 ]; then
echo "cldc_status=failed" >> $Log
else
echo "cldc_status=OK" >> $Log
fi

cat $Log
cd $Scripts
-----

Of course, you'll have to adjust the assignment of Acme in the beginning to match your system.

I run it from the Windows command line like this:

D:\pm-f\scripts>sh build-cldc.sh

I hope this is helpful.

Jonathan

aka1278
Offline
Joined: 2006-10-18

Hi again,

Your script looks fine except one shade.

Namely, as I mentioned in the previous message, please avoid Windows-style paths in phoneME features build variables, in your case they are JVMWorkSpace, JVMBuildSpace, PCSL_OUTPUT_DIR, JAVACALL_OUTPUT_DIR.

So, please change defining 'Acme' (now it's 'd:/jwc') to '/jwc' (use 'mount' command if neccessary).

WBR, Alexey.

jonathan
Offline
Joined: 2003-06-12

Hi Alexey,

Can you tell me more about this? The build runs fine for me so mounting the directory via Cyg4Me seems like an unnecessary step.

Thanks,
Jonathan

myhouwei
Offline
Joined: 2007-01-31

hi,Jonathan
I compiled as you telled me , but it has two errors. I have list the compiling result in front. I have changed the assignment to match my system. I don't know what is wrong.
Thanks

jonathan
Offline
Joined: 2003-06-12

Does Cyg4Me appear before everything else in your PATH?

What version of Visual C++ or Visual Studio are you using?

myhouwei
Offline
Joined: 2007-01-31

yes,PATH=d:\cyg4me\bin;D:\Microsoft Visual Studio\Common\Tools\WinNT;D:\Microsoft Visual Studio\Common\MSDev98\Bin;D:\Microsoft Visual Studio\Common\Tools;
Visual C++ 6.0 SP5

It's strange. When I was compiling javacall_i386_vc, it has erros.But compiling win32_i386, it is OK.

aka1278
Offline
Joined: 2006-10-18

Hi,

PhoneME feature build system is common for both Linux and Windows therefore it requires Unix-style paths.
To use Unix paths on Windows, you could utilize 'mount' command.

Please try the following:
mount D:\phoneME_feature /phoneME_feature
set JVMWorkSpace=/phoneME_feature/cldc

WBR, Alexey.

myhouwei
Offline
Joined: 2007-01-31

Think you for my question.
follow your advice:
********************
mount D:\phoneME_feature /phoneME_feature
set JVMWorkSpace=/phoneME_feature/cldc
******************
but when I use "mount" command in WINDOWS CMD.EXE,it displayed "mount: warning - /phoneME_feature does not exist."
I want to know whether I should ues mount in cyg4me bash,and whether I should set other environment variables in bash?

aka1278
Offline
Joined: 2006-10-18

Hi Myhouwei,

The issue is: Windows 'mount' command that you call doesn't treat Unix-style paths.
You are right, to invoke correct version of 'mount' command, you could call 'mount' inside cyg4me bash.

For additional variables to be set, please refer to the Jonathan's message in this forum thread (http://forums.java.net/jive/thread.jspa?threadID=22337&messageID=200732#...).
Also please don't forget to change that script according to my suggestions (http://forums.java.net/jive/thread.jspa?threadID=22337&messageID=201109#...).

WBR, Alexey.

myhouwei
Offline
Joined: 2007-01-31

Thank you for you help. When I was campiling, I got two errors. I don't kwon where I make mistakes.
******************************************************************
bash-2.05b$ cd /phoneME_feature/cldc/build/win32_i386
bash-2.05b$ make debug
==================================
JVMBuildSpace = /phoneME_feature/cldc/OUT/CLDC
JVMWorkSpace = /phoneME_feature/cldc
ROMIZING = true
SHELL = d:/cyg4me/bin/sh.exe
ENABLE_ISOLATES = true
ENABLE_MONET = true
==================================
created /phoneME_feature/cldc/OUT/CLDC/win32_i386/tools/Makefile
==============================
creating build tools...
==============================
make.exe[1]: Entering directory `d:/phoneME_feature/cldc/OUT/CLDC/win32_i386/too
ls'
Note: Some input files use or override a deprecated API.
Note: Recompile with -deprecation for details.
created jcc.jar
created buildtool.jar
make.exe[1]: Leaving directory `d:/phoneME_feature/cldc/OUT/CLDC/win32_i386/tool
s'
done
Finding .java files ...
FIND: 无效命令行开关
done
created /phoneME_feature/cldc/OUT/CLDC/win32_i386/loopgen/app/Makefile
==============================
creating ASM loop generator in debug mode
build flags: NO_DEBUG_SYMBOLS=true
==============================
make.exe[1]:
make.exe[1]: Entering directory `d:/phoneME_feature/cldc/OUT/CLDC/win32_i386/loo
pgen/app'
generating ../generated/Dependencies ...
reading database: /phoneME_feature/cldc/src/vm/includeDB
writing individual include files ... done (218 files.)
writing grand include file

writing dependencies file

make.exe[1]:
make.exe[1]: Leaving directory `d:/phoneME_feature/cldc/OUT/CLDC/win32_i386/loop
gen/app'
make.exe[1]: Entering directory `d:/phoneME_feature/cldc/OUT/CLDC/win32_i386/loo
pgen/app'
mkdir -p ../bin
mkdir -p ../../dist/bin
mkdir -p ../../dist/lib
mkdir -p ../../dist/include
==============================
compiling cldc1.1 classes (0 files)...
make.exe[1]: *** [/phoneME_feature/cldc/OUT/CLDC/classes.zip] Error 1
make.exe[1]: Leaving directory `d:/phoneME_feature/cldc/OUT/CLDC/win32_i386/loop
gen/app'
d:\cyg4me\bin\make.exe: *** [ _loopgen] Error 2
bash-2.05b$
**************************************************************