I'm trying to compile Valgring3.16.1 with aarch64-linux-gnu-gcc (for xilinx zynq-mp board)
the ./configure stage passed ok.
when I run:
make CC= ..... /bin/aarch64-linux-gnu-gcc
I got this error:
aarch64-linux-gnu-gcc: error: unrecognized command line option '-m64'
How can I fix it?
any help will be appreciated,
Tzipi Kluska
If you need to change compiler or flags, you should do that when you run configure, not when you run make. Otherwise configure sees and detects a different environment than what you get with make.
The docs have the answer you ask for.
-m64 is available for other architectures than AArch64.
If you need the "Machine-Dependent Options" you should read AArch64 options.
Related
mac OS X has failed to generate a make file and gives me a problem
DOLATs-MacBook-Air:~ dolatsingh$ cd Documents/ardupilot/ArduCopter/
DOLATs-MacBook-Air:ArduCopter dolatsingh$ make apm2
// BUILDROOT=/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build HAL_BOARD=HAL_BOARD_APM2 HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_AVR_APM2 TOOLCHAIN=AVR EXTRAFLAGS=-DGIT_VERSION="705d3d56"
%% AP_State.o
**cc1plus: error: unrecognized command line option "-std=gnu++11"
make: ***** [/var/folders/16/slzp9s_s741cb0cgqtcddc_h0000gn/T/ArduCopter.build/AP_State.o] Error 1
i have checked GCC version and it's 4.2.1
You'll need to upgrade your IDE (if you're using the Arduino IDE).
Since version 1.5.8 of the IDE, GCC has been version 4.8.1. However, you'll need to manually enable it with the command line switch you were using.
If you grab the latest (1.6.2 and above, currently 1.6.9) C++11 is enabled by default.
How can I increase the verbosity of the build process?
Bazel seems to print compiler commands only if something goes wrong during the build.
I would like to see which compiler comands the cc_library rule fires, even if everything seems to be fine, to debug linking problems.
I already tried various bazel command line parameters but nothing gives me the compiler commands :(
This is probably what you are looking for:
bazel build --subcommands //my:target
The --subcommands option causes Bazel's execution phase to print the full command line for each command prior to executing it.
Useful information taken from Envoy's bazel readme (https://github.com/envoyproxy/envoy/blob/master/bazel/README.md)
When trying to understand what Bazel is doing, the -s and --explain options are useful. To have Bazel provide verbose output on which commands it is executing:
bazel build -s //source/...
To have Bazel emit to a text file the rationale for rebuilding a target:
bazel build --explain=file.txt //source/...
To get more verbose explanations:
bazel build --explain=file.txt --verbose_explanations //source/...
Maybe you can generate the compile_commands.json file. I have created Shell scripts (under Linux) to automate that: https://github.com/vincent-picaud/Bazel_and_CompileCommands.
You might also find the following useful in addition to the accepted answer of using --subcommands (-s):
bazel build --subcommands --verbose_failures //my:target
The --verbose_failures option causes Bazel's execution phase to print the full command line for commands that failed.
Although it would seem the --subcommands option supercedes it given it is documented to display prior to command execution, I have found cases (with bazel 5.2.0) where for a failing command, --subcommands alone shows only a portion of the command along with <remaining N arguments skipped>. Using both --subcommands and --verbose_failures displays the full command line in these cases.
I'm not sure whether or not this question has a causality with my previous question.
So, I compiled Qt 5.3.1 from source with MinGW 4.8.2. The build stopped at qtbase/src/printsupport directory, as you can see the image below:
Is it a bug or something at qtbase/src/printsupport/kernel/qprintengine_win.cpp file? Then, should I just report it to the developer?
Look here it give you a hint. Probably somewhere you use this key -Werror in make files implicitly or explicitly when start compilation with gcc. If I correct understand error in that switch operation must be default: statement or case PPK_CustomBase: statement.
miraiE,
If you will notice in your output: cc1plus.exe: all warnings being treated as errors
This is, as was mentioned before, a warning that is stopping the compile process as an error.
You should be able to run you configure.bat script again, with the option -no-warnings-are-errors.
Then re-run your make.exe to get past this, and other warnings, from stopping the build.
Details of the specific configure options below:
../qtbase-opensource-src-5.3.1/configure --help |grep -i warn
-silent ............ Reduce the build output so that warnings and errors
-no-warnings-are-errors Make warnings be treated normally
-warnings-are-errors Make warnings be treated as errors
I hope this helps!
I want to compile a source code but I have trouble in compile.
cc -O2 -Olimit 2000 -g -migrate -assume -Zp1 noaligned_objects ...
cc: error: 2000: No such file or directory
cc: error: noaligned_objects: No such file or directory
cc: error: unrecognized command line option ‘-migrate’
cc: error: unrecognized command line option ‘-assume’
cc: error: unrecognized command line option ‘-Zp1’
Start with compiling it with no system-specific flags (i.e. by using gcc possibly with -I, -L, and -l flags and nothing else). If the program in question is portable enough, then it will be a matter of getting all dependencies available for it.
Once you are able to build it, see if it runs as expected (ignore performance). If it doesn't, that would be a good time to look at the flags you used on DEC to see if it requires any special treatment when building. This is where you either make the program portable or try to get the equivalent behavior using gcc on the target architecture of your choice.
Finally, once the program builds and runs, that would be a good time to see if you want to use any optimization flags (hint: you don't have to. If it runs fine, leave it the way it is).
Perhaps a very trivial question:
I need to compile a program as 64-bit (earlier makefile written to compile it as 32-bit).
I saw the option -m32 appearing in command line parameters with each file compilation. So, I modified the makefile to get rid of -m32 in OPTFLAG, but again when the program compiles, I still see -m32 showing up and binaries are still 32-bit. Does this m32 come from somewhere else as well?
-m32 can only be coming from somewhere in your makefiles, you'll have to track it down (use a recursive grep) and remove it.
When I am able to force -m64, I get "CPU you selected does not support x86-64 instruction set".Any clues?. uname -a gives x86_64
That error means there is an option like -march=i686 in the makefiles, which is not valid for 64-bit compilation, try removing that too.
If you can't remove it (try harder!) then adding -march=x86-64 after it on the command line will specify a generic 64-bit CPU type.
If the software you are trying to build is autotools-based, this should do the trick:
./configure "CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64" && make
Or, for just a plain Makefile:
env CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 make
If you are using CMake, you can add m64 compile options by this:
add_compile_options(-m64)