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

Compilation Error: clang-15: error: cannot specify -o when generating multiple output files #7

Open
yulingao opened this issue Jul 16, 2024 · 2 comments

Comments

@yulingao
Copy link

When attempting to compile hip-analyzer, I encountered the following error:

[  1%] Generating gpu_pass_instr.ll
clang-15: error: cannot specify -o when generating multiple output files
make[2]: *** [CMakeFiles/gpu_pass_instr.dir/build.make:73: gpu_pass_instr.ll] Error 1
make[1]: *** [CMakeFiles/Makefile2:253: CMakeFiles/gpu_pass_instr.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

This issue appears to be caused by specifying the -o option while the hipcc compiler generates multiple output files. Removing the -o gpu_pass_instr.ll option might resolve the issue, but I am seeking a more appropriate solution or guidance on how to handle this correctly.

Could you please provide assistance or a fix for this issue?

@Sebdar
Copy link
Collaborator

Sebdar commented Jul 16, 2024

Hi !
It seems that hipcc will always generate multiple llvm module files if you leave out the default targets. I did not have this problem since I have a amd_targets.lst in my home directory, with a single architecture :

gfx90a

You can use this as a temporary workaround. I will update the readme file soon with the appropriate fixes. You will also probably run into some weird behavior on your kernels since I'm currently running a modified version of LLVM. I'll do my best to ensure everything is documented as soon as possible.

@yulingao
Copy link
Author

Hi,

Thank you for your suggestion. I have added an amd_targets.lst file in the hip-analyzer home directory with the following content:

gfx906

However, I am still encountering the same error. Could you clarify if there are any other modifications needed to the build environment or LLVM version being used?

Thank you for your help.

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

No branches or pull requests

2 participants