Skip to main content

Compiling pMEA dual stack fails (CVM_PRELOAD_LIB/javacall issues)

9 replies [Last post]
Anonymous

Hi,

I have been able to compile linux and WinCE based dual stacks for a while now
with the same build script, but since more than a week or so the build
process fails. In my build script I set the CVM_PRELOAD_LIB variable either
to "true" or "false" depending on what I want, and now with a 14503 revision
I get a build error:

... /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x86-generic/democlasses.jar
====> start building MIDP classes
/local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x86-generic/generated/build_defs.mk:9:
*** CVM_PRELOAD_LIB. Stop.

It does not matter if the variable is set to true or false. The offending line
in build_defs.mk tells us the following:

CVM_PRELOAD_LIB = $(error CVM_PRELOAD_LIB)

If I do not set the variable, the compilation continues a little bit further,
but I then get javacall compilation errors (missing headers, ...). I have
similar errors on linux/x86 and WinCE/arm.

For my linux builds, I do something like this:

export WORK_DIR=$PWD
export CC=gcc
export CXX=g++
export GCC_VERSION=-3.3
export JAVA_HOME=/opt/j2sdk1.4.2_18
export JAVA_PATH=$JAVA_HOME
export JDK_HOME=$JAVA_HOME
export CVM_JAVABIN=$JAVA_HOME/bin
export J2ME_CLASSLIB=foundation
export USE_MIDP=true
export USE_JUMP=false
export CVM_DUAL_STACK=true
export USE_SCRIPT_UTILS=true
export CVM_DEBUG=false
export ABSTRACTIONS_DIR=$PWD/abstractions
export JUMP_DIR=$PWD/jump
export MIDP_DIR=$PWD/midp
export PCSL_DIR=$PWD/pcsl
export TOOLS_DIR=$PWD/tools
export XMLPARSER_DIR=$PWD/xmlparser

cd cdc/build/linux-x86-generic
make -f GNUmakefile bin

What is the current procedure to compile a working pMEA dual stack?

Thanks,
Davy

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

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

Davy Preuveneers wrote:
>> And, to re-confirm, you are saying that the above combo of MIDP on CDC
>> w/no-JUMP and dual-stack true used to build for you, but now does not?
>>
>
> Correct.
>
> It turns out if I set the various build parameters as make arguments, I don't
> have any build problems. No CVM_PRELOAD_LIB problem, no javacall problem.
> When I "export" the variables before calling make (without any arguments),
> compilation fails.
>
> Does anybody know what the difference between the two approaches is?
>
> My build scripts worked with the last approach up to development build b91.
> With b92 I started to have problems. I guess I will just have to rewrite my
> build scripts

Glad you helped to figure that out. Dean and Chris are taking a look at
it now...

Hinkmond

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

Davy Preuveneers

On Tuesday 21 October 2008, Hinkmond Wong wrote:
> Davy Preuveneers wrote:
> >> And, to re-confirm, you are saying that the above combo of MIDP on CDC
> >> w/no-JUMP and dual-stack true used to build for you, but now does not?
> >
> > Correct.
> >
> > It turns out if I set the various build parameters as make arguments, I
> > don't have any build problems. No CVM_PRELOAD_LIB problem, no javacall
> > problem. When I "export" the variables before calling make (without any
> > arguments), compilation fails.
> >
> > Does anybody know what the difference between the two approaches is?
> >
> > My build scripts worked with the last approach up to development build
> > b91. With b92 I started to have problems. I guess I will just have to
> > rewrite my build scripts
>
> Glad you helped to figure that out. Dean and Chris are taking a look at
> it now...
>
>
>
> Hinkmond

Regarding my previous comment on putting every environment variable setting as
command line arguments after the make command:

I only need to set the CVM_PRELOAD_LIB as a make command line argument. The
USE_MIDP, USE_JUMP, CVM_DUAL_STACK, ... can still be "exported".

After some more testing, I also noticed that the javacall compilation errors
only occured when I enable JSR 172 support by exporting USE_JSR_172=true
before calling make. Setting it as a make argument does not help. If I
disable it, compilation succeeds. I don't know if this is a JSR 172 specific
issue (I think not), but it is the only optional JSR I include in my builds.

