Contiki - Make Login Error - contiki

I am following the Get Started with Contiki tutorial from the Contiki web page. However, when i try to do a
make login
I get the following error
../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB0
../../tools/sky/serialdump-linux: 1: ../../tools/sky/serialdump-linux: Syntax error: Unterminated quoted string
make: *** [login] Error 2
I am using a CM5000 node which is compatible with sky platform. I am using Instant Contiki 3.0

The serialdump-linux file must be replaced if you got this error. Follow the steps:
Download the new serialdump-linux file from the web page:
https://github.com/cmorty/contiki/blob/pull/serialdump/tools/sky/serialdump-linux
Go to the directory /home/user/contiki/tools/sky
cd /home/user/contiki/tools/sky
Rename the current serialdump-linux file with the name serialdump-linux.bck
Copy the new serialdump-linux file in the directory /home/user/contiki/tools/sky
Change the permitions of the new serialdump-linux file with the command
chmod 775 serialdump-linux
Now, you can use the command make login with no problem
If you are using another platform different than sky, then you must replace the serialdump-linux file in the directory /home/user/contiki/tools/YOUR-PLATFORM
EDIT: Besides, you have to install one of the following packages:
sudo apt-get install lib32bz2-1.0
or
sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
Since serialdump-linux was compiled for 32 bit, and i have a 64 bit processor.

If you are working with Instant Contiki, you should update your local working copy:
cd contiki
git checkout master
git fetch origin
git pull master
Then if you already have the serialdump-linux binary, recompile:
cd tools/sky
rm serialdump-linux
make serialdump
mv serialdump serialdump-linux
chmod +x serialdump-linux
Then you should be able to run without any problem.

Related

How to fix Shell Script Invocation Error MapFileParser.sh: Permission denied in Xcode

I'm working on a IOS Game that I built using Unity and I'm trying to get it to build on Xcode. However I keep getting this Shell Script Invocation Error "/Users/masterolu/Downloads/ShoeJackCityBuilds/iOS/MapFileParser.sh: Permission denied".
I've tried to use chmod +x /Users/masterolu/Downloads/ShoeJackCityBuilds/iOS/MapFileParser.sh but for some reason my machine doesn't recognize the chomd command anymore. I tried to reinstall it by using sudo apt install --reinstall coreutils but in order to use apt I need a JDK(Java Developer Kit). So I install the latest JDK and when I try to reinstall chomd my terminal says "Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home/bin/apt" (-1)". At this point I decided it's best to come and ask for help.
Any ideas on how to fix this error in Xcode or how to install chomd so my app can run?
So, apparently Apple likes to disable the execution permission of all the shell scripts that have not been created on your machine (i.e. downloaded from web, cloned from repo) so what you have to do is to open a terminal inside the project folder and run chmod -x MapFileParser.sh, that should fix it.
I have also done it on the process_symbols.sh just to be sure it runs.
## EDIT ##
My solution for my gihub action was this as the -x version did not work correctly for my scenario.
- name: Update scripts permissions
run: |
pwd
sudo chmod 755 MapFileParser.sh
sudo chmod 755 process_symbols.sh
This works for me:
chmod 777 MapFileParser.sh

install MongoDB C++ Driver problem in ubuntu 16.04

I want to install MongoDB C++ Driver, so first is mongocxx
I follow this installation:
http://mongocxx.org/mongocxx-v3/installation/
but I can not pass step 4
when I run this in mongo-cxx-driver/build
sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
it shows
-- Auto-configuring bsoncxx to use MNMLSTC for polyfills since C++17 is inactive
CMake Error at src/mongocxx/CMakeLists.txt:37 (find_package):
By not providing "Findlibmongoc-1.0.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"libmongoc-1.0", but CMake did not find one.
Could not find a package configuration file provided by "libmongoc-1.0"
(requested version 1.13.0) with any of the following names:
[![enter image description here][1]][1]
libmongoc-1.0Config.cmake
libmongoc-1.0-config.cmake
Add the installation prefix of "libmongoc-1.0" to CMAKE_PREFIX_PATH or set
"libmongoc-1.0_DIR" to a directory containing one of the above files. If
"libmongoc-1.0" provides a separate development package or SDK, be sure it
has been installed.
second question,
Step 2: Choose a C++17 polyfill how can I set MNMLSTC/core?
does anyone can help me,I already trap here for a long time ?
my env:
mongo-c-driver 1.15.1
libmongoc-1.0
mongocxx-3.4.x
Cmake is complaining about not finding a package configuration file (xxx.cmake), probably because you didn't build libmongoc/libbson.
I've tried to reproduce your issue and hit the same problem when I only installed them (apt-get install), so my suggestion is that you get the sources and build them as described at: http://mongoc.org/libmongoc/current/installing.html
Here's the list of commands (with the latest version of mongo-c-driver=1.15.1) which I just tried and worked fine:
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.15.1/mongo-c-driver-1.15.1.tar.gz
tar xzf mongo-c-driver-1.15.1.tar.gz
cd mongo-c-driver-1.15.1
mkdir cmake-build
cd cmake-build
cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
make
sudo make install
At this point you can go back into mongocxx/build and run again the command you were stuck at:
cd ../../mongo-cxx-driver/build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..

PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' with Jenkins

I'm getting this warning when running the phpunit test suite in Jenkins pipeline.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' - /usr/lib/php/20160303/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name in Unknown on line 0
However this warning is not thrown when running the test suite directly in terminal.
I have PHP 7.1 in my system and this is the only PHP version I have installed. php7.1-sqlite3 is installed.
Thank you in advance.
As far as I have found out, there is a faulty file in /usr/local/lib called libsqlite3.so.0 which points to libsqlite3.so.0.8.6. I renamed the file in case it was needed for something. With the command:
cd /usr/local/lib
sudo mv libsqlite3.so.0 ./libsqlite3.so.0.back
But you can also delete it:
rm libsqlite3.so.0
The thread that lead me to the answer: link
This solved my problems, and I hope they solve yours as well :)
I had this same issue with PHP 7.1 on Ubuntu 16.04.
Running the following fixed the issue for me:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-sqlite3
Have you built SQLite from source? If yes, enable Column metadata and recompile with
CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
make
sudo make install
Have fun using the cutting edge SQLite.
Reference - https://www.sqlite.org/compile.html#enable_column_metadata

PJSIP Integration proper guiding step to run in xcode 7

I had tried to compile pjsip library.but getting error. when run
$ cd /pjproject-2.5.5
$ ./configure-iphone
//error: -bash: -bash: ./configure-iphone: Permission denied
$ chmod +x configure-iphone //then i tried this
$ ./configure-iphone
//error:-bash: ./configure-iphone: /bin/bash^M: bad interpreter: No such file or directory.
Please give me proper guide line by steps to
run pjsip ios project.
To compile pjsip for iPhone
1. Download source code from one of the following link :
http://www.pjsip.org/download.htm
http://trac.pjsip.org/repos/wiki/Getting-Started/Download-Source
2. Create a new file config_site.h in the project folder /pjlib/include/pj/ with the following code:
#define PJ_CONFIG_IPHONE 1
#include <pjconfig_site_sample.h>
3. To Build PJSIP
Open terminal:
$ cd /path/to/your/pjsip/dir
$ ./configure-iphone
You may get the following problems:
a) Permission denied
Solution: preface the login with sudo
or login as super user using su command and the type following command
$ su
Password:
# chmod 777 configure-iphone
# exit
b) -bash: ./configure-iphone: /bin/bash^M: bad interpreter: No such file or directory
(This error may come because in the configure-iphone file every line may have been appended by a character $ or may be a carriage return symbol)
To check this do as:
$ vim configure-iphone
(It wil open the vim editor)
To see the last character press escape(ESC:)set list
To quit vim press Esc:q
Then Eliminate
$ tr -d '\r' <configure-iphone >FILE.new
(It will create new file with name FILE. Now after that delete the configure-iphone file and rename FILE to configure-iphone using the following commands:)
$ rm configure-iphone
$ mv FILE.new configure-iphone
(Again confirm that new created file has 777 permission if no then assign from su- super user)
$ ./configure-iphone
Again there may be error in ./configure-iphone:
Permission denied
Solution : Assign 777 permission to the whole folder.
- $ cd .. (Go to the parent folder in which the PJSIP folder lies)
- $ su (login as super user)
- # chmod 777 * (It will assign 777 permission to the whole folder and its content)
Alternatively:
- $ chmod u+x configure-iphone
Again run $ ./configure-iphone command. This time every thing should work fine.
4. To make
make dep && make clean && make
Source: http://gaurav-iphone.blogspot.com.au/2011/09/compiling-pjsip.html
To compile pjsip for iOS you need to execute following commands:
cd path_to_pjsip
./configure-iphone ( or sudo ./configure-iphone )
make dep && make clean && make ( or sudo make dep && make clean && make)
That's it, you now have pjsip compiled for armv7 architecture. You may also look in this tutorial for more details: http://www.xianwenchen.com/blog/2014/06/09/how-to-make-an-ios-voip-app-with-pjsip-part-1/
To integrate PJSIP with Xcode,follow these steps.
step 1: Download PJSIP project file(.tar.bz2 or .zip file) from this link http://pjsip.org/download.htm
step 2: Extract the files into your Required path of your MAC.
step 3: Open the project folder and you will see,there is pjlib folder is there. Go to the Path pjlib/include/pj/ and create config_site.h file and PASTE the following contents into the file.
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
step 4: Now save and close the file. And Open the Terminal Now.
step 5: Open your project path in the terminal by cd /your_pjsip_path/
For Example: cd /Desktop/pjsip_2.5.5/
step 6: Now build and configure project by following commands.
step 7: ./configure-iphone
step 8: make dep && make clean && make
step 9: Now you can oepn the project using xcode 7 by Go to the path /pjsip_folder/pjsip-apps/src/pjsua/ios/pjsua.xcodeproj and open with xcode.
(or)
To integrate PJSIP Library with Xcode 7, you must follow official PJSIP instructions from their official website.
Source:https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone

linphone library compile issue xcode 7.3 MAC OS El Capitan v10.11.4

I have download linphone open source VoIP project from git.
Follow steps that given in link but i have stuck on one steps
Link host strings to simulator SDK
$ sudo ln -s /usr/bin/strings /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings
->I have checked below path
"/usr/bin/strings" and found that 'strings' not found and also another path not work '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings'
->When command run at that time it fail with below reason
ln: failed to create symbolic link '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings': No such file or directory
-> On Build I have received below output.
*******************************************************************************
This makefile is deprecated. Please see README.md for compilation instructions. Here are some equivalents:
Equivalent of make is: cd ../../ && ./prepare.py && make
Equivalent of make enable_gpl_third_parties=no is: cd ../../ && ./prepare.py -DENABLE_GPL_THIRD_PARTIES=NO && make
Equivalent of make enable_debug=yes is: cd ../../ && ./prepare.py -d && make
Equivalent of make enable_i386=yes is: cd ../../ && ./prepare.py all && make
Equivalent of make enable_zrpt=yes enable_opus=yes enable_ffmpeg is: cd ../../ && ./prepare.py -DENABLE_ZRTP=YES -DENABLE_OPUS=YES -DENABLE_FFMPEG=YES && make
*******************************************************************************
Below Link I have referred
1) https://libraries.io/github/mfrager/linphone-iphone
2)
https://github.com/BelledonneCommunications/linphone/blob/master/README.macos.md
3) https://ohthehugemanatee.org/blog/2015/10/01/how-i-got-el-capitain-working-with-my-developer-tools/
->I have checked below path "/usr/bin/strings" and found that 'strings' not found and also another path not work
Firstly you have to generate strings file at this path anyhow.
After that please check that whether your Xcode in Applications have name as Xcode.app or Xcode7.3.app
This makefile is deprecated. Please see README.md for compilation instructions.
For this error, it may occur because you are trying
$ make all
this command
Instead try this:
./prepare.py && make
For more info, regarding home-brews, etc, follow correctly(as you mentioned you'r following it):
building linphone-sdk
Also give all the permissions(rwxrwxrwx) to linphone-sdk directory and all other related files
I've followed this for iOS project.
Hope this will help you!
For HomeBrew make sure run:
brew update then
brew doctor
to double check. Also refer to http://www.successmonkey.co.nz/blog/building-linphone-for-ios
After the dependencies are installed run ./prepare.py and make to compile everything (had a easy fix in submodules/linphone/mediastreamer2/src/basemsfactory.cs) then use Xcode the build the final application.

Resources