Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 897778 - dev-util/hip-5.1.3-r4 fails to compile (HARDENED-SYSTEM): comgrctx.hpp:26:10: fatal error: amd_comgr.h: No such file or directory
Summary: dev-util/hip-5.1.3-r4 fails to compile (HARDENED-SYSTEM): comgrctx.hpp:26:10:...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-26 07:22 UTC by Agostino Sarubbo
Modified: 2023-11-20 02:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,122.42 KB, text/plain)
2023-02-26 07:22 UTC, Agostino Sarubbo
Details
diff of amd_comgr.h (file_897778.txt,88.04 KB, text/plain)
2023-03-13 21:38 UTC, Nels Larsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-26 07:22:02 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/hip-5.1.3-r4 fails to compile (HARDENED-SYSTEM).
Discovered on: amd64 (internal ref: hardened_tinderbox)

NOTE:
(HARDENED-SYSTEM) in the summary means that the bug was found on a machine that runs an hardened profile with -D_FORTIFY_SOURCE=3 and -D_GLIBCXX_ASSERTIONS (https://www.gentoo.org/support/news-items/2023-01-01-hardening-fortify-assertions.html) but this bug MAY or MAY NOT BE related to the changes related to hardened.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-26 07:22:04 UTC
Created attachment 854682 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-26 07:22:05 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/cmake/../device/devprogram.hpp:32:10: fatal error: amd_comgr/amd_comgr.h: No such file or directory
/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/comgrctx.hpp:26:10: fatal error: amd_comgr/amd_comgr.h: No such file or directory
/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/devprogram.hpp:32:10: fatal error: amd_comgr/amd_comgr.h: No such file or directory
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/blit.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/comgrctx.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/devhostcall.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/device.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/devkernel.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/devprogram.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/devwavelimiter.cpp.o 
FAILED: src/CMakeFiles/rocclr.dir/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/hwdebug.cpp.o 
fatal: not a git repository (or any parent up to mount point /var/tmp)
/var/tmp/portage/dev-util/hip-5.1.3-r4/work/ROCclr-rocm-5.1.3/device/comgrctx.hpp:26:10: fatal error: amd_comgr/amd_comgr.h: No such file or directory
Comment 3 Nels Larsen 2023-03-13 21:36:06 UTC
Do not believe I am on a hardened system, but I did get a warning during install of hip5.1.3-r4. I can upload files, but I am not trying to grab this thread from OP. 

 * QA Notice: The following files contain writable and executable sections
 *  Files with such sections will not work properly (or at all!) on some
 *  architectures/operating systems.  A bug should be filed at
 *  [Removed link] to make sure the issue is fixed.
 *  For more information, see:
 * 
 *    [Removed link]
 * 
 *  Please include the following list of files in your report:
 *  Note: Bugs should be filed for the respective maintainers
 *  of the package in question and not hardened@gentoo.org.
 * RWX --- --- usr/lib64/libamdhip64.so.5.1
 * RWX --- --- usr/lib64/libhiprtc-builtins.so.5.1


I can install dev-util/hip-5.3.3-r3 with no issues.  

When hip-5.1.3-r4 is installed:
running:
find /usr | grep amd_comgr.h && find my_portage_dir | grep amd_comgr.h
returns:
/usr/include/amd_comgr.h
when hip-5.3.3-r3 is install returns:
/usr/include/amd_comgr/amd_comgr.h
/usr/include/amd_comgr.h

The files are quite different.  Attached the results of 
diff /usr/include/amd_comgr/amd_comgr.h /usr/include/amd_comgr.h

While not a permanent solution or possibly correct, I was able to complete hip-5.1.3-r4 install by using a symlink:
mkdir /usr/include/amd_comgr/
ln -s /usr/include/amd_comgr.h /usr/include/amd_comgr/amd_comgr.h
Comment 4 Nels Larsen 2023-03-13 21:38:23 UTC
Created attachment 857535 [details]
diff of amd_comgr.h

Output of command:
diff /usr/include/amd_comgr/amd_comgr.h /usr/include/amd_comgr.h
when hip-5.3.3-r3 is installed
Comment 5 Yiyang Wu 2023-03-14 04:12:02 UTC
I guess this issue only occurs when building with rocm-comgr-5.1.3 since it does not have /usr/include/amd_comgr/amd_comgr.h

For >=rocm-comgr-5.3, there are /usr/include/amd_comgr/amd_comgr.h and /usr/include/amd_comgr.h, the later one it's just a wrapper
Comment 6 Benda Xu gentoo-dev 2023-11-20 02:35:30 UTC
(In reply to Nels Larsen from comment #3)
> Do not believe I am on a hardened system, but I did get a warning during
> install of hip5.1.3-r4. I can upload files, but I am not trying to grab this
> thread from OP. 
> 
>  * QA Notice: The following files contain writable and executable sections
>  *  Files with such sections will not work properly (or at all!) on some
>  *  architectures/operating systems.  A bug should be filed at
>  *  [Removed link] to make sure the issue is fixed.
>  *  For more information, see:
>  * 
>  *    [Removed link]
>  * 
>  *  Please include the following list of files in your report:
>  *  Note: Bugs should be filed for the respective maintainers
>  *  of the package in question and not hardened@gentoo.org.
>  * RWX --- --- usr/lib64/libamdhip64.so.5.1
>  * RWX --- --- usr/lib64/libhiprtc-builtins.so.5.1

Hi Nels, this is tracked by https://bugs.gentoo.org/836272. Thanks!
Comment 7 Benda Xu gentoo-dev 2023-11-20 02:36:43 UTC
(In reply to Yiyang Wu from comment #5)
> I guess this issue only occurs when building with rocm-comgr-5.1.3 since it
> does not have /usr/include/amd_comgr/amd_comgr.h
> 
> For >=rocm-comgr-5.3, there are /usr/include/amd_comgr/amd_comgr.h and
> /usr/include/amd_comgr.h, the later one it's just a wrapper

Then rocm-comgr-5.1.3 should be dropped.