How to compile zsh on/for an iPhone? - iphone

Background
I recently changed from bash to zsh as my default shell and have quickly gotten used to the awesomeness that's added by associated tools (prezto, zaw and zsh-dwim).
I wanted to have a similar setup on iPhone as well. However, only zsh v.4.3.10 is available from the default repos and that's not supported by prezto:
Would you know how I should go about compiling zsh from source for the iPhone? I attempted to use Theos to build something on my Win7 box, but am greeted with the following errors after doing the make package install:
/home/blah/projects/ashrocks/theos/makefiles/targets/Cygwin/iphone.mk:38: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Bootstrapping CydiaSubstrate...
Compiling iPhoneOS CydiaSubstrate stub... default target? failed, what?
cp: cannot stat `_out/*': No such file or directory
cp: cannot stat `libsubstrate.dylib': No such file or directory
Generating substrate.h header...
Making all for tweak ashrocks...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
/bin/sh: theos/toolchain/windows/iphone/bin/armv7-apple-darwin11-clang++: No such file or directory
/home/blah/projects/ashrocks/theos/makefiles/instance/rules.mk:144: recipe for target 'obj/Tweak.xm.666c9a3c.o' failed
make[2]: *** [obj/Tweak.xm.666c9a3c.o] Error 127
/home/blah/projects/ashrocks/theos/makefiles/instance/library.mk:19: recipe for target 'internal-library-all_' failed
make[1]: *** [internal-library-all_] Error 2
/home/blah/projects/ashrocks/theos/makefiles/master/rules.mk:54: recipe for target 'ashrocks.all.tweak.variables' failed
make: *** [ashrocks.all.tweak.variables] Error 2
Would you know how the command line tools availabe in Cydia were compiled ?

It's probably because you don't have the standard libraries compiled for the iPhone on your computer. Try setting up gcc on your iPhone by following these instructions. I have done this and have successfully compile various pieces of software.

Related

deploying segnet-predict on jetson nano using matlab .:fatal error: opencv2/opencv.hpp: No such file or directory #include "opencv2/opencv.hpp"

i am working on jetson nano and trying to implement the example of segnet_predict deploy to jetson nao from the matlab.but when i run the command
codegen('-config ', cfg, 'segnet_predict', '-args', {img},'-report');
i get this error:
STDERR: /home/remoteBuildDir/MATLAB_ws/R2021b/C/Users/DELL/Documents/MATLAB/segnet_deploy/main.cu:10:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include "opencv2/opencv.hpp"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [main.o] Error 1
make: *** Waiting for unfinished jobs....
STDOUT: make: Entering directory '/home/remoteBuildDir/MATLAB_ws/R2021b/C/Users/DELL/Documents/MATLAB/segnet_deploy/codegen/exe/segnet_predict'
------------------------------------------------------------------------
??? Build error: C++ compiler produced errors. See the Build Log for further details.
can you please help me resolving this error
i tried to change the path by locating the opencv path but could not solve it.
It seems like the issue is with the OpenCV library, which the code is trying to include but is unable to find. Check if the OpenCV library is installed on your Jetson Nano:
Run the command
pkg-config --modversion opencv
in the terminal. If the output is a version number, OpenCV is installed.
If OpenCV is not installed, install it using the command
sudo apt-get install libopencv-dev
Ensure that the path to the OpenCV header files is included in the compiler search path:
Locate the path to the OpenCV header files (opencv2/opencv.hpp) on your system.
In your MATLAB code, add the path to the OpenCV header files to the compiler search path using the "-I" option in the "codegen" function. For example:
codegen('-config ', cfg, 'segnet_predict', '-args', {img},'-report', '-I /path/to/opencv/headers');
Make sure that the OpenCV libraries are in the library search path:
Locate the path to the OpenCV libraries on your system.
In your MATLAB code, add the path to the OpenCV libraries to the library search path using the "-L" option in the "codegen" function. For example:
codegen('-config ', cfg, 'segnet_predict', '-args', {img},'-report', '-L /path/to/opencv/libraries');

Unrecognized font family 'FontAwesome5Free-Solid'

This happened out of nowhere, and I have no idea what happened.
I started to run my app and got this error:
I believe that it's coming from react-native-vector-icons.
I've tried switching to an older version of react-native-vector-icons, and I still receive the same result.
I've also tried to uninstall react-native-vector-icons, and, when I do, I receive a compiling error.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/lukeschoenberger/Documents/Programming/news-
arg/test6/ios/build/test6/Build/Intermediates.noindex/Pods.build/Debug-
iphonesimulator/RNVectorIcons.build/Objects-
normal/x86_64/RNVectorIconsManager.o
/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/node_modules/react-native-vector-
icons/RNVectorIconsManager/RNVectorIconsManager.m normal x86_64
objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
I'm pretty stuck at this point.
EDIT:
After I linked react-native-vector-desing and cleared the build folder, I received this error:
Build system information
error: Multiple commands produce '/Users/lukeschoenberger/Documents/Programming/news-arg/test6/ios/build/test6/Build/Products/Debug-iphonesimulator/test6.app/AntDesign.ttf':
1) Target 'test6' (project 'test6') has copy command from
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/node_modules/native-base/Fonts/AntDesign.ttf' to
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/ios/build/test6/Build/Products/Debug-
iphonesimulator/test6.app/AntDesign.ttf'
2) Target 'test6' (project 'test6') has copy command from
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' to
'/Users/lukeschoenberger/Documents/Programming/news-
arg/test6/ios/build/test6/Build/Products/Debug-
iphonesimulator/test6.app/AntDesign.ttf'
** BUILD FAILED **
Icon module does not appear to be properly linked.
You can try react-native link react-native-vector-icons
If this is not a workaround,
Delete all items in the build folder under the iOS folder. Then rebuild the project with react-native run-ios.
Regular, Solid, and Brand Icons TTF File import android and ios directory
https://aboutreact.com/react-native-fontawesome/