So the only thing I had to change to my Linux/x86 build script is:
-set CVM_PRELOAD_LIB as a make command line argument
-disable JSR 172 for the time being.

TODO: test this workaround for my WinCE build scripts.

Thanks for your help.

Best regards,
Davy

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

xyzzy (Dean)

Davy, as a work-around you can change that line to be

CVM_PRELOAD_LIB = $(CVM_PRELOAD_ALL)

However, I would expect the $(error) to be evaluated when
CVM_PRELOAD_LIB is actually used, not when build_defs.mk
is read. What version of gnumake are you using?

Dean

Davy Preuveneers wrote:
> Hi,
>
> I have been able to compile linux and WinCE based dual stacks for a while now
> with the same build script, but since more than a week or so the build
> process fails. In my build script I set the CVM_PRELOAD_LIB variable either
> to "true" or "false" depending on what I want, and now with a 14503 revision
> I get a build error:
>
> ... /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x86-generic/democlasses.jar
> ====> start building MIDP classes
> /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x86-generic/generated/build_defs.mk:9:
> *** CVM_PRELOAD_LIB. Stop.
>
> It does not matter if the variable is set to true or false. The offending line
> in build_defs.mk tells us the following:
>
> CVM_PRELOAD_LIB = $(error CVM_PRELOAD_LIB)
>
> If I do not set the variable, the compilation continues a little bit further,
> but I then get javacall compilation errors (missing headers, ...). I have
> similar errors on linux/x86 and WinCE/arm.
>
> For my linux builds, I do something like this:
>
> export WORK_DIR=$PWD
> export CC=gcc
> export CXX=g++
> export GCC_VERSION=-3.3
> export JAVA_HOME=/opt/j2sdk1.4.2_18
> export JAVA_PATH=$JAVA_HOME
> export JDK_HOME=$JAVA_HOME
> export CVM_JAVABIN=$JAVA_HOME/bin
> export J2ME_CLASSLIB=foundation
> export USE_MIDP=true
> export USE_JUMP=false
> export CVM_DUAL_STACK=true
> export USE_SCRIPT_UTILS=true
> export CVM_DEBUG=false
> export ABSTRACTIONS_DIR=$PWD/abstractions
> export JUMP_DIR=$PWD/jump
> export MIDP_DIR=$PWD/midp
> export PCSL_DIR=$PWD/pcsl
> export TOOLS_DIR=$PWD/tools
> export XMLPARSER_DIR=$PWD/xmlparser
>
> cd cdc/build/linux-x86-generic
> make -f GNUmakefile bin
>
> What is the current procedure to compile a working pMEA dual stack?
>
> Thanks,
> Davy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

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

Davy Preuveneers

Hi Dean,

I don't think I can change that line, because build_defs.mk is autogenerated.
Setting CVM_PRELOAD_ALL instead of CVM_PRELOAD_LIB doesn't help either,
because that variable seems to be an internal flag that cannot be set.

I am using make 3.81.

Davy

