Ubuntu 编译时出现错误cc1: error: ‘-fcf-protection’ is not compatible with this target

ubuntu 20.04编译时报cc1: error: ‘-fcf-protection’ is not compatible with this target错误,

原因: 由于ubuntu将-fcf-protection该选项配置为全局开启,因此会出现该错误,下面是linux 官方给出的原因:
The new Ubuntu gcc packages turn on -fcf-protection globally, which causes a build failure in the x86 realmode code:

这是linux kernel修复该补丁邮件原文:cc1: error补丁来往邮件

解决方法: 在gcc 编译时添加选项 -fcf-protection=none 即可;如

 gcc -fcf-protection=none hello.c
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
解释这些参数optional arguments: -h, --help show this help message and exit --host HOST --port PORT --config-installer Open config web page, mainly for windows installer (default: False) --load-installer-config Load all cmd args from installer config file (default: False) --installer-config INSTALLER_CONFIG Config file for windows installer (default: None) --model {lama,ldm,zits,mat,fcf,sd1.5,cv2,manga,sd2,paint_by_example,instruct_pix2pix} --no-half Using full precision model. If your generate result is always black or green, use this argument. (sd/paint_by_exmaple) (default: False) --cpu-offload Offloads all models to CPU, significantly reducing vRAM usage. (sd/paint_by_example) (default: False) --disable-nsfw Disable NSFW checker. (sd/paint_by_example) (default: False) --sd-cpu-textencoder Run Stable Diffusion text encoder model on CPU to save GPU memory. (default: False) --local-files-only Use local files only, not connect to Hugging Face server. (sd/paint_by_example) (default: False) --enable-xformers Enable xFormers optimizations. Requires xformers package has been installed. See: https://github.com/facebookresearch/xformers (sd/paint_by_example) (default: False) --device {cuda,cpu,mps} --gui Launch Lama Cleaner as desktop app (default: False) --no-gui-auto-close Prevent backend auto close after the GUI window closed. (default: False) --gui-size GUI_SIZE GUI_SIZE Set window size for GUI (default: [1600, 1000]) --input INPUT If input is image, it will be loaded by default. If input is directory, you can browse and select image in file manager. (default: None) --output-dir OUTPUT_DIR Result images will be saved to output directory automatically without confirmation. (default: None) --model-dir MODEL_DIR Model download directory (by setting XDG_CACHE_HOME environment variable), by default model downloaded to ~/.cache (default: /Users/cwq/.cache) --disable-model-switch Disable model switch in frontend (default: False)
06-09
这是一些可选参数,可以在命令行中使用来配置运行环境和模型选择等。下面是每个参数的解释: - -h, --help:显示帮助信息并退出。 - --host HOST:设置服务器主机地址。 - --port PORT:设置服务器端口号。 - --config-installer:打开配置页面,主要用于Windows安装程序(默认值为False)。 - --load-installer-config:从安装程序配置文件中加载所有命令参数(默认值为False)。 - --installer-config INSTALLER_CONFIG:Windows安装程序的配置文件路径(默认值为None)。 - --model {lama,ldm,zits,mat,fcf,sd1.5,cv2,manga,sd2,paint_by_example,instruct_pix2pix}:选择要使用的模型。 - --no-half:使用完整精度模型。如果生成的结果总是黑色或绿色,请使用此参数(仅适用于sd/paint_by_exmaple模型)(默认值为False)。 - --cpu-offload:将所有模型卸载到CPU上,大大减少vRAM的使用(仅适用于sd/paint_by_example模型)(默认值为False)。 - --disable-nsfw:禁用NSFW检查器(仅适用于sd/paint_by_example模型)(默认值为False)。 - --sd-cpu-textencoder:在CPU上运行稳定扩散文本编码器模型以节省GPU内存(默认值为False)。 - --local-files-only:仅使用本地文件,不连接到Hugging Face服务器(仅适用于sd/paint_by_example模型)(默认值为False)。 - --enable-xformers:启用xFormers优化。需要安装xformers软件包。请参见:https://github.com/facebookresearch/xformers(默认值为False)。 - --device {cuda,cpu,mps}:选择使用的设备(默认值为cuda)。 - --gui:将Lama Cleaner作为桌面应用程序启动(默认值为False)。 - --no-gui-auto-close:在GUI窗口关闭后防止后端自动关闭(默认值为False)。 - --gui-size GUI_SIZE GUI_SIZE:设置GUI窗口的大小(默认值为[1600,1000])。 - --input INPUT:如果输入为图像,则默认加载图像。如果输入为目录,则可以在文件管理器中浏览并选择图像(默认值为None)。 - --output-dir OUTPUT_DIR:自动将结果图像保存到输出目录,无需确认(默认值为None)。 - --model-dir MODEL_DIR:模型下载目录(通过设置XDG_CACHE_HOME环境变量),默认情况下模型下载到~/.cache(默认值为/Users/cwq/.cache)。 - --disable-model-switch:禁用前端的模型切换功能(默认值为False)。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值