When I tried to compile SeaBIOS version 1.14 with a little touch of SMBIOS cpu speed modifications I got 3 errors, and a warning, here's the errors and warnings I got
clang-14: error: unknown argument: '-mpreferred-stack-boundary=2'
clang-14: error: unsupported option '-freg-struct-return' for target 'armv7a-unknown-linux-android24'
clang-14: error: the clang compiler does not support '-march=i386'
clang-14: warning: optimization flag '-fno-merge-constants' is not supported [-Wignored-optimization-argument]
make: *** [Makefile:141: out/src/misc.o] Error 1
SeaBIOS is an x86 program, and you appear to be trying to compile it with a compiler that creates Arm binaries. You need to use an x86 compiler (possibly a cross-compiler, if you really want to compile it on an Arm host).
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..
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.
I download the source code of asterisk on my macbook pro, which the OS X version is 10.9 ,then following the README.txt to compile it, but it failed ,and then I tried almost all the release version, but all the compiled results are the same, the compile error is as following,please help me to check it ,and how can I compile it on Mavericks; Appreciate!
ranlib libmxml.a gcc -o menuselect menuselect.o strcompat.o
menuselect_stub.o mxml/libmxml.a Generating input for menuselect
... menuselect/menuselect --check-deps menuselect.makeopts
menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules ...
[CC] stereorize.c ->
stereorize.o error: invalid value '6' in '-O6' make[1]: *
[stereorize.o] Error 1 make: [utils] Error 2
"-O4" nor "-O3" work...
sh-3.2# make ASTCFLAGS="-O4" [LD] chan_iax2.o iax2-parser.o iax2-provision.o -> chan_iax2.so
ld: lto: could not merge in
iax2-parser.o because 'Linking globals named 'ast_tvdiff_sec': symbol
multiply defined!', using libLTO version 'LLVM version 3.3svn, from
Apple Clang 5.0 (build 500.2.79)' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: * [chan_iax2.so] Error 1
make: * [channels] Error 2
I'm working with Point Cloud Library. It's mostly in C++ When I compile it, gives such error:
[ 0%] Building CXX object common/CMakeFiles/pcl_common.dir/src/intersections.cpp.o
In file included from /home/lv/pcl-trunk/common/include/pcl/point_types.h:301:0,
from /home/lv/pcl-trunk/common/include/pcl/common/impl/common.hpp:41,
from /home/lv/pcl-trunk/common/include/pcl/common/common.h:186,
from /home/lv/pcl-trunk/common/include/pcl/common/intersections.h:41,
from /home/lv/pcl-trunk/common/src/intersections.cpp:38:
/home/lv/pcl-trunk/common/include/pcl/impl/point_types.hpp:1009:68: warning: ‘SHOT’ is deprecated [-Wdeprecated-declarations]
/tmp/ccRLy4Re.s: Assembler messages:
/tmp/ccRLy4Re.s:2488: Error: no such instruction: `vfmadd312ss (%r9),%xmm2,%xmm1'
/tmp/ccRLy4Re.s:2638: Error: no such instruction: `vfmadd312ss (%rdx),%xmm2,%xmm1'
/tmp/ccRLy4Re.s:3039: Error: no such instruction: `vfmadd312ss (%rax,%r11,4),%xmm5,%xmm1'
/tmp/ccRLy4Re.s:3402: Error: no such instruction: `vfmadd312ss (%rax,%r11,4),%xmm5,%xmm1'
/tmp/ccRLy4Re.s:3534: Error: no such instruction: `vfmadd312ss (%rax,%rdx,4),%xmm1,%xmm2'
/tmp/ccRLy4Re.s:3628: Error: no such instruction: `vfmadd312ss (%rax,%rdx,4),%xmm1,%xmm2'
/tmp/ccRLy4Re.s:6103: Error: no such instruction: `vfmadd312ss (%r11),%xmm0,%xmm4'
/tmp/ccRLy4Re.s:6121: Error: no such instruction: `vfmadd312ss (%r11,%rbx,4),%xmm0,%xmm3'
/tmp/ccRLy4Re.s:6131: Error: no such instruction: `vfmadd312ss (%r11,%rbp,4),%xmm0,%xmm2'
/tmp/ccRLy4Re.s:6135: Error: no such instruction: `vfmadd312ss (%r11,%r13,4),%xmm0,%xmm1'
/tmp/ccRLy4Re.s:6344: Error: no such instruction: `vfmadd312ss (%r10),%xmm0,%xmm1'
/tmp/ccRLy4Re.s:11760: Error: no such instruction: `vfnmadd312ss (%rdx),%xmm0,%xmm0'
/tmp/ccRLy4Re.s:13976: Error: no such instruction: `vfmadd312ss (%rdi),%xmm0,%xmm1'
/tmp/ccRLy4Re.s:14125: Error: no such instruction: `vfmadd312ss (%rdx),%xmm0,%xmm1'
make[2]: *** [common/CMakeFiles/pcl_common.dir/src/intersections.cpp.o] Error 1
make[1]: *** [common/CMakeFiles/pcl_common.dir/all] Error 2
make: *** [all] Error 2
Could anyone tell me how to read these errors and give me some suggestions to solve?
You can use the command below to see what is your CPU (for the compiler):
gcc -march=native -Q --help=target | grep march
Then you can add your cpu type in the ccmake CMAKE_CXX_FLAGS option, for me:
CMAKE_CXX_FLAGS = -march=corei7-avx
You can add -march=native -mno-avx This worked for me.
In my CMakeLists.txt, I added the above to the CMAKE_CXX_FLAGS :
SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -std=c++0x -march=native -mno-avx")
[Source can be found in this page.]
I faced this issue when trying to install glove.
The problem I faced was resolved by upgrading the g++ version installed in my ubuntu 14.04 machine.
My original g++ version was 4.6.4 and I upgraded it to the g++-5 (5.4.1 when I upgraded it).
There are error message from assembler, which means assembler doesn't know these assembly code, for example vfmadd312ss.
This happens when compiler generate some CPU only assembly code, for example intel E5 with arch core-avx2 have extra instruction set advanced vector extensions, but if "as" is tool old to know the new CPUs, this error would happen.
Try a new version Binutils, the latest is 2.29 now.
If you compile code from another tool, for example bazel, make sure it will call the new "as".
Have you tried using a different compiler?
I had assembler errors in a project using Point Cloud Library. It was possibly due to using Ubuntu 12.04 on an core i7 processor (see https://github.com/uzh-rpg/rpg_svo/issues/7).
I was able to compile by installing the 'clang' compiler
sudo apt-get install clang
and then running cmake with:
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .
I have met the same error messages,
I removed the -march=native from CXXFLAGS and CFLAGS in my makefile,
it works in my case. But since you didn't put out your makefile, I am not sure this will works in your case, any way you can have a try.
You probably need to enable advanced vector extensions when compiling (and use toolchain that supports this). Try -march=core-avx2 or something similar.
If you compiled library yourself, it is possible you need to configure it to not use AVX.