wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

Build server failed with iOS AppStore build #1332

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT: This is not a place to ask questions! Please ask questions here:
http://www.codenameone.com/discussion-forum.html
If you are unsure about an issue go to the discussion forum first. Remove
these lines to indicate that you read and understood them.

Please clearly state whether the issue relates to a device/the simulator or
the tools.
If related to a device be sure to specify exactly which device with as much
details as possible.

What steps will reproduce the problem?
1. Run the attached test project to reproduce
2.
3.

What is the expected output? What do you see instead?
When build the attached test project with iOS AppStore build, the build will 
fail, however the iOS Debug build is still fine

What version of the product are you using? On what operating system?
latest codenameone as of today, windows 7

Please provide any additional information below.

Original issue reported on code.google.com by eStart...@gmail.com on 3 Feb 2015 at 9:43

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by steve.ha...@codenameone.com on 3 Feb 2015 at 10:24

GoogleCodeExporter commented 9 years ago
I have reproduced this.  My test case is attached.

My findings:

1. Debug build on build server works.
2. Release build on build server fails with error.
3. Debug build on my local machine (using IPhoneBuilder) works.
4. Release build on my local machine (using IPhoneBuilder) works.

Here is a comparison of the output for the problem file. 

On my local machine:

-------
CompileC 
build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/ar
mv7/com_codename1_issue1156_Issue1332Test.o 
Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m normal armv7 
objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode6.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode6.1.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode6.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wno-int-conversion -Wbool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode6.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.0 -iquote /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-generated-files.hmap -I/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-own-target-headers.hmap -I/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-all-target-headers.hmap -iquote /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-project-headers.hmap -I/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Release-iphoneos/include -I/Applications/Xcode6.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/DerivedSources/armv7 -I/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/DerivedSources -F/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Release-iphoneos -include /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/C/com.apple.DeveloperTools/6.1.1-6A2008a/Xcode/SharedPrecompiledHeaders/Issue1332Test-Prefix-cqjsokcqaaswerbbtxxjuizpbgee/Issue1332Test-Prefix.pch -MMD -MT dependencies -MF /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/armv7/com_codename1_issue1156_Issue1332Test.d --serialize-diagnostics /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/armv7/com_codename1_issue1156_Issue1332Test.dia -c /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m -o /var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/armv7/com_codename1_issue1156_Issue1332Test.o
/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:164:18: warning: 
implicit declaration of function 
'get_static_com_codename1_issue1156_Issue1332Test_1__SwitchMap_com_codename1_iss
ue1156_Issue1332Test_Type' is invalid in C99 [-Wimplicit-function-declaration]
    PUSH_POINTER(get_static_com_codename1_issue1156_Issue1332Test_1__SwitchMap_com_codename1_issue1156_Issue1332Test_Type(threadStateData));
                 ^
In file included from 
/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:1:
In file included from 
/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dis
t/Issue1332Test-src/Issue1332Test-Prefix.pch:18:
/var/folders/k7/b5qdhxt88v58wp008k8yxy180000gn/T/build7826205390927342050xxx/dis
t/Issue1332Test-src/cn1_globals.h:398:49: note: expanded from macro 
'PUSH_POINTER'
#define PUSH_POINTER(value) { JAVA_OBJECT ppX = value; stack[stackPointer].type 
= CN1_TYPE_INVALID; \
                                                ^
1 warning generated.
------

On the Build Server:
-------
CompileC 
build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/ar
m64/com_codename1_issue1156_Issue1332Test.o 
Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m normal arm64 
objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode6.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -Wno-trigraphs -fpascal-strings -O3 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wno-int-conversion -Wbool-conversion -Wno-enum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=6.0 -iquote /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-generated-files.hmap -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-own-target-headers.hmap -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-all-target-headers.hmap -iquote /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Issue1332Test-project-headers.hmap -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Release-iphoneos/include -I/Applications/Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/DerivedSources/arm64 -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/DerivedSources -F/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Release-iphoneos -include /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/C/com.apple.DeveloperTools/6.0.1-6A317/Xcode/SharedPrecompiledHeaders/Issue1332Test-Prefix-gthyxshtzgfjdmfvohlbcuqqtxgq/Issue1332Test-Prefix.pch -MMD -MT dependencies -MF /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/arm64/com_codename1_issue1156_Issue1332Test.d --serialize-diagnostics /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/arm64/com_codename1_issue1156_Issue1332Test.dia -c /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m -o /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dist/build/Issue1332Test.build/Release-iphoneos/Issue1332Test.build/Objects-normal/arm64/com_codename1_issue1156_Issue1332Test.o
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:164:18: error: 
implicit declaration of function 
'get_static_com_codename1_issue1156_Issue1332Test_1__SwitchMap_com_codename1_iss
ue1156_Issue1332Test_Type' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
    PUSH_POINTER(get_static_com_codename1_issue1156_Issue1332Test_1__SwitchMap_com_codename1_issue1156_Issue1332Test_Type(threadStateData));
                 ^