On Monday 20 October 2008, xyzzy (Dean) wrote:
> Davy, as a work-around you can change that line to be
>
> CVM_PRELOAD_LIB = $(CVM_PRELOAD_ALL)
>
> However, I would expect the $(error) to be evaluated when
> CVM_PRELOAD_LIB is actually used, not when build_defs.mk
> is read. What version of gnumake are you using?
>
> Dean
>
> Davy Preuveneers wrote:
> > Hi,
> >
> > I have been able to compile linux and WinCE based dual stacks for a while
> > now with the same build script, but since more than a week or so the
> > build process fails. In my build script I set the CVM_PRELOAD_LIB
> > variable either to "true" or "false" depending on what I want, and now
> > with a 14503 revision I get a build error:
> >
> > ...
> > /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x
> >86-generic/democlasses.jar ====> start building MIDP classes
> > /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x
> >86-generic/generated/build_defs.mk:9: *** CVM_PRELOAD_LIB. Stop.
> >
> > It does not matter if the variable is set to true or false. The offending
> > line in build_defs.mk tells us the following:
> >
> > CVM_PRELOAD_LIB = $(error CVM_PRELOAD_LIB)
> >
> > If I do not set the variable, the compilation continues a little bit
> > further, but I then get javacall compilation errors (missing headers,
> > ...). I have similar errors on linux/x86 and WinCE/arm.
> >
> > For my linux builds, I do something like this:
> >
> > export WORK_DIR=$PWD
> > export CC=gcc
> > export CXX=g++
> > export GCC_VERSION=-3.3
> > export JAVA_HOME=/opt/j2sdk1.4.2_18
> > export JAVA_PATH=$JAVA_HOME
> > export JDK_HOME=$JAVA_HOME
> > export CVM_JAVABIN=$JAVA_HOME/bin
> > export J2ME_CLASSLIB=foundation
> > export USE_MIDP=true
> > export USE_JUMP=false
> > export CVM_DUAL_STACK=true
> > export USE_SCRIPT_UTILS=true
> > export CVM_DEBUG=false
> > export ABSTRACTIONS_DIR=$PWD/abstractions
> > export JUMP_DIR=$PWD/jump
> > export MIDP_DIR=$PWD/midp
> > export PCSL_DIR=$PWD/pcsl
> > export TOOLS_DIR=$PWD/tools
> > export XMLPARSER_DIR=$PWD/xmlparser
> >
> > cd cdc/build/linux-x86-generic
> > make -f GNUmakefile bin
> >
> > What is the current procedure to compile a working pMEA dual stack?
> >
> > Thanks,
> > Davy
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> > For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net

--
Davy Preuveneers
K.U.Leuven - http://www.kuleuven.be
Department of Computer Science - http://www.cs.kuleuven.be
DistriNet - http://www.cs.kuleuven.be/~distrinet
Celestijnenlaan 200A, B-3001 Heverlee (Leuven), Belgium
Room: 02.152
Phone: (+32) (0)16 327853
E-Mail: Davy.Preuveneers@cs.kuleuven.be
Web: http://www.cs.kuleuven.be/~davy
[signature.asc]

xyzzy (Dean)

Yes, it is autogenerated in rules.mk. Try changing

$(AT) echo 'CVM_PRELOAD_LIB = $$(error CVM_PRELOAD_LIB)' >> $@

to

$(AT) echo 'CVM_PRELOAD_LIB = $(CVM_PRELOAD_ALL)' >> $@

Dean

Davy Preuveneers wrote:
> Hi Dean,
>
> I don't think I can change that line, because build_defs.mk is autogenerated.
> Setting CVM_PRELOAD_ALL instead of CVM_PRELOAD_LIB doesn't help either,
> because that variable seems to be an internal flag that cannot be set.
>
> I am using make 3.81.
>
> Davy
>
> On Monday 20 October 2008, xyzzy (Dean) wrote:
>> Davy, as a work-around you can change that line to be
>>
>> CVM_PRELOAD_LIB = $(CVM_PRELOAD_ALL)
>>
>> However, I would expect the $(error) to be evaluated when
>> CVM_PRELOAD_LIB is actually used, not when build_defs.mk
>> is read. What version of gnumake are you using?
>>
>> Dean
>>
>> Davy Preuveneers wrote:
>>> Hi,
>>>
>>> I have been able to compile linux and WinCE based dual stacks for a while
>>> now with the same build script, but since more than a week or so the
>>> build process fails. In my build script I set the CVM_PRELOAD_LIB
>>> variable either to "true" or "false" depending on what I want, and now
>>> with a 14503 revision I get a build error:
>>>
>>> ...
>>> /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x
>>> 86-generic/democlasses.jar ====> start building MIDP classes
>>> /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/linux-x
>>> 86-generic/generated/build_defs.mk:9: *** CVM_PRELOAD_LIB. Stop.
>>>
>>> It does not matter if the variable is set to true or false. The offending
>>> line in build_defs.mk tells us the following:
>>>
>>> CVM_PRELOAD_LIB = $(error CVM_PRELOAD_LIB)
>>>
>>> If I do not set the variable, the compilation continues a little bit
>>> further, but I then get javacall compilation errors (missing headers,
>>> ...). I have similar errors on linux/x86 and WinCE/arm.
>>>
>>> For my linux builds, I do something like this:
>>>
>>> export WORK_DIR=$PWD
>>> export CC=gcc
>>> export CXX=g++
>>> export GCC_VERSION=-3.3
>>> export JAVA_HOME=/opt/j2sdk1.4.2_18
>>> export JAVA_PATH=$JAVA_HOME
>>> export JDK_HOME=$JAVA_HOME
>>> export CVM_JAVABIN=$JAVA_HOME/bin
>>> export J2ME_CLASSLIB=foundation
>>> export USE_MIDP=true
>>> export USE_JUMP=false
>>> export CVM_DUAL_STACK=true
>>> export USE_SCRIPT_UTILS=true
>>> export CVM_DEBUG=false
>>> export ABSTRACTIONS_DIR=$PWD/abstractions
>>> export JUMP_DIR=$PWD/jump
>>> export MIDP_DIR=$PWD/midp
>>> export PCSL_DIR=$PWD/pcsl
>>> export TOOLS_DIR=$PWD/tools
>>> export XMLPARSER_DIR=$PWD/xmlparser
>>>
>>> cd cdc/build/linux-x86-generic
>>> make -f GNUmakefile bin
>>>
>>> What is the current procedure to compile a working pMEA dual stack?
>>>
>>> Thanks,
>>> Davy
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
>>> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
>> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
>
>

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

