-
Notifications
You must be signed in to change notification settings - Fork 18
Add back LLVM and link symengine with it. #69
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
Draft
luca-heltai
wants to merge
1
commit into
master
Choose a base branch
from
llvm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we will have two instances of
llvm 15installed: one through the ubuntu repository and one through backports 9.6.0. I am not sure whether there will be linking conflicts happening again later when building deal.II.I believe that there must be a simpler way to enable llvm in symengine by using the already installed package. Simply specifying
WITH_LLVM=ONdid not work as I had tried before. Maybe providingLLVM_DIRas a cmake variable could do the trick, which need to point to the llvm installation of backports. But for this we need to know where llvm is installed via backports. I didn't get around to find it yetThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this worked. I don't think two are installed, if the same one is already installed, apt does not install it twice, I think.
The current dealii/dealii:master-noble is built with this and it went through. Where was this failing? In user codes, or in the building of the library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem was that both llvm and llvm-15 were installed (which are two different packages). If they both depend on llvm-15, I think we are safe.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It failed during linking the deal.II library (EDIT: issue manifests at runtime, not during linking). There were duplicate symbols defined from multiple llvm installations.
On the dependencies image, we install
libllvm15onjammyandlibllvm19onnobleaccording to the raw logs. We are not safe installing llvm-15 on all versions.symengine would like to find
LLVMConfig.cmakeorllvm-config.cmakesomewhere. My take on this is the following: We need to figure out if those files are already located somewhere on our dependencies docker image, and specify the path viaLLVM_DIR. If thelibllvmpackage does not provide these files, we need to install the correspondingllvmpackage of the same version.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, to be precise, it does not fail on linking, but at run time. I could compile and link step-40 with no problems. However, I see the error you point to at run time. I thought it was a linking error, but it's actually a running error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. My recollection of the issue is cloudy. It appears at runtime. Running some tests in the deal.II testsuite should also trigger the error.
I am surprised that the test on jammy in dealii/code-gallery#229 also failed when we install
libllvm15andllvm-15, even though one is a dependency of the other.