Skip to main content

errors during cldc build for linux_arm

7 replies [Last post]
sandykhan
Offline
Joined: 2008-01-15
Points: 0

Hi,
i'm building cldc in debug/release mode for linux_arm target platform. the build stops unexpectedly when BufferedFile.hpp and the following error messages are displayed at the end:

/home/user/mr2src/cldc/src/vm/share/runtime/BufferedFile.hpp:127:14: error: macro "index" requires 2 arguments, but only 1 given
/home/user/mr2src/cldc/src/vm/share/runtime/BufferedFile.hpp:152:42: error: macro "index" requires 2 arguments, but only 1 given
/home/user/mr2src/cldc/src/vm/share/runtime/BufferedFile.hpp:127: error: invalid member function declaration
/home/user/mr2src/cldc/src/vm/share/runtime/BufferedFile.hpp: In member function 'jint JVMBufferedFile::last_unread_file_pos()':
/home/user/mr2src/cldc/src/vm/share/runtime/BufferedFile.hpp:152: error: 'index' was not declared in this scope
make[1]: *** [FloatSupport_arm.o] Error 1
make[1]: Leaving directory `/home/user/mr2build/cldc/arm/linux_arm/target/debug'
make: *** [_debug] Error 2

thanks in advance.

Message was edited by: sandykhan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
danila
Offline
Joined: 2006-09-25
Points: 0

Hi,
this means index() macro is defined somewhere by your toolchain and it conflicts with
the index() method in phoneME Feature VM source.

As a simplest workaround, you can rename index() method in the sources to some other name and try to rebuild.

sandykhan
Offline
Joined: 2008-01-15
Points: 0

hi danila,
i thought this problem is being caused by floating point, so i set ENABLE_FLOAT=false. but now, some other type of errors are appearing. if i set ENABLE_SOFT_ FLOAT=false, the problem remains the same. the following is the description of the errors, plz help me how to resolve this.

linking ASM loop generator: ../../loopgen/app/loopgen
NativesTable.o:(.rodata+0x5e8): undefined reference to `Java_java_lang_Double_doubleToLongBits'
NativesTable.o:(.rodata+0x5f4): undefined reference to `Java_java_lang_Double_longBitsToDouble'
NativesTable.o:(.rodata+0x628): undefined reference to `Java_java_lang_Float_floatToIntBits'
NativesTable.o:(.rodata+0x634): undefined reference to `Java_java_lang_Float_intBitsToFloat'
collect2: ld returned 1 exit status
make[1]: *** [../../loopgen/app/loopgen] Error 1
make[1]: Leaving directory `/home/user/mr2build/cldc/arm/linux_arm/loopgen/app'
make: *** [_loopgen] Error 2

danila
Offline
Joined: 2006-09-25
Points: 0

These references are undefined because you set ENABLE_FLOAT to false,
and thus disabled support for floating point bytecodes and Java APIs,
but CLDC 1.1 specification includes methods that cannot be implemented
without floating point support.

If you really need to disable floating point support, you should switch to CLDC 1.0.
This is done by building phoneME Feature VM with ENABLE_CLDC_11=false.

Yet I don't think upper stack supports CLDC 1.0. I suppose it requires CLDC 1.1.

If you don't need to disable floating point support, you should set ENABLE_FLOAT back to
true. If your build fails with ENABLE_FLOAT=true, please post the tail of build log output here.

sandykhan
Offline
Joined: 2008-01-15
Points: 0

i have already posted the output. it's at the top, and it was build with ENABLE_FLOAT=true.

danila
Offline
Joined: 2006-09-25
Points: 0

did you try my suggestion to rename index() method?

sandykhan
Offline
Joined: 2008-01-15
Points: 0

yes, i tried it and renamed index() to indx(). but, all the errors regarding index() were now occuring with indx().

danila
Offline
Joined: 2006-09-25
Points: 0

Try to add the following line to the beginning of BufferedFile.hpp and rebuild:
#undef index