Cocos2d-x compilation error - sdk

I just downloaded the Cocos2d-x SDK and tried to compile the hello world example with the following result:
<code>The Selected NDK toolchain version was 4.8 !
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/external
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/cocos
Android NDK: jni/Android.mk: Cannot find module with tag '2d' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
jni/Android.mk:22: *** Android NDK: Aborting. . Stop.
make: Leaving directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
Traceback (most recent call last):
File "./build_native.py", line 166, in <module>
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "./build_native.py", line 153, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "./build_native.py", line 89, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android ] fails!</code>

Which cocos2d-x version are you using? Seems like you didn't define your env variables correctly. Please have a look at this tutorial and make sure you define the following variables:
COCOS2DX_ROOT : should point to the root directory of cocos2d-x
ANDROID_SDK_ROOT : Should point to the root directory of the Android SDK
NDK_ROOT : Should point the to root directory of the Android NDK
NDK_TOOLCHAIN_VERSION : Which Android NDK toolchain should be used

See the problem is that the system is not able to compile the cocos.py.
So, if you open cocos.py from the bin directory where you have unzipped the file
it runs smoothly.
The thing is Python3.x is not able to compile the Phython2.x code.
So we must change the path in environment variable so the system doesn't a python2 file with the help of python3 compiler.
Thanks
Summary
1.Go to Control Panel, then type path or environment in search bar
2.open Evnvironment variables
3.Just delete any C:\Python34 or anything starts with python3.x and add C:\Python27 path where you have installed.
Video link:
https://youtu.be/T8zk3sv0cL0

Related

build_iphone.sh: line 52: /Users/.../pocketsphinx-master/configure: No such file or directory

I'm on macOS Mojave in terminal, and I'm getting an error that says no such file or directory for the directory ".../pocketsphinx-master/configure" when I run build_iphone.sh, which I got from this repository: cmusphinx/pocketsphinx-ios-demo.
The instructions for pocketsphinx found at this repository -- cmusphinx/pocketsphinx gives these instructions to use pocketsphinx with Xcode. Here's part of what it says, which I don't understand:
Pocketsphinx uses the standard unix autogen system, you can build pocketsphinx with automake given you already built sphinxbase You just need to pass correct configure arguments, set compiler path, set sysroot and other options. After you build the code you need to import dylib file into your project and you also need to configure includes for your project to find sphinxbase headers.
Here is what my terminal on my Mac mini looks like:
Daniels-Mac-mini:pocketsphinx-master shinehah$ sh build_iphone.sh
building arm64...
build_iphone.sh: line 52: /Users/shinehah/cmusphinx/pocketsphinx-master/configure: No such file or directory
I created that directory, but I still get the same error message. What do I need to put in that directory?
In build_iphone.sh, line 52, it says:
--host="${HOST_TYPE}" \
Here is the code segment it is from:
$CWD/configure
--host="${HOST_TYPE}" // line 52
--prefix="$DEST/$ARCH"
--without-lapack
--without-python
--with-sphinxbase="$SPHINXBASE_DIR"
|| exit 1

yocto SDK krogoth cmake FindBoost not found

