Xcode 10 fatal error: lipo: can't open input file - objective-c

I'm building a static library in objective-c, in Xcode 9 I could build without problem but I'm blocked in Xcode 10.
Initially I had these two problems that I resolved with the answers below
Xcode 10 Error: Multiple commands produce
Xcode 10: unable to attach DB error
Now I have this lipo error, and I already tried the solution of adding arm64 to the valid architecture and build only valid architecture
build settings pictures
** BUILD SUCCEEDED **
fatal error: lipo: can't open input file: /Users/Alex/Library/Developer/Xcode/DerivedData/myNewLibrary-gvpwgkkoffdnkybybgkafnqwepcx/Build/Products/Debug-iphoneos/arm64/myNewLibrary/myNewLibrary (No such file or directory)
Command PhaseScriptExecution failed with a nonzero exit code
Anyone have idea how to resolve ? thanks

Related

Building C++ Pybind11 extension with setuptools and CMake generates .so directory

I am trying to use setuptools to install a C++ library with a Pybind11 interface using CMake. For using CMake with setuptools, I am using the code in the following answer: Extending setuptools extension to use CMake in setup.py?
I am able to build the library by hand with cmake.
Unfortunately however, when executing pip install . in the root directory of my project, the build fails.
While the first call to cmake (self.spawn(['cmake', str(cwd)] + cmake_args)) finishes without any error, executing the second call (self.spawn(['cmake', '--build', '.'] + build_args)) gives me the following error:
/users/thoerman/miniconda3/envs/postproc_np_products/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot open output file /users/thoerman/postproc_np_products/build/lib.linux-x86_64-cpython-37/postproc_ops_cpp.cpython-37m-x86_64-linux-gnu.so: Is a directory
collect2: error: ld returned 1 exit status
gmake[3]: *** [/users/thoerman/postproc_np_products/build/lib.linux-x86_64-cpython-37/postproc_ops_cpp.cpython-37m-x86_64-linux-gnu.so] Error 1
gmake[2]: *** [CMakeFiles/postproc_ops_cpp.dir/all] Error 2
gmake[1]: *** [CMakeFiles/postproc_ops_cpp.dir/rule] Error 2
gmake: *** [postproc_ops_cpp] Error 2
But when running the exact same commands on the command line inside the build_temp directory, everything works just fine.
Does anyone have a hint for me, what might be going wrong?
After further digging into the problem, I found the solution myself.
The problem was with the lines
extdir = pathlib.Path(self.get_ext_fullpath(ext.name))
extdir.mkdir(parents=True, exist_ok=True)
This created a directory for the target to be built. Building the target then failed, since there was already a directory with the same name.
I was able to solve it by replacing the second line as follows:
extdir.parent.mkdir(parents=True, exist_ok=True)

Error in Compiling DLPC3010 DLPC-API in jetson Nano

I am trying to compile DLPC Projector APIs in the jetson nano. However, it is throwing an error as in added snapshot. I came across one solution here. However it is not being helpful.
DLPC-APS - https://www.ti.com/tool/DLPC-API
ig#ig-desktop:~/Desktop/Texas Instruments/DLPC-API-1.8/samples/dlpc654x_samples/build$ cmake ../
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ig/Desktop/Texas Instruments/DLPC-API-1.8/samples/dlpc654x_samples/build
ig#ig-desktop:~/Desktop/Texas Instruments/DLPC-API-1.8/samples/dlpc654x_samples/build$ make
[ 4%] Building C object CMakeFiles/libdlpc654x_sample.dir/home/ig/Desktop/Texas_Instruments/DLPC-API-1.8/api/dlpc_common.c.o
cc: error: unrecognized command line option ‘-m32’
CMakeFiles/libdlpc654x_sample.dir/build.make:75: recipe for target 'CMakeFiles/libdlpc654x_sample.dir/home/ig/Desktop/Texas_Instruments/DLPC-API-1.8/api/dlpc_common.c.o' failed
make[2]: *** [CMakeFiles/libdlpc654x_sample.dir/home/ig/Desktop/Texas_Instruments/DLPC-API-1.8/api/dlpc_common.c.o] Error 1
CMakeFiles/Makefile2:88: recipe for target 'CMakeFiles/libdlpc654x_sample.dir/all' failed

Kotlin native; compilation failed: cannot run msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/clang++

I use Windows 7 and followed Get started with Kotlin/Native using the command-line compiler, downloaded kotlin-native-windows-1.5.10.zip and added its bin to the PATH of system. But when I try kotlinc-native hello.kt -o hello, get this error:
error: compilation failed: Cannot run program "C:\Users\<user-name>\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/clang++": CreateProcess error=193, %1 is not a valid Win32 application
What is the problem and how I can solve that?
Edit:
It seems the problem is caused by clang++.exewhich is in
C:\Users\<user-name>\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/
because when I try to run it, I get this error:
clang++ is not a valid Win32 application

I can not build VLCkit

I am trying to build VLCkit with below instruction
https://wiki.videolan.org/VLCKit/
but I met an error which I do not understand as below
[[1;32minfo[0m] Preparing build dirs
Current branch master is up to date.
clang: error: no input files
clang: error: no input files
clang: error: no input files
[[1;32minfo[0m] Building tools
/Users/apple/01_workspace/02_video/VLCKit/buildVLCKit.sh: line 38: pushd: extras/tools: No such file or directory
Could you help me to explain what is this error, and how can I fix it?
I am using Mac OS Sierra version 10.12.6 and Xcode Version 8.3.3

iOS 9 specific linker error with respect to WebKit.framework

I am receiving the following linker error on iOS 9 and above. I am stuck with this issue for quite sometime. Any help would be appreciable.
ld: file not found: /System/Library/PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have fixed this issue my removing WebKit.framework from the project's file system and again adding it only thru Build phases.