-
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
base: master
Are you sure you want to change the base?
Conversation
| libgmp-dev \ | ||
| libgtest-dev \ | ||
| libmpc-dev \ | ||
| llvm-15 \ |
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 15 installed: 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=ON did not work as I had tried before. Maybe providing LLVM_DIR as 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 yet
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 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.
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.
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?
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.
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.
On the dependencies image, we install libllvm15 on jammy and libllvm19 on noble according to the raw logs. We are not safe installing llvm-15 on all versions.
symengine would like to find LLVMConfig.cmake or llvm-config.cmake somewhere. 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 via LLVM_DIR. If the libllvm package does not provide these files, we need to install the corresponding llvm package 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 libllvm15 and llvm-15, even though one is a dependency of the other.
| libgmp-dev \ | ||
| libgtest-dev \ | ||
| libmpc-dev \ | ||
| llvm-15 \ |
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.
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?
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.
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.
On the dependencies image, we install libllvm15 on jammy and libllvm19 on noble according to the raw logs. We are not safe installing llvm-15 on all versions.
symengine would like to find LLVMConfig.cmake or llvm-config.cmake somewhere. 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 via LLVM_DIR. If the libllvm package does not provide these files, we need to install the corresponding llvm package of the same version.
|
The code-gallery tester now fails in user codes because of I will build the dependencies images again without the additional llvm. |
|
... which reminds me that we need to make progress with #59 :-) |
|
This might be related https://groups.google.com/g/llvm-dev/c/0q76u0BeER8/m/A4qeqjytBwAJ
|
|
Maybe building symengine with Then we only need to figure out how to install |
Closes #65