gcc: error: unrecognized command line option '-m64'
时间: 2024-06-06 21:07:19 浏览: 791
This error message typically indicates that the "-m64" option is not supported by the version of gcc installed on your system.
This option is used to generate code for a 64-bit architecture. If your system is a 32-bit system, then this option may not be available.
To resolve this issue, you can try removing the "-m64" option from your command line arguments and see if the code compiles without it. Alternatively, you can try upgrading your gcc installation to a version that supports the "-m64" option.
相关问题
在make prepare时报错aarch64-none-linux-gnu-gcc: error: unrecognized argument in option '-mcmodel=kernel' aarch64-none-linux-gnu-gcc: note: valid arguments to '-mcmodel=' are: large small tiny aarch64-none-linux-gnu-gcc: error: unrecognized command-line option '-mno-sse'; did you mean '-fno-dse'? aarch64-none-linux-gnu-gcc: error: unrecognized command-line option '-mno-mmx' aarch64-none-linux-gnu-gcc: error: unrecognized command-line option '-mno-sse2' aarch64-none-linux-gnu-gcc: error: unrecognized command-line option '-mno-3dnow' aarch64-none-linux-gnu-gcc: error: unrecognized command-line option '-m64' aarch64-none-linux-gnu-gcc: error: unrecognized command-line option '-mno-red-zone' scripts/Makefile.build:273: recipe for target 'scripts/mod/empty.o' failed具体如何解决
这个错误可能是由于编译器版本不兼容或编译选项有误导致的。您可以尝试以下步骤来解决该问题:
1. 确认您使用的是正确版本的编译器。您可以尝试更新编译器或使用另一个版本的编译器。
2. 检查编译选项。在Makefile中,可能有一些选项需要根据您的编译器版本进行调整。 您可以尝试删除一些选项,或者添加一些适当的选项,例如:
-mcmodel=large
-mno-sse -fno-dse
-mno-mmx
-mno-sse2
-mno-3dnow
-mno-red-zone
3. 检查您的内核配置。您可以尝试禁用CONFIG_STRICT_KERNEL_RWX选项,并重新编译内核。
希望这些解决方案可以帮助您解决问题。
gcc: error: unrecognized command line option '--with-zlib' gcc: error: unrecognized command line option '--with-ssl'
这个错误通常是由于缺少 zlib 和 openssl 库导致的。你需要先安装这两个库,然后再重新编译应用程序。如果你使用的是 Linux 系统,可以尝试以下命令安装这两个库:
对于 Debian 和 Ubuntu 系统:
```
sudo apt-get install zlib1g-dev libssl-dev
```
对于 Red Hat 和 CentOS 系统:
```
sudo yum install zlib-devel openssl-devel
```
安装完成后,重新编译应用程序即可。
阅读全文
相关推荐
