Davy Preuveneers

On Monday 20 October 2008, xyzzy (Dean) wrote:
> Yes, it is autogenerated in rules.mk. Try changing
>
> $(AT) echo 'CVM_PRELOAD_LIB = $$(error CVM_PRELOAD_LIB)' >> $@
>
> to
>
> $(AT) echo 'CVM_PRELOAD_LIB = $(CVM_PRELOAD_ALL)' >> $@
>
> Dean

Indeed, I found that line too after some grepping. I first commented it out
and that seemed to work. With your fix, the file is generated with
CVM_PRELOAD_LIB is set to true.

I have another related issue. When I do a "make clean", I get the following
error when CVM_PRELOAD_LIB is set:

/local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/share/defs.mk:380:
*** Do not set both CVM_PRELOAD_SET and CVM_PRELOAD_LIB. Stop.

Anyway, compilation now continues up to the point where javacall is being
compiled. javacall/implementation/share/cldc/cldc_javanotify_stubs.c is
giving compilation errors because several header files cannot be found.

.../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:32:31:
javacall_datagram.h: No such file or directory
.../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:33:29:
javacall_socket.h: No such file or directory
.../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:34:32:
javacall_lifecycle.h: No such file or directory
.../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:35:31:
javacall_keypress.h: No such file or directory
.../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:36:26:
javacall_lcd.h: No such file or directory
.../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:37:31:
javacall_penevent.h: No such file or directory

The fact that "cldc" stub files are being used, confused me a bit because
there appears to be a linux_x86_cdc backend. Perhaps it is just a missing
compiler include option, because the headers do exist in the folder
javacall/interface/midp/

Davy

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

Hinkmond Wong

Davy Preuveneers wrote:
> Indeed, I found that line too after some grepping. I first commented it out
> and that seemed to work. With your fix, the file is generated with
> CVM_PRELOAD_LIB is set to true.
>
> I have another related issue. When I do a "make clean", I get the following
> error when CVM_PRELOAD_LIB is set:
>
> /local/project/phoneme/tmp.linux_x86_generic.foundation/cdc/build/share/defs.mk:380:
> *** Do not set both CVM_PRELOAD_SET and CVM_PRELOAD_LIB. Stop.
>
> Anyway, compilation now continues up to the point where javacall is being
> compiled. javacall/implementation/share/cldc/cldc_javanotify_stubs.c is
> giving compilation errors because several header files cannot be found.
>
> .../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:32:31:
> javacall_datagram.h: No such file or directory
> .../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:33:29:
> javacall_socket.h: No such file or directory
> .../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:34:32:
> javacall_lifecycle.h: No such file or directory
> .../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:35:31:
> javacall_keypress.h: No such file or directory
> .../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:36:26:
> javacall_lcd.h: No such file or directory
> .../javacall/implementation/share/cldc/cldc_javanotify_stubs.c:37:31:
> javacall_penevent.h: No such file or directory
>
> The fact that "cldc" stub files are being used, confused me a bit because
> there appears to be a linux_x86_cdc backend. Perhaps it is just a missing
> compiler include option, because the headers do exist in the folder
> javacall/interface/midp/
>

