ffmpeg armv7s compile segmentation fault - c++

I use https://github.com/kewlbear/FFmpeg-iOS-build-script to compile ffmpeg,
but when i try to compile, for armv7s architecture i have next error
all other archs compile fine
clang: error: unable to execute command: Segmentation fault: 11 clang:
error: clang frontend command failed due to signal (use -v to see
invocation) Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM
3.6.0svn) Target: arm-apple-darwin14.3.0 Thread model: posix clang: note: diagnostic msg: PLEASE submit a bug report to
http://developer.apple.com/bugreporter/ and include the crash
backtrace, preprocessed source, and associated run script. clang:
note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed
source(s) and associated run script(s) are located at: clang: note:
diagnostic msg:
/var/folders/zk/wj2cn08s26x64nlzk3_kjnv80000gn/T/vp8-c6ec27.c clang:
note: diagnostic msg:
/var/folders/zk/wj2cn08s26x64nlzk3_kjnv80000gn/T/vp8-c6ec27.sh clang:
note: diagnostic msg:
******************** make: * [libavcodec/vp8.o] Error 254 make: * Waiting for unfinished jobs.... CC libavcodec/wmv2enc.o
Couple months ago all compiled without any errors.
Tried on couple versions of ffmpeg
Here is Clang -v
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0 Thread model: posix
and xcode version is Version 6.3.1 (6D1002)

I think i found a solution, as you can understand from this article http://www.cocoanetics.com/2014/10/xcode-6-drops-armv7s/ xcode doesn't have armv7s support for now, so armv7s will use armv7 version and it must not reduce performance.

Related

Error compiling minimal OpenCL example from LLVM documentation using clang

My goal is to use C++ code in OpenCL kernels, which has been, as far as I can tell, supported by clang for quite a while.
I am using clang 15.0.6 on my Ubuntu machine 22.04 and am trying to compile the examples found in the LLVM documentation here, the compiler is installed via the "official" script found here.
clang -v shows:
Ubuntu clang version 15.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;#m64
Selected multilib: .;#m64
Just like in the LLVM manual, I am trying to compile an empty kernel (kernel void k(){}) using this clang version, but it always throws a linker error:
$ clang test.cl
ld: error: undefined symbol: main
referenced by /lib/x86_64-linux-gnu/Scrt1.o:(\_start)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Surely I am missing something absolutely basic, but what it is?
Thanks in advance for any help!

I am getting Cmake compiler error "-lc++ and -lSystem"

Im trying to compile an c++ code using CMake but Im facing these errors ?
Couldnt manage to find any related content for these 2.
CMakeError.log is:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc
Build flags:
Id flags:
The output was:
1
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Library/Developer/CommandLineTools/usr/bin/c++
Build flags:
Id flags:
The output was:
1
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin20.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Im using Mac, OS X version: 11.0.1 and Apple clang version 12.0.0 (clang-1200.0.32.28)
Thanks in advance, but Im probably going to need some extra detailed information since it seems like not gonna get fixed by a simple version update..

Pybind11 doesn't work or C++ doesn't compile after upgrading to Mojave: -lstdc++ not found

I was able to install the pybind11 example here before I upgraded my MacOS. However, after I upgraded my MacOS to Mojave, when I compile the same example on that link, I see the following error:
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'g++' failed with exit status 1
Am I missing a linker command? I've searched online but couldn't find a solution.
I actually found the answer. I only needed to do
export MACOSX_DEPLOYMENT_TARGET=10.9
The installation went smoothly.

Code compilation under g++ compared to clang++

I have some code that compiles in -m32, -m64, -mx32 in g++, in clang++ it compiles -m32, -m64, -mx32 but -mx32 is unable to link emitting the error copied bellow.
Does any body has experience with the above situation ?
What should I look at ? Is a bug of clang++ ?
fatal error: error in backend: Cannot select: 0x5bd7ec8: ch = brind
0x5ba0fc8:1, 0x5ba0fc8 [ORD=1] [ID=10] 0x5ba0fc8: i32,ch = load
0x5ba3d20:1, 0x5c8c1e0, 0x5ba3f30 [ORD=1] [ID=9]
0x5c8c1e0: i32 = add 0x5bd80d8, 0x5ba33d8 [ORD=1] [ID=8] 0x5bd80d8:
i32 = shl 0x5ba3d20, 0x5ba30c0 [ORD=1] [ID=7] 0x5ba3d20: i32,ch =
CopyFromReg 0x56b46c0, 0x5bd6678 [ORD=1] [ID=5] 0x5bd6678: i32 =
Register %vreg188 [ID=1] 0x5ba30c0: i8 = Constant<2> [ID=4] 0x5ba33d8:
i32 = X86ISD::Wrapper 0x5bd6ca8 [ID=6] 0x5bd6ca8: i32 =
TargetJumpTable<0> [ID=3] 0x5ba3f30: i32 = undef [ID=2] In function:
_Z8toString3objbbi clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) Ubuntu clang version
3.5.0-4ubuntu2 (tags/RELEASE_350/final) (based on LLVM 3.5.0) Target: x86_64-pc-linux-gnux32 Thread model: posix clang: note: diagnostic
msg: PLEASE submit a bug report to http://bugs.debian.org/ and include
the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed
source(s) and associated run script(s) are located at: clang: note:
diagnostic msg: /tmp/main-eedcc1.cpp clang: note: diagnostic msg:
/tmp/main-eedcc1.sh clang: note: diagnostic msg:
******************** napl21.mk:91: recipe for target 'Debug/main.cpp.o' failed make[1]: * [Debug/main.cpp.o] Error 70
make[1]: Leaving directory '/home/gk/.codelite/workspace01/napl21'
Makefile:4: recipe for target 'All' failed make: * [All] Error 2 0
errors, 8 warnings
Versions of your g++ and clang++ could be quite useful. Architecture as well.
One possible explanation could be that you are trying to link binary objects and/or libraries, produced by different versions of compilers. For instance, some SUN C libraries with clang libraries.
Practical steps:
Do clean build
Get latest clang
Compile and see if it works
If not, come back with more details as per above :)

gcov error: Multiple sources for a single basic block

When I invoke gcov as follows it returns the following error message:
gcov -a -p dynamic-maps.gcda
Multiple sources for a single basic block: <path-to-file>/dynamic-maps.cpp != (in _ZN16AnalysisPipeline16AnalysisServices22calculate_dynamic_mapsERKNSt3__110shared_ptrINS_6Common16AnalysisRegistryEEERKN9Utilities6ImagesERKNS3_10TimeSeriesERKNS3_14T1ParameterFitE).
Invalid .gcno File!
Please can someone explain what the cause of this might be.
gcov -version returns:
LLVM (http://llvm.org/):
LLVM version 3.4svn
Optimized build.
Default target: x86_64-apple-darwin13.4.0
Host CPU: core-avx-i
The file was compiled using Xcode 5.1 on OS X Mavericks with the following version of clang:
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
Updating Xcode to version 6.1.1 has resolved the issue.