I am trying to build openh264 for ios. I have downloaded the source code from the latest release. then changed the PREFIX in makefile to ios_local. After that I did make OS=ios ARCH=arm64 which completed with lot of warning.
After that when I did sudo make OS=ios ARCH=arm64 install It exited with error like below
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libopenh264.2.0.0.dylib] Error 1
After researching it seems like Apple does not support libstdc++ now, so mac os compatible version is libc++ which is supposed to be installed when you install XCode. My XCode version is Version 10.2.1 (10E1001) which is more than enough to get this libc++ I think.I am using macOS Mojave. What's going wrong here?
Related
I am currently trying to compile a cpp program with openmp. From what I have read online this is the command that I need to use for indeed using openmp on apple silicon:
g++ -Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/14.0.6/include -L/usr/local/lib -lomp heat2D.cpp
I have installed everything required for openmp (libomp,llvm,etc...) but it gives me this error:
ld: library not found for -lomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In addition if try to remove the lomp flag:
g++ -Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/14.0.6/include heat2D.cpp
this is the error i get:
Undefined symbols for architecture arm64:
"_omp_set_num_threads", referenced from:
_main in heat2D-0b5aaa.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Since you mention that you installed GCC (and LLVM) via Homebrew, the problem is probably (as Jim Cownie suggested) that when you type "g++", you are running the default link to Apple's LLVM installation (which, alas, does not support OpenMP).
The problem is that Homebrew installs its versions of the compiler binary commands using versioned names -- e.g., "g++-12" if you installed the latest version of GCC. So you have to use those names if you want to run the Homebrew versions. (They are probably installed in /opt/homebrew/bin/ in your case, since you have an Apple Silicon Mac.)
(I haven't installed Homebrew's version of LLVM, but it's probably a similar situation for that as well, since you wouldn't want it to overwrite Apple's LLVM commands.)
I have a flutter project which uses a plugin written by a colleague (which is not there anymore). I develop on Mac M1.
Since I upgraded to Flutter 2.5, I cannot start my app on iOS in Debug-Mode.
It says
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I remove the dependency to this plugin, everything works.
I tried the following:
Change architecture-settings in xcode
Delete derived data
Delete podfile
Upgrade all dependencies
run pod repo-update
Does anyone have an idea?
Thanks!
I have no idea how to get around to fixing this.
I have a feeling it might be related to RealmJS but i have tried everything from their issues page on github.
I have tried, downgrading Realm, cleaning the project, restart xcode, restart the whole computer, I even removed the pods and lockfile end reinstalled the pods.
and yes i am using the .xworkspace file
177 more errors
...
duplicate symbol _OBJC_IVAR_$_GCDWebServerURLEncodedFormRequest._arguments in:
/Users/henk/Library/Developer/Xcode/DerivedData/WhosThat_app-axxkmftwrprdsnaxtynfzrtgsvca/Build/Products/Debug-iphonesimulator/libGCDWebServers.a(GCDWebServerURLEncodedFormRequest.o)
/Users/henk/Library/Developer/Xcode/DerivedData/WhosThat_app-axxkmftwrprdsnaxtynfzrtgsvca/Build/Products/Debug-iphonesimulator/libRealmReact.a(GCDWebServerURLEncodedFormRequest.o)
ld: 177 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
React-native: 0.59.8
Realm: 3.2.0, 3.1.0 , 2.8.0
Xcode: 10.1
This is a linking error with RealmJS. You might find it easier to use RealmJS 3.4.0 or higher as these versions now include CocoaPods which handle all the linking for you. I had the same issue and unfortunately I could not fix it on lower versions of RealmJS but upgrading to RealmJS 3.4.2 and using CocoaPods to link the library fixed it for me.
I have migrated my old working iOS project from Swift 2.3 to Swift 4, I am getting build failed with the error below:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and the warning below:
missing required architecture x86_64 in file ISHPullUp.framework/ISHPullUp
Note that:
I have updated the project's carthage to the latest versions of frameworks.
the framework I'm using and mentioned is ISHPullUp
I am getting this warning and error only when building for iPhone simulator unlike using iPhone physical device.
Am I missing something?
thanks in advance
After installing the Cocoapods files, this linker error occured:
ld: malformed 32-bit x.y.z version number: 0.5.0.5149
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Apparently that's a problem with CocoaPods 0.38.1, try updating to at least 0.38.2 (latest as of writing).