Makefile.unix error unrecognized command line option “-std=c++03” - c++

When I run make -f makefile.unix it gives me an error like this:
cc1plus: error: unrecognized command line option "-std=c++03"
Then I tried the following command: make -f makefile.unix CXXFLAGS="-std=c++0x" and still the same error is showing up.
I'm using g++ 4.3.3 because the software requires to do so.
Anyone any idea how to approach this?

Related

Bazel Build Permission denied

Recently, I'm trying to learn the NVidia Isaac which is built by Bazel.
While I was following the document here:
https://docs.nvidia.com/isaac/isaac/doc/getting_started.html#running-an-application
I encountered an error kept saying the cpp files Bazel need to build is "Permission denied".
The error message looks like below:
Use --sandbox_debug to see verbose messages from the sandbox
gcc: error: engine/alice/components/Subprocess.cpp: Permission denied
gcc: fatal error: no input files
compilation terminated.
ERROR: /home/acas/HDD/CatDog/Isaak/engine/alice/BUILD:23:1: Couldn't build file engine/alice/_objs/impl/ReplayBridge.o: C++ compilation of rule '//engine/alice:impl' faed (Exit 1) crosstool_wrapper_driver_is_not_gcc_host.py failed: error executing command external/toolchain/crosstool/scripts/crosstool_wrapper_driver_is_not_gcc_host.pyD_DEFAULT_SOURCE -U_FORTIFY_SOURCE -fstack-protector -Wall -Werror -B/usr/bin -Wunused-but-set-parameter ... (remaining 183 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
gcc: error: engine/alice/components/ReplayBridge.cpp: Permission denied
gcc: fatal error: no input files
compilation terminated.
ERROR: /home/acas/HDD/CatDog/Isaak/engine/gems/image/BUILD:42:1: Couldn't build file engine/gems/image/_objs/cuda_conversions/yuv2rgb.cu.o: error while parsing .d file:root/.cache/bazel/_bazel_root/6ab44b9a455585caa8f9f5f55ddd002b/execroot/com_nvidia_isaac/bazel-out/k8-opt/bin/engine/gems/image/_objs/cuda_conversions/yuv2rgb.cu.d (No ch file or directory)
gcc: error: engine/gems/image/cuda/yuv2rgb.cu.cpp: Permission denied
gcc: warning: '-x c++' after last input file has no effect
gcc: fatal error: no input files
compilation terminated.
Target //apps/samples/stereo_dummy:stereo_dummy failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.627s, Critical Path: 0.62s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
FAILED: Build did NOT complete successfully
And so much the same "Permission denied" error.
I've tried root, sudo, but none of that works.
Is anyone has the same Bazel problem (I think this problem is not about NVidia Isaac but Bazel)?

Is it possible to compile c++ using Clang only on windows?

I really tried a lot. Clang does not come with standard C++ includes, and obviously can not find them :
clang++ file.cpp -o file.out
C:\Folder\file.cpp:1:11: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
Passing the mingw includes by arguments, it returns another error:
clang++ -target x86_64-w64-mingw32 C:\Folder\file.cpp -IC:\MinGW\mingw64\lib\gcc\x86_64-w64-mingw32\6.3.0\include\c++ -IC:\MinGW\mingw64\lib\gcc\x86_64-w64-mingw32\6.3.0\include\c++\x86_64-w64-mingw32 -IC:\MinGW\mingw64\x86_64-w64-mingw32\include -o C:\Folder\file.out -std=c++11
clang++.exe: error: unable to execute command: program not executable
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
When I use -c it does not use the linker and also not generate an executable file.
Edit : I'm running on windows
Run your commands from "x64 Native Tools Command Prompt for VS 2017", or something similar. It will setup some required env vars for you.

Vikit_common - Installation failed - Raspberry Pi 2 B

