Skip to main content

compiler errors cldc linux

2 replies [Last post]
Joined: 2007-05-30
Points: 0

I've been trying to compile phoneME Feature natively on Ubuntu 7.04 "Feisty"

My first attempt included using the current 1.6 JDK. I got a ton of errors (mostly deprications) so I installed the 1.4.2 JDK and pointed JDK_DIR at that.

Now I'm wondering if the problems I am experiencing have to do with the version of GCC. Feisty comes with gcc version 4.1.2.

I've built PCSL apparently without problem

Then, I build CLDC. This runs through the non Debug build completely with one warning that shows up twice:

<br />
linking ROM generator: ../../romgen/app/romgen<br />
BSDSocket.o: In function `Java_com_sun_cldc_io_j2me_socket_Protocol_open0':<br />
BSDSocket.cpp:(.text+0x48b): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<br />

Then it dies partway through building the Debug build while trying to compile OsFile.cpp. The first few errors (preceded by some of the successful output for context) are:

<br />
==============================<br />
starting DEBUG build<br />
==============================<br />
make[1]: Entering directory `/home/jseghers/workspace/phoneme_feature/build_output/cldc/linux_i386/target/debug'<br />
generating ../generated/Dependencies ...<br />
...Excluded Files excluded from listing...<br />
        writing individual include files ... done (25 files.)<br />
        writing grand include file</p>
<p>        writing dependencies file</p>
<p>make[1]: Leaving directory `/home/jseghers/workspace/phoneme_feature/build_output/cldc/linux_i386/target/debug'<br />
make[1]: Entering directory `/home/jseghers/workspace/phoneme_feature/build_output/cldc/linux_i386/target/debug'<br />
mkdir -p ../bin<br />
generating ../generated/NativesTable.cpp ...<br />
 ... FloatSupport_i386.cpp<br />
 ... HotRoutines0.cpp<br />
 ... HotRoutines1.cpp<br />
 ... JarFileUncommon.cpp<br />
 ... KniUncommon.cpp<br />
 ... OS_linux.cpp<br />
 ... OsFile.cpp<br />
/home/jseghers/workspace/phoneme_feature/cldc/src/vm/share/runtime/OsFile.cpp:42:23: error: pcsl_file.h: No such file or directory<br />
/home/jseghers/workspace/phoneme_feature/cldc/src/vm/share/runtime/OsFile.cpp:43:25: error: pcsl_memory.h: No such file or directory<br />
/home/jseghers/workspace/phoneme_feature/cldc/src/vm/share/runtime/OsFile.cpp: In function '_OsFile_Handle* OsFile_open(const JvmPathChar*, const char*)':<br />
/home/jseghers/workspace/phoneme_feature/cldc/src/vm/share/runtime/OsFile.cpp:52: error: 'pcsl_string' was not declared in this scope<br />
/home/jseghers/workspace/phoneme_feature/cldc/src/vm/share/runtime/OsFile.cpp:52: error: expected `;' before 'pcsl_filename'<br />

The set of commands that I'm running (phoneme_feature directory is located at ~/workspace/phoneme_feature, which I'm showing in the prompts below as .../):

<br />
.../$ . stenv<br />
=====stenv contains=====<br />
#!/bin/bash<br />
export MEHOME=/home/jseghers/workspace/phoneme_feature<br />
export BUILD_OUTPUT_DIR=$MEHOME/build_output<br />
export JDK_DIR=/usr/lib/j2sdk1.4-sun<br />
export PATH=$JDK_DIR/bin:$PATH<br />
===================<br />
.../$ cd pcsl<br />
.../pcsl$ . mkpcsl<br />
=====mkpcsl contains====<br />
#!/bin/bash<br />
export PCSL_PLATFORM=linux_i386_gcc<br />
make NETWORK_MODULE=bsd/generic $*<br />
===================<br />
.../pcsl$ cd ../cldc<br />
.../cldc$ . mkcldc<br />
=====mkcldc contains====<br />
#!/bin/bash<br />
export JVMWorkSpace=$MEHOME/cldc<br />
export JVMBuildSpace=$BUILD_OUTPUT_DIR/cldc<br />
make -C $JVMWorkSpace/build/linux_i386 ENABLE_PCSL=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/PCSL ENABLE_ISOLATES=true $*<br />
===================<br />

This occured both using the Zipped sources and using checked out files via subversion.

Any idea what's going on?

Do I need to have GCC 3.4.6? If so, how do I have it installed in parallel with GCC 4.1.2 that Feisty depends upon?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-05-30
Points: 0

Thank you! I'd stared at that all day... and didn't realize that I'd redefined it--with Uppercased PCSL vs pcsl.

The Getting Started guide uses an exported PCSL_OUPUT_DIR for pcsl and a make invocation version for cldc and I didn't notice the conflict.

Joined: 2006-09-25
Points: 0

Is it the case that you set PCSL_OUTPUT_DIR to different values when building PCSL and CLDC?