1
1
数学库
fatal error: 'cmath' file not found
2024-12-23 16:09:21
219

测试环境:
openeuler-2403系统将DTK-24.04.3-CentOS8.5-x86_64.tar解压安装到/opt/dtk-24.04.3,执行source /opt/dtk-24.04.3/env.sh

下载https://github.com/zjin-lcf/HeCBench.git
cd HeCBench-master/src/fft-hip

[ fft-hip]$ make
hipcc -std=c++14 -Wall -I../fft-cuda -O3 -c main.cu -o main.o

In file included from In file included from In file included from <built-in>  <built-in>  <built-in> :::111:
:
/opt/dtk-24.04.3/llvm/lib/clang/15.0.0/include/__clang_hip_runtime_wrapper.h/opt/dtk-24.04.3/llvm/lib/clang/15.0.0/include/__clang_hip_runtime_wrapper.h/opt/dtk-24.04.3/llvm/lib/clang/15.0.0/include/__clang_hip_runtime_wrapper.h:::505050:::101010::: fatal error: fatal error: fatal error: 'cmath' file not found'cmath' file not found'cmath' file not found

#include <cmath> 
#include <cmath>  ^~~~~~~#include <cmath> 

     ^~~~~~~         ^~~~~~~

1 error generated when compiling for gfx926.
11 error error generated generated when compiling for when compiling for gfx928gfx906.
.
make: *** [Makefile:51: main.o] Error 1

备注: 使用DTK-23.10-openEuler22.03-x86_64.tar.gz 同样有这个问题。

全部评论(11)
只看楼主
R
renzhc
1楼
您可以检查下系统cmake版本,试试更换cmake版本为3.29是否还有问题
2024/12/23
网
网友01FoDP
回复 @renzhc

您好,测试还是有问题,如下所示:

[iscas@localhost fft-hip]$ cmake --version

cmake version 3.29.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

[iscas@localhost fft-hip]$ make

hipcc -std=c++14 -Wall -I../fft-cuda -O3 -c main.cu -o main.o

In file included from <built-in>:1:

/opt/dtk-23.10/llvm/lib/clang/15.0.0/include/__clang_hip_runtime_wrapper.h:50:10: fatal error: 'cmath' file not found

#include <cmath>

^~~~~~~

1 error generated when compiling for gfx906.

make: *** [Makefile:51: main.o] Error 1

2024/12/23
R
renzhc
回复 @renzhc
执行find /opt -name cmath* 以及find /usr -name cmath看看系统中有没有cmath
2024/12/24
R
renzhc
回复 @renzhc
另外也检查下gcc --version吧
2024/12/24
全部10条回复
没有更多内容了
--
楼主
Level.1
0 帖子
楼主热帖
暂无数据