cn1-codescan.cn1lib ios build issue

50 views
Skip to first unread message

mcell...@gmail.com

unread,
Jul 26, 2016, 5:42:37 AM7/26/16
to CodenameOne Discussions
Hi,

I am trying to switch my barcode scanning code use the cn1-codescan.cn1lib as the now deprecated code no longer seems to work. I am pretty sure I have done everything correctly but I get a build error from the codename one server.

I have got the cn1-codescan.cn1lib file from GitHub, and placed it into my projects lib folder. I have then chosen the codename one Refresh Libs option and that has generated all the cs/stubs etc code in the lib/impl folder. So I think this is all correct

However I get the following build error from the codename one build server (pasted below). Can anyone enlighten me as to what's gone wrong?

Also, just to point out that the file com_codename1_ext_codescan_NativeCodeScannerImpl.h that it says it can't find has been generated in the lib\impl\native\ios folder. Do I need to add something to build.xml to ensure that it gets uploaded to the server?

Thanks in advance,

Paul

CompileC build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.o ApplicationWrapper-src/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/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:/Users/administrator/.jenv/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 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.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=5.1.1 -iquote /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-generated-files.hmap -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-own-target-headers.hmap -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-all-target-headers.hmap -iquote /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-project-headers.hmap -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/Release-iphoneos/include -I/Applications/Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/DerivedSources/armv7 -I/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/DerivedSources -F/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/Release-iphoneos -include /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/C/com.apple.DeveloperTools/6.0.1-6A317/Xcode/SharedPrecompiledHeaders/ApplicationWrapper-Prefix-fntfsatmzprngoekkhddckrvegfg/ApplicationWrapper-Prefix.pch -MMD -MT dependencies -MF /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.d --serialize-diagnostics /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.dia -c /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/ApplicationWrapper-src/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.m -o /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.o
/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build7058000107000510609xxx/dist/ApplicationWrapper-src/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.m:5:9: fatal error: 'com_codename1_ext_codescan_NativeCodeScannerImpl.h' file not found
#import "com_codename1_ext_codescan_NativeCodeScannerImpl.h"
        ^
1 error generated.


Steve Hannah

unread,
Jul 26, 2016, 12:00:31 PM7/26/16
to codenameone...@googlegroups.com
Try to do a Clean.  Then Refresh CN1 LIbs.  Then try a build again.  See if that kick-starts it.

--
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-discu...@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/875b6472-f4f4-49e9-a457-b12cc6d2743a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

mcell...@gmail.com

unread,
Jul 26, 2016, 12:03:05 PM7/26/16
to CodenameOne Discussions

Thanks Steve - I may have it though, I placed some source code out of the library zip into my source folder - which I shouldn't have done - I think this is what's causing the error rather than the library itself... when I can get out of meetings (and if there's time today) I shall find out. If so I'll confirm on here tomorrow.

Thanks for the reply though,

Paul
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

mcell...@gmail.com

unread,
Jul 26, 2016, 12:27:32 PM7/26/16
to CodenameOne Discussions, mcell...@gmail.com
Hi,

I'm still getting the error I'm afraid. The file it can't find has been generated into the lib/impl/native/ios folder in my project. Do I need to do something to ensure that this gets uploaded to the cn1 build server when I send a build to it? ie does it need to be included somewhere in an xml file or classpath?

Thanks,

Paul

CompileC build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.o ApplicationWrapper-src/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/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 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.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=5.1.1 -iquote /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-generated-files.hmap -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-own-target-headers.hmap -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-all-target-headers.hmap -iquote /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/ApplicationWrapper-project-headers.hmap -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/Release-iphoneos/include -I/Applications/Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/DerivedSources/armv7 -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/DerivedSources -F/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/Release-iphoneos -include /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/C/com.apple.DeveloperTools/6.0.1-6A317/Xcode/SharedPrecompiledHeaders/ApplicationWrapper-Prefix-edccnkmyuzihluhfxftwldipfqla/ApplicationWrapper-Prefix.pch -MMD -MT dependencies -MF /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.d --serialize-diagnostics /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.dia -c /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/ApplicationWrapper-src/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.m -o /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/build/ApplicationWrapper.build/Release-iphoneos/ApplicationWrapper.build/Objects-normal/armv7/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.o
/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build6226209471212545441xxx/dist/ApplicationWrapper-src/native_com_codename1_ext_codescan_NativeCodeScannerImplCodenameOne.m:5:9: fatal error: 'com_codename1_ext_codescan_NativeCodeScannerImpl.h' file not found
#import "com_codename1_ext_codescan_NativeCodeScannerImpl.h"



On Tuesday, July 26, 2016 at 10:42:37 AM UTC+1, mcell...@gmail.com wrote:

Shai Almog

unread,
Jul 27, 2016, 12:03:34 AM7/27/16
to CodenameOne Discussions, mcell...@gmail.com
Hi,
is it possible you are not using the codescan API from reachable code?
This error occurs when the C code tries to call into the Java code and if the code is unreachable the VM strips it out and we get errors like that.

mcell...@gmail.com

unread,
Jul 27, 2016, 4:54:47 AM7/27/16
to CodenameOne Discussions, mcell...@gmail.com
Hi,

Just to complete this... I have found and resolved the issue. Not sure why but the following was missing from my build.xml file :-

 <fileset dir="lib/impl/native/ios" includes="**/*"/>

Thanks for the help though.

Paul


On Tuesday, July 26, 2016 at 10:42:37 AM UTC+1, mcell...@gmail.com wrote:

Shai Almog

unread,
Jul 28, 2016, 12:53:04 AM7/28/16
to CodenameOne Discussions, mcell...@gmail.com
Hi,
which IDE are you using?

mcell...@gmail.com

unread,
Jul 28, 2016, 3:58:58 AM7/28/16
to Shai Almog, CodenameOne Discussions

Hi Shaw.  I'm using eclipse.  Turns out I had a line missing in my build. Xml file.  Posted this as a response back on the discussion.

Thanks

Paul

Shai Almog

unread,
Jul 29, 2016, 1:09:55 AM7/29/16
to CodenameOne Discussions, shai....@gmail.com, mcell...@gmail.com
Hi,
yes I understood. I wanted to know which team member should look into the missing line issue...
Reply all
Reply to author
Forward
0 new messages