首页 > 其他分享 >MAC make编译报错 “clang: error: unsupported option '-fopenmp'”

MAC make编译报错 “clang: error: unsupported option '-fopenmp'”

时间:2024-05-13 17:32:58浏览次数:33  
标签:gcc option make mt fopenmp seed 报错 php

编译报错

➜  php_mt_seed-main make
gcc -Wall -march=native -mtune=generic -O2 -fomit-frame-pointer -funroll-loops -fopenmp php_mt_seed.c -o php_mt_seed
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
make: *** [php_mt_seed] Error 1

解决参考:
https://www.jianshu.com/p/3ab95219f573#comments

查看自己gcc版本,修改Makefile文件的gcc版本

➜  php_mt_seed-main ls /usr/local/Cellar/gcc
12.2.0 13.1.0

➜  php_mt_seed-main gcc-12 --version
gcc-12 (Homebrew GCC 12.2.0) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

修改Makefile文件

CC = gcc-12
RM = rm -f
......

编译成功

➜  php_mt_seed-main make
gcc-12 -Wall -march=native -mtune=generic -O2 -fomit-frame-pointer -funroll-loops -fopenmp php_mt_seed.c -o php_mt_seed
php_mt_seed.c:47:2: warning: #warning AVX-512 not enabled. Try gcc -mavx512f (on Intel Knights Landing, Skylake-X, or some newer). [-Wcpp]
   47 | #warning AVX-512 not enabled. Try gcc -mavx512f (on Intel Knights Landing, Skylake-X, or some newer).
      |  ^~~~~~~
-macosx_version_min has been renamed to -macos_version_min

标签:gcc,option,make,mt,fopenmp,seed,报错,php
From: https://www.cnblogs.com/rab3it/p/18189647

相关文章

  • Docker执行命令报错:Cannot connect to the Docker daemon at unix:///var/run/docker.
    1、问题说明Docker执行重新启动命令重启成功。命令如下:重新加载配置systemctldaemon-reload重启docker服务systemctlrestartdocker.service查看启动状态systemctlstatusdocker.service显示启动成功使用docker-v命令查看版本号输出正常但是使用dockerps......
  • 宝塔:续签SSL证书报错error_result: During secondary validation
    宝塔上的SSL证书有时候忘了到期前续签,导致续签时候报错:error_result:Duringsecondaryvalidation:或者 该帐户1小时内失败的订单次数超过5次,请等待1小时再重试! 点击SSL当前证书,续签证书处理,是无效的。因此要换种方式: 解决方法如下:1.点击SSL选项框内的“证书夹”选项,删......
  • cmakelist的一个例子
    一个例子,仅做参考用: CMAKE_MINIMUM_REQUIRED(VERSION3.12)set(ProjName"NetworkTest")project(${ProjName})string(FIND${CMAKE_CURRENT_BINARY_DIR}"/"pos0REVERSE)MATH(EXPRpos0${pos0}+1)string(SUBSTRING${CMAKE_CURRENT_BINARY_DIR}${po......
  • dbeaver连接mysql报错Public Key Retrieval is not allowed
    这个错误通常发生在尝试通过JDBC连接MySQL数据库时,并且是由于MySQL的配置不允许公钥检索导致的。从MySQL5.0开始,连接时默认需要使用密钥进行密码加密传输。如果JDBC驱动程序尝试通过不允许公钥检索的方式进行连接,就会抛出这个错误。解决方法:更新JDBC连接字符串,添加允许公钥检......
  • 手动执行SQL触发器id自增报错处理方式
      一、查询出触发器创建的sqlSELECTdbms_metadata.get_ddl('TRIGGER','TRI_XXX_STORAGE','XSY')AStrigger_sql FROMdual; 二、删除触发器DROPTRIGGERXSY.TRI_XSY_STORAGE;三、创建触发器CREATEORREPLACETRIGGERTRI_XSY_STORAGEBE......
  • minio依赖报错
    引入minio-sdk后启动报错现象一1缺失kotlin.collections.ArraysKt.copyInto([B[BIII)[B解决方法提升kotlin-stdin依赖<dependency><groupId>org.jetbrains.kotlin</groupId><artifactId>kotlin-stdlib</artifactId><version>1.3.70</......
  • ROS2:报错:package 'turtle_tf2_py' not found
    在学习tf坐标变换的乌龟小实验中,运行乌龟仿真程序出现的报错问题分析:原因还是没有先source一下解决:首先source/opt/ros/galactic/setup.bash然后再运行乌龟ros2launchturtle_tf2_pyturtle_tf2_demo.launch.py  参考:github上的一个老哥的回答   顺带......
  • Pgsql报错修复
     1   这里更改安装目录bin下面例如E:\WorkingSoftware\PostgreSql\16\bin 更改权限,下面都改下  2如果安装时提示databse出错,就初始化下 E:\WorkingSoftware\PostgreSql\16\bin\pg_ctl.exe-DE:\WorkingSoftware\PostgreSql\16\datainitdb ......
  • npm install 报错 ---》npm ERR! request to https://registry.npmjs.org/react faile
    1、npminstall报错E:\wsg\AWC_TEST\stage>npminstallreactreact-domnpmERR!codeCERT_NOT_YET_VALIDnpmERR!errnoCERT_NOT_YET_VALIDnpmERR!requesttohttps://registry.npmjs.org/reactfailed,reason:certificateisnotyetvalidnpmERR!Acomplete......
  • mysql使用group by查询报错SELECT list is not in GROUP BY clause and contains nona
    官方解释:ONLY_FULL_GROUP_BY是MySQL数据库提供的一个sql_mode,通过这个sql_mode来保证,SQL语句“分组求最值”合法性的检查.这种模式采用了与Oracle、DB2等数据库的处理方式。即不允许selecttargetlist中出现语义不明确的列.对于用到GROUPBY的select语句,查出......