Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove newline in hipconfig 5.7 ? #85

Closed
dindon-sournois opened this issue Oct 3, 2023 · 3 comments
Closed

Remove newline in hipconfig 5.7 ? #85

dindon-sournois opened this issue Oct 3, 2023 · 3 comments
Assignees
Labels

Comments

@dindon-sournois
Copy link

dindon-sournois commented Oct 3, 2023

The hipconfig from version 5.7 automatically adds a newline which wasn't here from previous hipcc version:

 $ ml hip/5.6.0
 $ hipconfig --cpp_config
 -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I/opt/rocm-5.6.0/include -I/opt/rocm-5.6.0/llvm/bin/../lib/clang/16.0.0  $ #no newline

 $ ml -hip hip/5.7.0
 $ hipconfig --cpp_config
 -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I/opt/rocm-5.7.0/include -I/opt/rocm-5.7.0/llvm/lib/clang/17.0.0
  $ #newline

The --newline, -n option seems a bit useless then. But the issue we have is with legacy autotools build system where FLAGS="$(hipconfig --cpp_config) $FLAGS in configure.ac would generate a Makefile with a newline between the output of hipconfig and $FLAGS, leading to Makefile syntax errors.

@dgaliffiAMD dgaliffiAMD added the hipcc Related to HIPCC label May 4, 2024
@lamb-j lamb-j transferred this issue from ROCm/HIPCC May 14, 2024
@ppanchad-amd
Copy link

@dindon-sournois Created internal ticket to investigate this issue. Thanks!

@schung-amd
Copy link

Hi @dindon-sournois, thanks for reporting this issue. This is a known issue that has been resolved internally, but the fix is not available yet (targeted for ROCm 6.2). The user reporting this issue worked around it by trimming the newline off the output themselves; quoting the user, "My workaround was something like export CXXFLAGS="$(hipconfig -C | tr -d '\n')".

As this has been addressed internally, I'll be closing this issue.

@lamb-j
Copy link
Collaborator

lamb-j commented Jul 29, 2024

Fixed by f5eb17a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants