Skip to main content

Re[2]: compilation error svn commit r7759

6 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Oleg.Pliss@Sun.COM

Davy,

> On Tuesday 30 October 2007, Hinkmond Wong wrote:
>> Oleg.Pliss@Sun.COM wrote:
>> > Hikmond,
>> >
>> >> Hi Oleg, do you know if your changes in rev. 7759 are supposed to also
>> >> build with cVC4 and VS2005?
>> >
>> > Yes, they should. I forgot to add a few new files to svn. Please see
>> > rev 7760.
>>
>> Thanks, Oleg!
>>
>>
>> Davy, please let us know if you still see the compilation error with the
>> latest changes in the repository.
>>
>>
>> Thanks,
>>
>> Hinkmond

> Hi Hinkmond and Oleg,

> With the latest changes I am having compilation issues with pMEA and VS2005.
> I get a weird linking issue when I compile Personal Profile.

> Linking ../../build/win32-arm-wm5/./obj/libromjava.a
> LINK.EXE -lib /nologo
> /out:../../build/win32-arm-wm5/./obj/libromjava.a
> ../../build/win32-arm-wm5/./obj/romjavaAux.o
> ../../build/win32-arm-wm5/./obj/romjava0.o
> ../../build/win32-arm-wm5/./obj/romjava1.o
> ../../build/win32-arm-wm5/./obj/romjava2.o
> ../../build/win32-arm-wm5/./obj/romjava0.o : fatal error LNK1112: module
> machine type 'ARM' conflicts with target machine type 'X86'

> I have tracked down the issue to a commit somewhere between revisions 7760 and
> 7765. If I undo the following change in
> cdc/build/win32-arm-wm5/GNUmakefile
> everything compiles again (the "PCSL_TARGET = javacall_arm" thingy).

> Index: build/win32-arm-wm5/GNUmakefile
> ===================================================================
> --- build/win32-arm-wm5/GNUmakefile (revision 7760)
> +++ build/win32-arm-wm5/GNUmakefile (revision 7765)
> @@ -48,5 +48,6 @@
> CVM_JIT ?= true

> WIN32_PLATFORM = wince
> +PCSL_TARGET = javacall_arm

> Note that I do not include the MIDP stack when building the foundation or
> personal profiles. So I assume I do not need the javacall support. However,
> it is not clear to me how this javacall_arm line triggers a linking error.
> If I leave out the PCSL_TARGET line, everything compiles just fine.

> Now let's continue with pMEF to answer . I have tried to compile pMEF using a
> recent svn checkout (revision 7781) and I still get the same compilation
> problem:

> generating ../generated/NativesTable.cpp ...
> Generating _build_pch_visCPP.obj ...
> _build_pch_visCPP.cpp
> .../BinaryAssembler_arm.hpp(346) : error C2061: syntax error :
> identifier 'JVMLiteralPoolElement'
> .../BinaryAssembler_arm.hpp(349) : error C2061: syntax error :
> identifier 'JVMLiteralPoolElement'
> .../BinaryAssembler_arm.hpp(422) : error C2061: syntax error :
> identifier 'JVMLiteralPoolElement'
> .../BinaryAssembler_arm.hpp(423) : error C2061: syntax error :
> identifier 'JVMLiteralPoolElement'
> .../BinaryAssembler_arm.hpp(424) : error C2061: syntax error :
> identifier 'JVMLiteralPoolElement'
> .../BinaryAssembler_arm.hpp(456) : error C2653: 'JVMLiteralPoolElement' : is
> not a class or namespace name
> .../BinaryAssembler_arm.hpp(456) : error C2146: syntax error : missing ';'
> before identifier '_first_literal'
> .../BinaryAssembler_arm.hpp(456) : error C4430: missing type specifier - int
> assumed. Note: C++ does not support default-int
> .../BinaryAssembler_arm.hpp(456) : error C4430: missing type specifier - int
> assumed. Note: C++ does not support default-int
> .../BinaryAssembler_arm.hpp(457) : error C2653: 'JVMLiteralPoolElement' : is
> not a class or namespace name
> .../BinaryAssembler_arm.hpp(457) : error C2146: syntax error : missing ';'
> before identifier '_first_unbound_literal'
> .../BinaryAssembler_arm.hpp(457) : error C4430: missing type specifier - int
> assumed. Note: C++ does not support default-int
> .../BinaryAssembler_arm.hpp(457) : error C4430: missing type specifier - int
> assumed. Note: C++ does not support default-int
> .../BinaryAssembler_arm.hpp(458) : error C2653: 'JVMLiteralPoolElement' : is
> not a class or namespace name
> .../BinaryAssembler_arm.hpp(458) : error C2146: syntax error : missing ';'
> before identifier '_last_literal'
> .../BinaryAssembler_arm.hpp(458) : error C4430: missing type specifier - int
> assumed. Note: C++ does not support default-int
> .../BinaryAssembler_arm.hpp(458) : error C4430: missing type specifier - int
> assumed. Note: C++ does not support default-int
> .../BinaryAssembler_arm.hpp(347) : error C2065: 'lpe' : undeclared identifier
> .../BinaryAssembler_arm.hpp(347) : error C2065: 'cond' : undeclared identifier

1. Please verify that you have following files in
src/vm/share/compiler: LiteralPoolElement.hpp, LiteralPoolElement.cpp,
BinaryLabel.hpp, BinaryLabel.cpp.

2. Please verify that your src/vm/includeDB contains line:
BinaryAssembler_.hpp LiteralPoolElement.hpp

3. If you have all those files and changes, please do a clean build.

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: feature-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: feature-help@phoneme.dev.java.net

davyp
Offline
Joined: 2007-01-03
Points: 0

> 1. Please verify that you have following files in
> src/vm/share/compiler: LiteralPoolElement.hpp, LiteralPoolElement.cpp,
> BinaryLabel.hpp, BinaryLabel.cpp.

Checked and OK

> 2. Please verify that your src/vm/includeDB contains line:
> BinaryAssembler_.hpp LiteralPoolElement.hpp

Checked and OK

> 3. If you have all those files and changes, please do a clean build.

I still have the build error (I always do a clean build). The easiest way
to reproduce it is to compile CLDC with either eVC4 or VS2005.

Davy

pavelp
Offline
Joined: 2006-09-29
Points: 0

Hi davyp,

Please try to compile the following code with your VS:

#define ARM 1

#define USE_LITERAL_POOL defined(ARM)

#if !USE_LITERAL_POOL
#error "!USE_LITERAL_POOL"
#endif

Is it compiled with the error "!USE_LITERAL_POOL"?

Thanks,
Pavel

davyp
Offline
Joined: 2007-01-03
Points: 0

Hi pavelp,

Yes, with eVC 4 I get:

Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
Copyright (C) Microsoft Corp 1984-2002. All rights reserved.

test.c
c:\temp\test.c(6) : fatal error C1189: #error : "!USE_LITERAL_POOL"

With VS2005 I get:

Microsoft (R) C/C++ Optimizing Compiler Version 14.00.50725 for ARM
Copyright (C) Microsoft Corporation. All rights reserved.

test.c
c:\temp\test.c(6) : fatal error C1189: #error : "!USE_LITERAL_POOL"

Best regards,
Davy

pavelp
Offline
Joined: 2006-09-29
Points: 0

Hi Davy,

The workaround for the MS VS preprocessor bug should have been committed to the source trunk. Can you please try the latest source base.

Regards,
Pavel

davyp
Offline
Joined: 2007-01-03
Points: 0

Compiles and works like a charm.

Thanks,
Davy