In file included from 
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:1:
In file included from 
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/Issue1332Test-Prefix.pch:18:
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/cn1_globals.h:398:49: note: expanded from macro 
'PUSH_POINTER'
#define PUSH_POINTER(value) { JAVA_OBJECT ppX = value; stack[stackPointer].type 
= CN1_TYPE_INVALID; \
                                                ^
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:164:18: note: did 
you mean 
'get_static_com_codename1_issue1156_Issue1332Test_1_$SwitchMap$com$codename1$iss
ue1156$Issue1332Test$Type'?
In file included from 
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:1:
In file included from 
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/Issue1332Test-Prefix.pch:18:
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/cn1_globals.h:398:49: note: expanded from macro 
'PUSH_POINTER'
#define PUSH_POINTER(value) { JAVA_OBJECT ppX = value; stack[stackPointer].type 
= CN1_TYPE_INVALID; \
                                                ^
In file included from 
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.m:1:
In file included from 
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test.h:6:
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build6905492648785418829xxx/dis
t/Issue1332Test-src/com_codename1_issue1156_Issue1332Test_1.h:37:20: note: 
'get_static_com_codename1_issue1156_Issue1332Test_1_$SwitchMap$com$codename1$iss
ue1156$Issue1332Test$Type' declared here
extern JAVA_OBJECT 
get_static_com_codename1_issue1156_Issue1332Test_1_$SwitchMap$com$codename1$issu
e1156$Issue1332Test$Type();
                   ^
1 error generated.
-------

It seems as though they are complaining about the same thing, only on my local 
machine it issues a warning only.  On the build server, it issues an error.  

Theory:  The build server is set to include the -Werror flag by default.
http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-command-
line-flags

Possible solutions:
1. Find out why it is adding this flag by default, and turn the setting off.
2. Explicitly add the -Wno-error=implicit-function-declaration (I'm not 100% 
sure this is actually an option) to the command-line flags.
3. Resolve the warning by either adding an "extern" declaration for these 
SwitchMap types before using them, or add their signatures to the header files 
(currently they are only in the .m files).

I'll leave this one to you Shai.  Depends how you want to fix it.

Original comment by steve.ha...@codenameone.com on 3 Feb 2015 at 11:25

Attachments:

GoogleCodeExporter commented 9 years ago
One other possibility is that it works on my machine because the build server 
hasn't been updated.  Shai, you would know.

Original comment by steve.ha...@codenameone.com on 3 Feb 2015 at 11:35

GoogleCodeExporter commented 9 years ago
I see the problem, I don't think the right thing to do here is to "fix" the 
warning but rather to fix the actual problem. If anything I'd set the debug 
version to fail too.
The header code generates this: extern JAVA_OBJECT 
get_static_userclasses_StateMachine_1_$SwitchMap$userclasses$StateMachine$Type()
;

And in the code we have the correct usage:
JAVA_OBJECT 
get_static_userclasses_StateMachine_1__SwitchMap_userclasses_StateMachine_Type(C
ODENAME_ONE_THREAD_STATE) {

So we just need a $ replace call for the header generation code... 

Original comment by shai.almog on 4 Feb 2015 at 5:51

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2079.

Original comment by shai.almog on 4 Feb 2015 at 7:07

GoogleCodeExporter commented 9 years ago
This is now fixed in SVN. We should probably investigate why this flag is off 
in debug build which IMO it shouldn't be. But this particular issue should be 
fixed.
On the build servers in 5 minutes or so.

Original comment by shai.almog on 4 Feb 2015 at 7:08