I am trying to find the boost libraries (cmake) inside the Yocto SDK with extended environment on krogoth.
The default cmake Find_
find_package(Boost REQUIRED)
The standard error message
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:3 (find_package)
The following is a snippet from my conf/local.conf
IMAGE_INSTALL_append = " boost-dev"
IMAGE_INSTALL_append = " boost"
IMAGE_INSTALL_append = " kernel-devsrc"
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-hello"
KERNEL_MODULE_AUTO_lOAD += "hello-md"
LCHAIN_HOST_TASK_append = "${SDK_EXTRA_TOOLS}"
SDK_EXTRA_TOOLS = " nativesdk-cmake
I am using the native cmake
auke#xenialxerus:~/workspace/beaglebone-dev/build$ which cmake
/home/auke/workspace/beaglebone-dev/poky-sdk/tmp/sysroots/x86_64-linux/usr/bin/
since I:
source environment-setup-cortexa8hf-neon-poky-linux-gnueabi
looking for the usual headers in:
find ./tmp/sysroots/beaglebone/usr/include/boost/
..
/tmp/sysroots/beaglebone/usr/include/boost/vmd/list/to_seq.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/list/to_tuple.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/to_list.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/empty.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/is_list.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/size.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/get_type.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/assert_is_identifier.hpp
./tmp/sysroots/beaglebone/usr/include/boost/vmd/is_number.hpp
..
just like the binaries:
./tmp/sysroots/beaglebone/usr/lib/libboost_system-mt.a
./tmp/sysroots/beaglebone/usr/lib/libboost_iostreams.so.1.60.0
./tmp/sysroots/beaglebone/usr/lib/libboost_serialization-mt.a
./tmp/sysroots/beaglebone/usr/lib/libboost_date_time-mt.a
./tmp/sysroots/beaglebone/usr/lib/libboost_date_time.a
./tmp/sysroots/beaglebone/usr/lib/libboost_thread.so
./tmp/sysroots/beaglebone/usr/lib/libboost_signals-mt.a
./tmp/sysroots/beaglebone/usr/lib/libboost_date_time-mt.so
./tmp/sysroots/beaglebone/usr/lib/libboost_graph-mt.a
./tmp/sysroots/beaglebone/usr/lib/libboost_iostreams.so
./tmp/sysroots/beaglebone/usr/lib/libboost_regex.so
./tmp/sysroots/beaglebone/usr/lib/libboost_wserialization.so.1
Is there something that i might have overlooked?
regards Auke
You should use
bitbake -c populate_sdk <image_name> to generate the SDK based on your image;
As an alternative to locating and downloading a toolchain installer,
you can build the toolchain installer one of two ways if you have a
Build Directory:
*Use bitbake meta-toolchain. This method requires you to still install
the target sysroot by installing and extracting it separately. For
information on how to install the sysroot, see the "Extracting the
Root Filesystem" section.
*Use bitbake -c populate_sdk. This method has significant
advantages over the previous method because it results in a toolchain
installer that contains the sysroot that matches your target root
filesystem.
Also, using the variable TOOLCHAIN_HOST_TASK to add more packages.
http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html
This variable lists packages the OpenEmbedded build system uses when
building an SDK, which contains a cross-development environment. The
packages specified by this variable are part of the toolchain set that
runs on the SDKMACHINE, and each package should usually have the
prefix "nativesdk-". When building an SDK using bitbake -c
populate_sdk , a default list of packages is set in this
variable, but you can add additional packages to the list.
e.g.
TOOLCHAIN_HOST_TASK += “nativesdk-libqt5core-dev”

Quantlib with boost for iOS build on xcode 4.6