How do I develop bare-metal i.mx6sx code using eclipse?

I was wondering if you could help me with some issues and questions I have for developing for the i.MX6 SoloX in bare-metal. I was looking at this link https://community.nxp.com/docs/DOC-106253 and downloaded the files there to use as an example of how to develop bare-metal c code for the i.MX6.
Then I setup my eclipse environment according to this tutorial https://community.nxp.com/docs/DOC-103736 but just the toolchain because I'm not interested in processor expert.
Since I'm working on Linux I didn't installed the Code Sourcery thing, instead I'm working with the gcc-arm-none-eabi which I installed using:
$ sudo apt-get install gcc-arm-none-eabi
And therefore I had to change the cs-rm and cs-make for rm and make respectively.
And I was able to create an eclipse project with the downloaded code and configure the project to make it work, nevertheless, I had the first error:
main.c:8:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
make: *** [cortex_A9/main.o] Error 1
cortex_A9/subdir.mk:24: recipe for target 'cortex_A9/main.o' failed
And I was able to solve it adding "/usr/include" in the include directories at project > properties. But I'm not sure if this is a correct way of solving this error.
After fixing this error I got a new one:
syscalls.c:168:1: error: unknown type name 'caddr_t'
caddr_t _sbrk(int incr)
And for solving that I had to include explicitly the file "/usr/include/x86_64-linux-gnu/sys/types.h" and also I don't know if that is the correct way to solve it.
Now having eliminated those two errors I have the following one:
Building target: imx6-A9.elf
Invoking: Cross ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-a9 -march=armv7-a -marm -mlittle-endian -mfloat-abi=softfp -mfpu=neon -mno-unaligned-access -fno-zero-initialized-in-bss -O0 -g -T "/home/mmalagon/iMX6/MX6SX_hello_MFG/cortex_A9/mx6slx.ld" -nostartfiles -Wl,-Map,"imx6-A9.map" -o "imx6-A9.elf" ./cortex_A9/main.o ./cortex_A9/syscalls.o ./cortex_A9/uart.o
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lg
makefile:42: recipe for target 'imx6-A9.elf' failed
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [imx6-A9.elf] Error 1
Which I haven't been able to resolve.
I don't know if this error is a consequence of the way I solved the two previous errors.
Does anybody know how to properly setup eclipse for i.MX6 bare-metal development?
Thank you very much for helping!!
If you want to develop bare-metal code for the i.MX6SoloX without using CodeSourcery then you need to execute this:
sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi -y
And then choose "Custom (arm-none-eabi-gcc)" at Project>Settings>C/C++ Build in the 'Toolchains' tab.

Cannot compile the BB10 sample native app "HelloWorldDisplay" in Momentics

I'm having trouble compiling the HelloWorldDisplay native appusing the Momentics IDE.
I have followed through the Getting Started guide on the BB10 native SDK developer pages:
https://developer.blackberry.com/native/beta/documentation/getting_started.html
I downloaded the sample apps and attempted to import and build the HelloWorldDisplay app by right clicking it and selecting build.
The build fails and the following console output is displayed:
**** Build of configuration Device-Debug for project HelloWorldDisplay ****
make all
make -j 1 -CDevice-Debug -fmakefile all
make[1]: Entering directory `C:/Users/pro-cln0042/Downloads/Code/BB10Examples/HelloWorldDisplay/Device-Debug'
make[1]: Leaving directory `C:/Users/pro-cln0042/Downloads/Code/BB10Examples/HelloWorldDisplay/Device-Debug'
make[1]: *** No rule to make target `HelloWorldDisplay', needed by `all'. Stop.
make: *** [all] Error 2
**** Build Finished ****
Was I wrong in thinking that Momentics was supposed to handle this automatically, and that I should just be able to right-click->build without settings up any compilers, build files etc?
I'm new to BB development and Eclipse/Momentics in general. Any advice on how to resolve these errors would be much appreciated.
Your link returns a 404 Not Found error. I suspect you have set up an old development environment. Go to the BB10 Beta 2 site and download the NDK from there an follow the instructions. The PlayBook and BB10 NDKs are based on Momentics but have substantial customization to support development for BlackBerry (especially BB10). Since it is in Beta it is a moving target and you have to keep your IDE and simulators up to date.

Error while compiling tossim in tiny OS

When I try to compile TOSSIM in tiny OS v-2.0.2 , this is the error that it is giving me:
# make micaz sim
Makefile:2: /opt/tinyos-2.1.0/support/make/Makerules: No such file or directory
make: *** No rule to make target `/opt/tinyos-2.1.0/support/make/Makerules'. Stop.
How to remove this error?
Did you run a ./configure ? This is usually the config script used by make files, but sometimes people use strange build systems so I'd look around in the project's root directory for something else relating to configuring or installing. There should also be a text file called 'INSTALL' which helps.
The usual build commands are:
./configure
make
make install clean