ROCm/flang

Error Compiling alarm3f.c

kwryankrattiger opened this issue · 4 comments

This currently does not build with the latest llvm-amdgpu provided clang

runtime/flang/alarm3f.c

extern int alarm();

should be

extern int alarm(int);

ref.
https://www.man7.org/linux/man-pages/man2/alarm.2.html

@estewart08 @srekolam

i think you are looking at the master branch
https://github.com/ROCm-Developer-Tools/flang/blob/master/runtime/flang/alarm3f.c

whereas aomp uses branch aomp-dev
https://github.com/ROCm-Developer-Tools/flang/blob/aomp-dev/runtime/flang/alarm3f.c

we maintain the aomp-dev branch, the master branch is more a less a reference from 1+ years ago

please try the 5.2.1 source
https://github.com/ROCm-Developer-Tools/aomp/archive/refs/tags/rocm-5.2.1.tar.gz

or 15.0-3 source
https://github.com/ROCm-Developer-Tools/aomp/releases/download/rel_15.0-3/aomp-15.0-3.tar.gz

issues is fixed with

commit 57ac6f3
Author: estewart08 ethan.stewart@amd.com
Date: Tue Mar 15 20:49:05 2022 -0500

Fix conflicting types for alarm issue on centos-9 build. (#45)

Sounds good, since it got fixed I will close this. I still need to make the older versions build so I will just cut a patch from that commit. Thanks!