I'm trying to build quantlib for xcode 4.6.
The project of concern is this one: https://github.com/philipbarnes/quantlib-on-iOS
This quantlib project relies on this boost project: https://gitorious.org/boostoniphone/boostoniphone
My problem is I cannot get this boost to build, but I can get another version to build on github also by Pete.
One of the steps in building quantlib for iOS asks to set the boost dir. I tried to adjust this to no avail. 
This means I have a dir 'boostoniphone-huuskpes-boostoniphone' - which does not build and was said to be the version to use with the quantlib on iPhone project,
and the dir 'boostoniphone-master' which did build - it has a different build structure with folders and maybe setting the $BOOSTDIR variable in the quantlib project isn't so simple.
These outputs from the console have been shorted for more comfortable reading
My gitorious boost output says:
3 warnings generated.
darwin.archive bin.v2/libs/thread/build/darwin-6.1~iphonesim/release/architecture-x86/link- static/macosx-version-iphonesim-6.0/target-os-iphone/threading-multi/libboost_thread.a
common.copy stage/lib/libboost_thread.a
...updated 120 targets...
=================================================================
Done
Splitting all existing fat binaries...
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/colman/Downloads/boostoniphone-huuskpes- boostoniphone_/src/boost_1_51_0/bin.v2/libs/thread/build/darwin-4.2.1~iphone/release/architecture- arm/link-static/macosx-version-iphone-6.0/target-os-iphone/threading-multi/libboost_thread.a (No such file or directory)
...
and continues with problem repeated , then this error is next
...
ar: obj/*.o: No such file or directory
...armv7s
ar: obj/*.o: No such file or directory
...i386
ar: obj/*.o: No such file or directory
liboficate: thread
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/colman/Downloads/boostoniphone-huuskpes- boostoniphone_/src/boost_1_51_0/bin.v2/libs/thread/build/darwin-4.2.1~iphone/release/architecture-arm/link-static/macosx-version-iphone-6.0/target-os-iphone/threading-multi/libboost_thread.a (No such file or directory)
as the other boost project works for me it, I try to link it into the buildql.sh script as a boost ref, but I get:
checking for arm-apple-darwin10-gcc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple- darwin10-llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/colman/Downloads/boostoniphone-huuskpes-boostoniphone_/QuantLib-1.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
and
/Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/colman/Downloads/boostoniphone-huuskpes-boostoniphone_/QuantLib-1.2.1/prefix/armv7/lib/libQuantLib.a (No such file or directory)
A pointer to how to make frameworks may also be a solution? But I think getting the quantlib for iOS project to work is the real solution.
Coming back to the BOOST variable, in the buildql.sh file, changes such as the following have been made:
#: ${BOOST_HOME:=$HOME/workspace/huuskpes-boostoniphone}
: ${BOOST_HOME:=$HOME/workspace/boostoniphone-master/}
: ${BOOST_SRC:=$BOOST_HOME/src/boost_1_51_0}
The following were also altered to attempt to fit the 'boostoniphone-master'
: ${SRCDIR:=`pwd`/src}
: ${BUILDDIR:=`pwd`/build}
: ${PREFIXDIR:=`pwd`/prefix}
: ${FRAMEWORKDIR:=`pwd`/framework}
Thanks for any hints, potential solutions.
Changes to the buildql.sh script look like this:
: ${BOOST_HOME:=/Volumes/Untitled\ 1/workspace/boostoniphone-master/iphone-build/stage/lib}
: ${BOOST_SRC_HOME:=/Volumes/Untitled\ 1/workspace/boostoniphone-master/boostoniphone-master}
: ${BOOST_SRC:=$BOOST_SRC_HOME/src/boost_1_51_0/boost}
...
: ${SRCDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/src}
: ${BUILDDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/build}
: ${PREFIXDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/prefix}
: ${PREFIXDIR_2:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/prefix}
: ${FRAMEWORKDIR:=/Volumes/Untitled\ 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a}
Build command runs with a new error:
./buildql.sh -with-boost-include=/opt/local/include/ --with-boost-lib=/Volumes/Untitled 1/workspace/boostoniphone-master/iphone-build/stage --prefix=/opt/local/
Current output looks like this:
libtool: link: (cd .libs/libExperimental.lax/libAmortizingBonds.a && ar x "/Volumes/Untitled 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/ql/experimental/amortizingbonds/.libs/libAmortizingBonds.a")
../../libtool: line 1096: cd: .libs/libExperimental.lax/libAmortizingBonds.a: No such file or directory
make[3]: *** [libExperimental.la] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
=================================================================
Done
rm: /Volumes/Untitled: Resource busy
=================================================================
Framework: Setting up directories...
=================================================================
Framework: Creating symlinks...
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Versions/Current: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Headers: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Resources: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Documentation: No such file or directory
ln: 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/ql: No such file or directory
=================================================================
Framework: Lipoing library into /Volumes/Untitled 1/workspace/quantlib-on-iOS-master/./ql/.libs/libQuantLib.a/ql.framework/Versions/A/ql
/Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: $ /Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo -create -arch armv7 /Volumes/Untitled 1/workspace/quantlib-on-iOS- master/QuantLib-1.2.1/1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/ql/.libs/libQuantLib.a -arch armv7s /Volumes/Untitled 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/ql/.libs/libQuantLib.a -arch i386 /Volumes/Untitled 1/workspace/quantlib-on-iOS-master/QuantLib-1.2.1/1/workspace/quantlib-on-iOS-master/ QuantLib-1.2.1/ql/.libs/libQuantLib.a -o /Volumes/Untitled (No such file or directory)
Aborted: Lipo failed
Rather than go into all the script details the following is the solution:
Set the paths carefully, that means, try not to have spaces or have data on external drive (although you can)
Set the parameters for the ARM chip, simulator and the iOS version installed very very carefully!
All in all that should be the most of it.

Trigger.io error "/usr/bin/codesign no identity found" can't create package or run the app on the device

I have a problem when trying to run my application on the device or create IPA file.
I followed the steps here and I have this error when trying to run on iOS option:
[ERROR] Failed when running /usr/bin/codesign: FdawaDev: no identity found
I tried to make it throw terminal with this command
forge package ios --ios.profile.provisioning_profile Development.mobileprovision
and I'm getting this error
/Applications/TriggerToolkit.app/Contents/MacOS/forge -v package ios --ios.profile.provisioning_profile Development.mobileprovision
[ INFO] Forge tools running at version 3.3.43
[ DEBUG] Checking for update zip...
[ ERROR] Couldn't import generation code: No module named generate_dynamic
[ DEBUG] Traceback (most recent call last):
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/async.py", line 98, in run
result = self._target(*self._args, **self._kwargs)
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/main.py", line 443, in package
generate_dynamic = forge_build.import_generate_dynamic()
File "/Applications/TriggerToolkit.app/Contents/MacOS/build-tools/forge/build.py", line 67, in import_generate_dynamic
raise ForgeError("Couldn't import generation code: {0}".format(e))
ForgeError: Couldn't import generation code: No module named generate_dynamic
I removed TriggerToolkit and download the latest one, installed it again and I'm still getting the same error.
What am I missing?
The first error is a configuration problem: you're pointing at an iOS developer identity called "FdawaDev" when one doesn't exist in your Keychain.
Unless you have several identities, you can safely leave the "Certificate" Local Config setting empty in the Toolkit.
If you have several identities, you should specify one with something like iPhone Developer: James Brady.
For the second problem, when using the command line tools, you have to manually run a build before doing a run or package action, e.g.:
% forge build ios && forge package ios

Phonegap and Blackberry WebWorks: build\StandardInstall does not exist

My environment is Windows XP.
JDK and Apache ant are installed.
Phonegap version is 1.7.0
BlackBerry Webworks SDK for smartphone: version 2.3.1
I'm following the instruction of http://docs.phonegap.com/en/1.7.0/guide_getting-started_blackberry_index.md.html#Getting%20Started%20with%20Blackberry to try phonegap on blackberry.
The sample Blackberry WebWorks sample application I use is this https://github.com/phonegap/phonegap/tree/master/lib/blackberry/sample
First I execute 'ant blackberry build'. Although it said "BUILD SUCCESSFUL", however, neither StandardInstall nor .cod was created. And the output contained error message like this:
[exec] E:\Temp\widgetGen.15924526831337325595265.tmp\extension\blackberry\common\util\URLDecoder.java:183: unclosed string literal
[exec] decodingMap.put( "%AC", "? );
[exec] ^
[exec] 100 errors
[exec] Error!: Error: java compiler failed: C:\Program Files\Java\jdk1.6.0_32\bin\javac.exe #E:\TEMP\rapc_02802fef.dir\options
[exec] [ERROR] RAPC exception occurred
The full build log is here http://www.cis.nctu.edu.tw/~gis90571/a.txt
Then I execute 'ant blackberry load-simulator', it shows:
...
BUILD FAILED
D:\WebWorks_projects\helloworld\build.xml:33: The following error occurred while
executing this line:
D:\WebWorks_projects\helloworld\blackberry.xml:123: D:\WebWorks_projects\hellowo
rld\build\StandardInstall does not exist.
the content of blackberry.xml is:
123: <copy todir="${simulator.dir}">
124: <fileset dir="${build.dir}/StandardInstall" includes="*.cod, *.cso, *.csl, *.alx" />
125: </copy>
(I put the sample app provided by phonegap in D:\WebWorks_projects and changed its name to "helloworld".)
I'm new to ant and blackberry.
Could someone please offer some help or hint? Thanks.
Answer:
It seems that the source file URLDecoder.java in \ext\common\blackberry\common\util is broken due to some encoding issue. Fix it and the problem solved.
An useful article here: http://whatdrewknows.blogspot.com/2012/04/cordova-blackberry-development-part-2.html
Your application is not successfully getting built.
If your application gets build and generate 3 folders
OTAInstall
StandardInstall
widget
As well as one application.zip file is also created.
If you get all these files then your application was successfully compiled and built.

Resources