I'm working an a project of drone and I'm having an issue with my Raspberry Pi 2 B. When I'm trying to install vikit_common, I've this on screen :
pi#raspberrypi ~/workspace/rpg_vikit/vikit_common/build $ cmake ..
-- Eigen found (include: /usr/include/eigen3)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/workspace/rpg_vikit/vikit_common/build
pi#raspberrypi ~/workspace/rpg_vikit/vikit_common/build $ make
[ 7%] Building CXX object CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o
cc1plus: error: bad value (native) for -march switch
cc1plus: error: unrecognized command line option ‘-mmmx’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse2’
cc1plus: error: unrecognized command line option ‘-msse3’
cc1plus: error: unrecognized command line option ‘-mssse3’
cc1plus: error: bad value (native) for -march switch
cc1plus: error: unrecognized command line option ‘-mmmx’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse2’
cc1plus: error: unrecognized command line option ‘-msse3’
cc1plus: error: unrecognized command line option ‘-mssse3’
CMakeFiles/vikit_common.dir/build.make:57: recipe for target 'CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o' failed
make[2]: *** [CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o] Error 1
CMakeFiles/Makefile2:168: recipe for target 'CMakeFiles/vikit_common.dir/all' failed
make[1]: *** [CMakeFiles/vikit_common.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
I have Cmake installed (sudo apt-get cmake), Gcc (4.6.3) and OpenCV.
How can I solve the problem ?
Apparently you have an incorrect cmake configuration
A quick gcc 4.6.3 man says
-march=
This specifies the name of the target ARM architecture. GCC uses this name to determine what kind of instructions it can use when
generating assembly code. This option can be used in conjunction with
or instead of the `-mcpu=' option. Permissable names are: ‘armv2’, ‘armv2a’, ‘armv3’, ‘armv3m’, ‘armv4’,‘armv4t’, ‘armv5’, ‘armv5t’, ‘armv5e’, ‘armv5te’, ‘armv6’, ‘armv6j’, ‘armv6t2’,‘armv6z’, ‘armv6zk’, ‘armv6-m’, ‘armv7’, ‘armv7-a’, ‘armv7-r’, ‘armv7-m’,‘iwmmxt’, ‘iwmmxt2’, ‘ep9312’
Firstly looks like you have a wrong value for -march.
So check your cmake configuration

Why won't this C++ program compile and run? [duplicate]

This question already has answers here:
How can I compile and run C/C++ code in a Unix console or Mac terminal?
(19 answers)
Closed 6 years ago.
I tried to run a basic C++ file in the terminal:
#include <iostream>
using namespace std;
int main() {
cont << "This is my first C++ program!";
return 0
}
And then tried to run it in the terminal:
make learningCPP.cpp
make: *** No rule to make target `learningCPP.cpp'. Stop.
And tried:
make learningCPP
make: *** No rule to make target `learningCPP'. Stop.
And tried:
gcc learningCPP.cpp -o learningCPP.out
clang: error: no such file or directory: 'learningCPP.cpp'
clang: error: no input files
Here is the entire Bash/Clang file:
Last login: Mon May 25 07:49:21 on console
make learningCPP.cpp
make: *** No rule to make target `learningCPP.cpp'. Stop.
make learningCPP
make: *** No rule to make target `learningCPP'. Stop.
gcc learningCPP.cpp -o learningCPP.out
clang: error: no such file or directory: 'learningCPP.cpp'
clang: error: no input files
$ g++ -o lab21 learningCPP.cpp
-bash: $: command not found
$ ./lab21
-bash: $: command not found
./learningCPP.cpp
-bash: ./learningCPP.cpp: No such file or directory
./main
-bash: ./main: No such file or directory
$ g++ -o main learningCPP.cpp
-bash: $: command not found
cpp
make learningCPP.cpp
run
How can I fix it?
Judging by the errors, your file either isn't called learningCPP.cpp, or isn't in the directory you're trying to compile it from.
Rename it so it has that name, or change directory to its location, then the build command is
g++ learningCPP.cpp -o learningCPP
not gcc, and with no spurious $ before it. Alternatively, as long as the source file is present in the working directory, you could use make learningCPP.
Once that succeeds, run the program with
./learningCPP
although you'll have to read the new error messages, and use that to figure out how to fix the syntax errors, before it will compile.

python installation "cc1.exe: error: unrecognized command line option '-mno-cygwin'"

Hi guys i'm trying to install rrdtool (for PYTHON 2.7) on my windows 7 system , i install it using this command line.
python setup.py install build --compiler=mingw32
it gives me the following output:
running install
running build
running build_ext
running build_configure
building 'rrdtoolmodule' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Irrdtool-1.4.7/src -IC:\Python2
7\include -IC:\Python27\PC -c rrdtool-1.4.7/bindings/python/rrdtoolmodule.c -o b
uild\temp.win32-2.7\Release\rrdtool-1.4.7\bindings\python\rrdtoolmodule.o
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
i have tried many solutions to solve this, but had no success.i'm using mingw version 4.6.2
can anyone pls help me .
See this answer: https://stackoverflow.com/a/6035864/1516291
you need to edit distutils\cygwinccompiler.py in your Python directory to remove all instances of -mno-cygwin
good luck