unable to build and install openH264 video codec for ios - ios

I'm trying to install openH264 for ios. Here are the steps I run from the openH264's current directory using terminal:
$ make OS=ios ARCH=armv7
The default location of openh264 installation was set /usr/local in the makefile. So, I just ran the following command
$make install
But I got this error:
nasm -DUNIX64 -DPREFIX -f macho64 -Icodec/common/x86/ -o codec/encoder/core/x86/coeff.o codec/encoder/core/x86/coeff.asm
nasm: fatal: unrecognised output format `macho64' - use -hf for a list
type `nasm -h' for help
make: *** [codec/encoder/core/x86/coeff.o] Error 1
I am following this instructions also to build the codec. Besides after successful installation I have to include it into pjsip for video support.
I don't know what is the problem with the command? Thanks in advance.

With help of this I solved it.
Just run :
$sudo make OS=ios ARCH=arm64 install
for arm64 architecture. Change the ARCH value to armv7, armv7s for devices and i386 and x86_64 for the simulator. By default it installed in /usr/local/lib directory. I used sudo to get admin privilege as at the end of complication it throwing error that permission denied to mkdir -p /usr/local/lib .

Related

Espressif tool chain broken after macOS Monterey 12.3 beta 3 install

After Monterey 12.3 beta 2 installed, the Espressif tool chain is broken. If you compile with platformIO you'll get the following error:
^
Linking .pio/build/esp32dev/firmware.elf
/Users/stephanedeluca/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: /Users/stephanedeluca/.platformio/packages/toolchain-xtensa32/bin/../libexec/gcc/xtensa-esp32-elf/5.2.0/liblto_plugin.so: error loading plugin: dlopen(/Users/stephanedeluca/.platformio/packages/toolchain-xtensa32/bin/../libexec/gcc/xtensa-esp32-elf/5.2.0/liblto_plugin.so, 0x0002): Library not loaded: /opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/libstdc++.6.dylib
Referenced from: /Users/stephanedeluca/.platformio/packages/toolchain-xtensa32/libexec/gcc/xtensa-esp32-elf/5.2.0/liblto_plugin.0.so
Reason: tried: '/opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/libstdc++.6.dylib' (no such file)
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1
Looking at my Mac, there is no /opt/osxcross.
I have searched on another Mac with the beta 1 where the tool chain was still working the presence of the folder, and guess what?! there's none!
Any idea what as actually broken by the beta?
Finally, here is a work around: we are going to provide the missing /opt/osxcross folder and contents.
If you do not have gcc installed (this should be unlikely though, install gcc to get the folder content, as follows:
$ brew install gcc
Create the missing /opt/osxcross folder as follows:
$ sudo mkdir -p /opt/osxcross/target/bin/../x86_64-apple-darwin12/lib/
Note that you'll be prompted for your password.
And, finally, copy the folder contents from the gcc build as follows:
$ sudo cp /usr/local/Cellar/gcc/11.2.0_3/lib/gcc/11/libstdc++.6.dylib /opt/osxcross/target/x86_64-apple-darwin12/lib/libstdc++.6.dylib
This completes the fix.
You must restart vscode, Arduino IDE or whatever tool you use. And then build your project, which should compile successfully.
And voila.

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 ..

React native iOS build issue An application bundle was not found at the provided path

I am very new to react native. I have created a Hello World project and unable to run it on iOS. Every time when i run the project for iOS it throws the following error(s)
** BUILD FAILED **
The following build commands failed:
CompileC /Users/usman/FunZoneAppsProjects/{ProjectName}/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTShadowView+Internal.o Views/RCTShadowView+Internal.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/{ProjectName}.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/{ProjectName}.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/{ProjectName}.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:621:11)
at Object.execFileSync (child_process.js:639:13)
at Promise.then (/Users/usman/FunZoneAppsProjects/{ProjectName}/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
I have read many people resolved this issue with different fixes but none of them worked for me. What can be the issue? TIA
I think this is connected with the new xcode version. Try opening your project in xcode. Go to File->Project Settings and choose Legacy build. Then try to rebuild your project.
What worked for me on mac OS Big Sur and Xcode 12 was,
Delete package-lock.json file.
Run npm install and cd ios && pod install && cd ..
Then opened the .xcworkspace file from Xcode and it worked.
First of all you should be secure that brew, node and watchman are installed. After that, try to follow these steps.
Delete your actual project, close simulator, xcode and run on the path folder of your project watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean. Finally, close the command line
Create a folder in desktop named RNProjects. Open the command line and run cd Desktop/RNProjects.
Run in the command line react-native init myProjectName. You can name the project as you want. You should change "myProjectName" for the desired project name.
After installation is completed (it takes a couple of minutes), be sure that in the command line you are in the path RNProjects and then run cd myProjectName. If you gave the project a different name, just replace "myProjectName" for the real project name.
Finally, just run react-native run-ios. Let me know if you want to test it in a real iDevice.
EDIT 1
If brew, node or watchman are not installed yet, follow this
For HOMEBREW follow this link. you should paste that at a Terminal prompt. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After that run brew install node
Then run brew install watchman
Then run npm install -g react-native-cli
Install Xcode command line tools follow this link

FreeRadius fails to install at ./config

I'm trying to install FreeRadius 3.0.15. I'm on Ubuntu 16.04. I downloaded FreeRadius 3.0.15 from the official downloads page.
My issue is that when I go into the file and try to run sudo ./configure, the process terminates on
configure: error: "inconsistent LDFLAGS between -lssl '' and -lcrypto '-L/var/lib/docker/aufs/diff/2472245c805ac63cb1eebc4df9c07ec6ee975313e737a5183d41504f3d3f5f9b/usr/lib/x86_64-linux-gnu -Wl,-rpath,/var/lib/docker/aufs/diff/2472245c805ac63cb1eebc4df9c07ec6ee975313e737a5183d41504f3d3f5f9b/usr/lib/x86_64-linux-gnu'"
See `config.log' for more details
What does it mean for the LDFLAGS to be inconsistent, and how can I fix this error?
I was able to fix this error by reinstalling lcrypto with sudo apt-get install libssl-dev. However, I'm now getting a new error:
configure: WARNING: FAILURE: rlm_rediswho requires: hiredis.h libhiredis.
So now I'm going to try to figure that out.
EDIT: figured out second error. Fixed with sudo apt-get install libhiredis-dev
In short, this was all just dependency issues.

Unable to build OpenSSL for iOS Simulator

I'm trying to build OpenSSL for iOS Simulator with the following steps:
(MackBook Pro, OS X Version 10.10.5v + Xcode Version 7.2)
$ mkdir openssl
$ cd openssl
$ wget http://www.openssl.org/source/openssl-1.0.2e.tar.gz
$ tar xvzf openssl-1.0.2e.tar.gz
$ cd openssl-1.0.2e
$ mkdir /tmp/openssl-1.0.2e-i386
$ ./configure BSD-generic32 --openssldir=/tmp/openssl-1.0.2e-i386
$ vi Makefile
Make the following changes:
1) Replace
"CC= gcc"
with
"CC= /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch i386"
2) Append
"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"
to the end of
"CFLAG= ..."
$ make
However, the following error occurs:
ld: building for OSX, but linking against dylib built for iOS, file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libSystem.dylib' for architecture i386
Can someone tell me what is wrong?
Solved this issue by referring other question.
I added "-miphoneos-version-min=6.0" to CFLAG and the issue has gone.
Thanks.
The error is one that you receive whenever you're importing and trying to link an OSX app to an iOS system library. There are many differences between the two platforms, and the libraries are not interchangeable. You're running a line to change the location of the library file that is pulled for the project. Ensure that the library you're pointing to has slices for the system architecture you're trying to build for (i386, in this case).

Resources