-
Notifications
You must be signed in to change notification settings - Fork 31
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
Link error compiling with gcc #234
Comments
I think there's something else going on on your system that's triggering this link error. I just built OpenCilk on two different Linux systems, using gcc 11 on one and gcc 13 on the other. Both builds completed without issue. |
I can reproduce this on two Linux systems including SuperCloud. It is enough to use the system linker. I reproduced the failure with clang. On a Linux virtual machine running
configured like
and opencilk-project at revision 14f9bbe
|
I also tested things on Supercloud, using the default GCC version and system linker there, and I encountered no issues. On Supercloud, did you configure your CMake build the same way as you described in your previous message? |
I ran this command on a SuperCloud compute node:
and the error repeated. Differences are clang 14 instead of clang 15 (which is not on the compute nodes, only the login node) and architecture-specific tuning flags. |
While I try and replicate the error on my end, can you see whether this patch resolves the issue on your end?
|
Adding IPO to the component list fixes compilation for me on all three OS+cmake argument combinations that had been failing before. |
Glad to hear it! I'll make a PR with the change. |
Building OpenCilk with gcc (11 or 13) fails with an error linking bugpoint:
The problem is libLLVMTapirOpts.a (where llvm::computeFunctionBodyMemoryAccess is used) appears on the command line after libLLVMipo.a (where it is defined). Reordering the LLVM_LINK_COMPONENTS list in llvm/tools/bugpoint/CMakeLists.txt fixes the problem. That is not really the right solution because the list is alphabetical. It may be necessary to reimplement as much of computeFunctionBodyMemoryAccess as is needed within the Tapir components. It is otherwise not called outside of the files in libLLVMipo.a.
gcc interposes the collect2 pass between command line and linker. That may explain why building with clang works.
The text was updated successfully, but these errors were encountered: