[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: rocm-hipamd/5.2.3-11 -- Heterogeneous Interface for Portability



Thanks Étienne,

On 7/20/23 13:53, Étienne Mollier wrote:
	$ hipcc main.cpp -o main
	dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)

This seems to be caused by the dpkg-architecture invocation when
gcc is missing in the minimal test environment:

	$ dpkg-architecture -qDEB_HOST_GNU_CPU
	dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)
	x86_64
	# apt-get install gcc -y
	[…]
	$ dpkg-architecture -qDEB_HOST_GNU_CPU
	x86_64

The fix/workaround would be for hipcc to depend on gcc, or just
the testbed if there really is no reason for hipcc to strongly
depend on gcc apart from avoiding the warning

I'm not sure cross-compiling would work anyway, so could just query DEB_BUILD_GNU_CPU. Though, I suppose I might as well try to handle this as if it did. It seems reasonable to me to use the compiler we already have available and to just set CC=clang-15. That seems to resolve the issue and we already know that clang-15 will be available.

On 7/20/23 14:40, Christian Kastner wrote:
If the warning can safely be ignored, redirecting stderr in that one
call would also be sufficient, right?

That is a valid option. You just need 2>/dev/null in the backticks. However, I like the CC=clang-15 option better because it won't hide other errors.

I've uploaded my changes to mentors. If you see any issues with this approach, please let me know.

Sincerely,
Cory Bloor


Reply to: