IOS builds puzzle

37 views
Skip to first unread message

Dave Dyer

unread,
Apr 25, 2017, 6:47:23 PM4/25/17
to CodenameOne Discussions

As you may have noted, I'm studying the ios / parpavm build process, and I've discovered this odd
discrepancy between what is produced by your build servers and what is in the public codenameone
repository.

CN1ES2compat.h in the repository contains

#define NO_USE_ES2 1

Whereas the build sources I made today contain

#define USE_ES2 1

According to the repo, this change was made years ago. 

There are a couple other discrepancies whose impact I haven't determined, but this
one is making the builds I make not compile with xcode.

Dave Dyer

unread,
Apr 25, 2017, 9:33:16 PM4/25/17
to CodenameOne Discussions
Another discrepency between builds done today using the build server, and builds I do myself
using today's copy of parpavm from the repository, which is causing my local builds to fail to link

parpavm creates:

JAVA_OBJECT STATIC_FIELD_arimaa_ArimaaConstants_ArimaaId_ENUM_VALUES = 0;
JAVA_OBJECT get_static_arimaa_ArimaaConstants_ArimaaId_ENUM_VALUES(CODENAME_ONE_THREAD_STATE) {
    __STATIC_INITIALIZER_arimaa_ArimaaConstants_ArimaaId(threadStateData);
     return STATIC_FIELD_arimaa_ArimaaConstants_ArimaaId_ENUM_VALUES;
}

whereas the build server creates

JAVA_OBJECT STATIC_FIELD_arimaa_ArimaaConstants_ArimaaId__VALUES = 0;
JAVA_OBJECT get_static_arimaa_ArimaaConstants_ArimaaId__VALUES(CODENAME_ONE_THREAD_STATE) {
    __STATIC_INITIALIZER_arimaa_ArimaaConstants_ArimaaId(threadStateData);
     return STATIC_FIELD_arimaa_ArimaaConstants_ArimaaId__VALUES;
}

Dave Dyer

unread,
Apr 25, 2017, 10:54:50 PM4/25/17
to CodenameOne Discussions

This discrepancy seems to be related to the version of the assembler that is used
in the build.  What version is being used by the build server?

Steve Hannah

unread,
Apr 26, 2017, 10:30:07 AM4/26/17
to codenameone...@googlegroups.com
The build server sets a number of flags in the source code to adjust #defines and defaults.  It also injects code in various places for certain features (e.g. push).

For your own local builds, you should change #define NO_USE_ES2 1 to #define USE_ES2 1

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/0a8a4a03-ba34-4338-bb4f-6c030ca76e9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

Steve Hannah

unread,
Apr 26, 2017, 10:36:18 AM4/26/17
to codenameone...@googlegroups.com
What assembler are you referring to?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Dave Dyer

unread,
Apr 26, 2017, 11:35:32 AM4/26/17
to CodenameOne Discussions

On Wednesday, April 26, 2017 at 7:36:18 AM UTC-7, Steve Hannah wrote:
What assembler are you referring to?

That would be the java bytecode assembler that ByteCodeTranslator uses to map over the classes.
Seems to be part of android studio
 

Steve Hannah

unread,
Apr 26, 2017, 11:44:26 AM4/26/17
to codenameone...@googlegroups.com
Oh.  The ASM library.  As far as I know we use the same version that is posted in cn1-binaries:

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.

Dave Dyer

unread,
Apr 26, 2017, 3:44:23 PM4/26/17
to CodenameOne Discussions


On Wednesday, April 26, 2017 at 8:44:26 AM UTC-7, Steve Hannah wrote:
Oh.  The ASM library.  As far as I know we use the same version that is posted in cn1-binaries:

That's the one I'm using, but it apparently isn't the one used in the build process.
The discrepancy in the name of the enum values is my evidence.  The 5.0.3
build uses "ENUM_VALUES" whereas the actual build uses "__VALUES"

This "known name" becomes important in the implementation of enum valueOf

Dave Dyer

unread,
Apr 26, 2017, 3:47:06 PM4/26/17
to CodenameOne Discussions

I'm tantalizingly close to making my own builds, which will make it possible
to start more interesting work on parpavm.  I can make builds which xcode
successfully compiles and links, but which crash on running.  I'm pretty
sure that's because I'm missing the secret sauce embedded in the
launcher stub, which is created and compiled by your server side build.

Where can I find a prototype for the launcher stub?


Reply all
Reply to author
Forward
0 new messages