Skip to main content

midp compilation blues

6 replies [Last post]
asquassabia
Offline
Joined: 2006-10-13
Points: 0

folks:

phoneME open source is a great idea, thanks!

I've compiled successfully pcsl and cldc. midp is giving me a heartburn. On windows XP, set up per build instructions, with Visual Studio 2005 I do the following:
>cd build\win32
>make all
[make starts with the 'display' target]
make[1]: Entering directory `C:/<...>/midp/build/win32'
... searching updated .java files
... generating configuration files
... romizing skin
C:\<...> \midp\src\highlevelui\lcdlf\lfjava\resource\skin\screen.image_wash.png
[...]
C:\<...> \midp\src\highlevelui\lcdlf\lfjava\resource\skin\imageitem.image_btn8.png
... extracting classes from jar archives
... compiling 13 .java files and 7 generated .java files

[and at this point I get a cascade of errors like this:]

/<...>/derived/generated/classes/com/sun/midp/events/EventQueue.java:28: package com.sun.midp.main does not exist
import com.sun.midp.main.*;
[...]
/<...>/derived/generated/classes/com/sun/midp/events/EventQueue.java:83: cannot resolve symbol
symbol : class Event
location: class com.sun.midp.events.EventQueue
Event nextEvent;

It seems that the .class files for the midp subsystems are never built. make -p does not seem to list a target that buids those files, either. The unzipped source bundle and the svn-retrieved (svn checkout https://phoneme.dev.java.net/svn/phoneme/components/midp/trunk ) are identical. Is there an easy way to build the .class files for all the midp subsystems, so that the classpath for javac when
... compiling 13 .java files and 7 generated .java files
as above is a bit less empty than I can get now? Any help greatly appreciated, I've already used a lot of lamp oil trying to get on top of this!

Cheers,

Alberto.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sergio_n
Offline
Joined: 2006-10-16
Points: 0

Alberto,

whether suggested solutions were enough? If it was helpful what was the reason of build crash?

Thanks.
Sergey

asquassabia
Offline
Joined: 2006-10-13
Points: 0

Sergey:

thanks for all the attention. The problem was elsewhere :)

It is not possible to build midp if the buid directory (i.e. the directory where the derived objects are created for pcsl, cldc and midp) is the same for all three. In my case, if the directories are distinct for each product, the initial problem is solved. duh.

Now my build crashes for another reason, as one of the created executables with Visual Studio 2005 tries to load one of the *80.dll incorrectly. This must be some new behavior that is different btw. M$ C++ 6 and M$ C++ 8 (aka 2005).

The offending exe is
C:/.../cldc/win32_i386/dist/bin/romgen.exe

Ouch, this is going to be a tough nut to crack for me, I'm not very familiar with M$ compilers. It appears from some preliminary investigation that the "maifest" is missing, whatever that is. grrr.

Cheers,

Alberto.

sergio_n
Offline
Joined: 2006-10-16
Points: 0

Hi, Alberto!

Could you proceed the following instruction:
1) clean MIDP buildspace
2) execute 'make all'
3) grep the output for the following lines:
JDK_DIR
MIDP_DIR
CLDC_DIST_DIR
PCSL_OUTPUT_DIR
MIDP_OUTPUT_DIR
4) post the reslt here

asquassabia
Offline
Joined: 2006-10-13
Points: 0

Sergio:

thanks so much for picking up my question! Here is exactly what you requested, after make clean:

C:\home\alsq\openj2me\phoneME\midp\build\win32>make all > foobar.txt 2>&1

C:\home\alsq\openj2me\phoneME\midp\build\win32>grep JDK_DIR foobar.txt
JDK_DIR = C:/opt/java/jdk1.4.2_13 (v1.4.2_13)

C:\home\alsq\openj2me\phoneME\midp\build\win32>grep MIDP_DIR foobar.txt
MIDP_DIR = C:/home/alsq/openj2me/phoneME/midp
PROJECT_MIDP_DIR = C:/home/alsq/openj2me/phoneME/midp

C:\home\alsq\openj2me\phoneME\midp\build\win32>grep CLDC_DIST_DIR foobar.txt
CLDC_DIST_DIR = C:/home/alsq/openj2me/phoneME/derived/win32_i386/dist

C:\home\alsq\openj2me\phoneME\midp\build\win32>grep PCSL_OUTPUT_DIR foobar.txt
PCSL_OUTPUT_DIR = /home/alsq/openj2me/phoneME/derived

C:\home\alsq\openj2me\phoneME\midp\build\win32>grep MIDP_OUTPUT_DIR foobar.txt
MIDP_OUTPUT_DIR = /home/alsq/openj2me/phoneME/derived

by way of overzealously volunteering additional information, in case it may be helpful:

C:\home\alsq\openj2me\phoneME\midp\build\win32>make display

========================
MIDP Build Configuration
========================

USE_NATIVE_AMS = false
USE_RAW_AMS_IMAGES = false
USE_RESTRICTED_CRYPTO = false
USE_SSL = false
USE_BINARY_CRYPTO = false
USE_FIXED = false
USE_CLDC_11 = true
USE_MONET = false
USE_STATIC_PROPERTIES = true
USE_GCC = false
USE_I3_TEST = false
USE_IMAGE_CACHE = true
USE_JAVA_DEBUGGER = false
USE_JAVA_PROFILER = false
USE_MIDP_MALLOC = true
USE_MULTIPLE_ISOLATES = false
USE_DEBUG = false
USE_CLDC_RELEASE = false
USE_NATIVE_PROFILER = false
USE_NETWORK_INDICATOR = true
USE_NUTS_FRAMEWORK = false
USE_RMS_TREE_INDEX = false
USE_JSR_177 = false
USE_JSR_75 = false
USE_JSR_82 = false
USE_JSR_120 = false
USE_JSR_172 = false
USE_JSR_226 = false
USE_PISCES = false
USE_JSR_179 = false
USE_JSR_180 = false
USE_JSR_184 = false
USE_JSR_205 = false
USE_JSR_211 = false
USE_JSR_229 = false
USE_JSR_230 = false
USE_JSR_234 = false
USE_JSR_135 = false
USE_JSR_238 = false
USE_VERBOSE_MAKE = false
USE_JPEG = false
USE_NATIVE_PTI = false
USE_VERIFY_ONCE = false

CFLAGS = -nologo -DWIN32 -D_WINDOWS -Ox -GB -Os -Gy -GF -MD -DENABLE_CDC=0 -DENABLE_MIDP_MALLOC=1 -DENABLE_IMAGE_CACHE=1 -DENABLE_I3_TEST=0 -DENABLE_NUTS_FRAMEWORK=0 -DENABLE_NETWORK_INDICATOR=1 -DENABLE_MULTIPLE_ISOLATES=0 -DENABLE_JAVA_DEBUGGER=0 -DENABLE_NATIVE_AMS=0 -DENABLE_NATIVE_PTI=0 -DENABLE_MESSAGE_STRINGS=0 -DENABLE_CLDC_11=1 -DENABLE_MONET=0 -DENABLE_SERVER_SOCKET=1 -DENABLE_JPEG=0 -DPROJECT_NAME='phoneME Feature project' -DPRODUCT -DENABLE_DEBUG=0 -DRELEASE='alsq:11.28.06-23:50' -DIMPL_VERSION='' -DFULL_VERSION='alsq:11.28.06-23:50' -DROMIZING -DWIN32 -D_WINDOWS -DPRODUCT /Zm200 /W3 /nologo -DHARDWARE_LITTLE_ENDIAN=1 -DHOST_LITTLE_ENDIAN=1 /D ROMIZING -DJVM_RELEASE_VERSION='MR1' -DJVM_BUILD_VERSION='internal' -DJVM_NAME='phoneME Feature VM' /MD
/Ox /GB /Os /Gy /GF -DREQUIRES_JVMCONFIG_H=1 -IC:/home/alsq/openj2me/phoneME/midp/src/protocol/gcf/include -IC:/home/alsq/openj2me/phoneME/midp/src/protocol/socket/include

CPPFLAGS = -DWIN32 -D_WINDOWS -DPRODUCT /Zm200 /W3 /nologo -DHARDWARE_LITTLE_ENDIAN=1 -DHOST_LITTLE_ENDIAN=1 /D ROMIZING -DJVM_RELEASE_VERSION='MR1' -DJVM_BUILD_VERSION='internal' -DJVM_NAME='phoneME Feature VM' /MD /Ox /GB /Os /Gy /GF -DREQUIRES_JVMCONFIG_H=1 -nologo -DWIN32 -D_WINDOWS -Ox -GB -Os -Gy -GF -MD -DENABLE_CDC=0 -DENABLE_MIDP_MALLOC=1 -DENABLE_IMAGE_CACHE=1 -DENABLE_I3_TEST=0 -DENABLE_NUTS_FRAMEWORK=0 -DENABLE_NETWORK_INDICATOR=1 -DENABLE_MULTIPLE_ISOLATES=0 -DENABLE_JAVA_DEBUGGER=0 -DENABLE_NATIVE_AMS=0 -DENABLE_NATIVE_PTI=0 -DENABLE_MESSAGE_STRINGS=0 -DENABLE_CLDC_11=1 -DENABLE_MONET=0 -DENABLE_SERVER_SOCKET=1 -DENABLE_JPEG=0 -DPROJECT_NAME='phoneME Feature project' -DPRODUCT -DENABLE_DEBUG=0 -DRELEASE='alsq:11.28.06-23:50' -DIMPL_VERSION='' -DFULL_VERSION='alsq:11.28.06-23:50' -DROMIZING -DWIN32 -D_WINDOWS -DPRODUCT /Zm200 /W3 /nologo -DHARDWARE_LITTLE_ENDIAN=1 -DHOST_LITTLE_ENDIAN=1 /D ROMIZING -DJVM_RELEASE_VERSION='MR1' -DJVM_BUILD_VERSION='internal' -DJVM_NAME='phoneME Feature VM' /MD /Ox /GB /Os /
Gy /GF -DREQUIRES_JVMCONFIG_H=1 -IC:/home/alsq/openj2me/phoneME/midp/src/protocol/gcf/include -IC:/home/alsq/openj2me/phoneME/midp/src/protocol/socket/include

LD_FLAGS = -nologo -subsystem:console -machine:i386 -MAP -incremental:no -verbose:LIB -nodefaultlib:libc.lib -merge:CODESEGMENT=.text -merge: DATASEGMENT=.data -opt:REF -opt:ICF,8 -nodefaultlib:msvcrtd.lib msvcrt.lib -libpath:/home/alsq/openj2me/phoneME/derived/win32_i386/lib /MAP /incremental:no /nologo /subsystem:console /machine:i386 /merge:CODESEGMENT=.text /merge: DATASEGMENT=
.data /opt:REF /opt:ICF,8 wsock32.lib

JDK_DIR = C:/opt/java/jdk1.4.2_13 (v1.4.2_13)
MIDP_DIR = C:/home/alsq/openj2me/phoneME/midp
PROJECT_MIDP_DIR = C:/home/alsq/openj2me/phoneME/midp
CLDC_DIST_DIR = C:/home/alsq/openj2me/phoneME/derived/win32_i386/dist
JSR_75_DIR =
PROJECT_JSR_75_DIR =
JSR_82_DIR =
PROJECT_JSR_82_DIR =
JSR_120_DIR =
PROJECT_JSR_120_DIR =
JSR_172_DIR =
PROJECT_JSR_172_DIR =
JSR_226_DIR =
PISCES_DIR =
JSR_177_DIR =
PROJECT_JSR_177_DIR =
JSR_179_DIR =
JSR_180_DIR =
JSR_184_DIR =
JSR_205_DIR =
PROJECT_JSR_205_DIR =
JSR_211_DIR =
JSR_229_DIR =
JSR_230_DIR =
JSR_234_DIR =
JSR_238_DIR =
JC_DIR =
RESTRICTED_CRYPTO_DIR =
CRYPTO_OUTPUT_DIR = C:/home/alsq/openj2me/phoneME/midp/build/win32/crypto_output
JPEG_DIR =
PCSL_OUTPUT_DIR = /home/alsq/openj2me/phoneME/derived
MIDP_OUTPUT_DIR = /home/alsq/openj2me/phoneME/derived

=======================================
MIDP Subsystem and Module Configuration
=======================================

SUBSYSTEMS = configuration properties_port ams jams core i18n highlevelui lowlevelui graphics_api rms security gcf
file http serial socket socket_notify ssocket udp push events tool automation media
SUBSYSTEM_AMS_MODULES = jams
SUBSYSTEM_AMS_MODULES = jams
SUBSYSTEM_EVENTS_MODULES = master_mode
SUBSYSTEM_PUSH_MODULES =
SUBSYSTEM_I18N_MODULES = common
SUBSYSTEM_LCDUI_MODULES = chameleon
SUBSYSTEM_GRAPHICS_MODULES = putpixel
SUBSYSTEM_MMAPI_MODULES =
SUBSYSTEM_PTI_MODULES = javapti
SUBSYSTEM_PROTOCOL_MODULES = ssocket
SUBSYSTEM_RMS_MODULES = common linear_index
SUBSYSTEM_SECURITY_MODULES = crypto file_digest internal_api_protection midp_permissions reference_permission_dialog pki publickey
store secure_random
SUBSYSTEM_TOOL_MODULES = keytool jadtool configurator imageutil skinromization

With much gratitude.

Cheers,

Alberto

aka1278
Offline
Joined: 2006-10-18
Points: 0

Hi Alberto!

I would suggest to perform the following actions:
1) Please call vsvars32.bat for your VC to set up VC paths.
2) Cygwin is mandatory to build phoneME on win32.
Could you check the version of Cygwin that you use?
3) Please avoid windows-style in phoneME path variables:
For instance, you could do 'mount C:/home/alsq/openj2me/phoneME /phoneME'
then use 'MIDP_DIR = /phoneME/midp' instead of 'MIDP_DIR = C:/home/alsq/openj2me/phoneME/midp'.
Note, it's correct to use windows-style in common environment variables like JDK_DIR.
4) Please specify Cygwin path after VC paths, i.e. 'set PATH=%PATH%;%CYGWINPATH%'

Please let me now if it makes sense to you.

WBR, Alexey.

aap031
Offline
Joined: 2006-10-18
Points: 0

Hi!

I believe you shall have MIDP_DIR set the way that VC compiler can access it as well. I.e. for your case it is 'mount C:/home/alsq/openj2me/phoneME /home/alsq/openj2me/phoneME'. (And respectively 'MIDP_DIR = /home/alsq/openj2me/phoneME/midp') Otherwise the build will fail when cygwin's make will provide mountpoint-relative path to cl.exe

Regards,
Andrey