Hi Davy,

I'm trying to figure out the minimal set of build flags that will mimic
your build failure on our systems.

Is it correct that with the above failure you are trying to build a
linux-x86-generic build flavor of pMEA?

Also, would the follow build line be at minimal the equivalent to the
stack you are trying to build?

make J2ME_CLASSLIB=foundation USE_MIDP=true USE_JUMP=false
CVM_DUAL_STACK=true

And, to re-confirm, you are saying that the above combo of MIDP on CDC
w/no-JUMP and dual-stack true used to build for you, but now does not?

Thanks,

Hinkmond

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

Davy Preuveneers

Hi Hinkmond,

On Tuesday 21 October 2008, Hinkmond Wong wrote:
>
> Hi Davy,
>
> I'm trying to figure out the minimal set of build flags that will mimic
> your build failure on our systems.

I more or less figured out what is causing the problem, but I do not know why.
See more on this below.

> Is it correct that with the above failure you are trying to build a
> linux-x86-generic build flavor of pMEA?

Correct

> Also, would the follow build line be at minimal the equivalent to the
> stack you are trying to build?
>
> make J2ME_CLASSLIB=foundation USE_MIDP=true USE_JUMP=false
> CVM_DUAL_STACK=true

I set the CVM_PRELOAD_LIB parameter too.

> And, to re-confirm, you are saying that the above combo of MIDP on CDC
> w/no-JUMP and dual-stack true used to build for you, but now does not?

Correct.

It turns out if I set the various build parameters as make arguments, I don't
have any build problems. No CVM_PRELOAD_LIB problem, no javacall problem.
When I "export" the variables before calling make (without any arguments),
compilation fails.

Does anybody know what the difference between the two approaches is?

My build scripts worked with the last approach up to development build b91.
With b92 I started to have problems. I guess I will just have to rewrite my
build scripts.

Regards,
Davy

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

xyzzy (Dean)

The difference is a command-line setting will override any
other setting. So the setting for CVM_PRELOAD_LIB in
build_defs.mk will be ignored. Now that we know how to
reproduce your scenario, we'll have to see if we can still
support it.

Dean

Davy Preuveneers wrote:
> Hi Hinkmond,
>
> On Tuesday 21 October 2008, Hinkmond Wong wrote:
>> Hi Davy,
>>
>> I'm trying to figure out the minimal set of build flags that will mimic
>> your build failure on our systems.
>
> I more or less figured out what is causing the problem, but I do not know why.
> See more on this below.
>
>> Is it correct that with the above failure you are trying to build a
>> linux-x86-generic build flavor of pMEA?
>
> Correct
>
>> Also, would the follow build line be at minimal the equivalent to the
>> stack you are trying to build?
>>
>> make J2ME_CLASSLIB=foundation USE_MIDP=true USE_JUMP=false
>> CVM_DUAL_STACK=true
>
> I set the CVM_PRELOAD_LIB parameter too.
>
>> And, to re-confirm, you are saying that the above combo of MIDP on CDC
>> w/no-JUMP and dual-stack true used to build for you, but now does not?
>
> Correct.
>
> It turns out if I set the various build parameters as make arguments, I don't
> have any build problems. No CVM_PRELOAD_LIB problem, no javacall problem.
> When I "export" the variables before calling make (without any arguments),
> compilation fails.
>
> Does anybody know what the difference between the two approaches is?
>
> My build scripts worked with the last approach up to development build b91.
> With b92 I started to have problems. I guess I will just have to rewrite my
> build scripts.
>
>
> Regards,
> Davy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

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