Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dependencies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y software-properties-common \
libgmp-dev \
libgtest-dev \
libmpc-dev \
llvm-15 \
Copy link
Member

@marcfehling marcfehling Jul 21, 2025

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

Copy link
Member Author

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?

Copy link
Member Author

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.

Copy link
Member

@marcfehling marcfehling Jul 21, 2025

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.

Copy link
Member Author

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.

Copy link
Member

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.

locales \
ninja-build \
numdiff \
Expand Down Expand Up @@ -73,6 +74,7 @@ RUN cd /usr/src && \
-DBUILD_TESTS=off \
-DINTEGER_CLASS=flint \
-DWITH_BOOST=on \
-DWITH_LLVM=on \
-DWITH_MPC=on \
-DWITH_MPFR=on \
-DWITH_SYMENGINE_THREAD_SAFE=on \
Expand Down