-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Installation from local path produces linking error #44
Comments
This error occurs after running the solverdummies manually or when doing Can you run
without errors? As this error is similar to the matlab bindings, can you try running
or directly running the solver dummies with the |
using
Yes it works without any error.
It solves the problem with |
You may want to try the workaround from here:
But this may also only lead to the result with preloading, I am not sure. If the above fix does not work, you may have to build Julia from source. |
Unfortunately, non of them help to solve problems. Preload works for libstdc++ but then arises some other issues about libcurl and preloading does not help. Pre-compiled binary or building from source also does not make any difference. BTW, Matlab bindings have a similar issue, but just after preloading libstdc++, it resolved. |
Just tested this on Arch with julia 1.8.1 I was able to install it from a clone of the repo. |
I was now able to recreate it in an empty docker containing based on image Maybe someone has an idea on the cause? My best guess is that you need the same version of glibcxx in julia that compiled preCICE and the precompiled preCICE package doesn't use the same one? |
Can you run |
After the installation with the package I get
And with compiling myself I get
I don't know what the stl is or how to check it. If its the |
Ah I see. So, julia decides to ship its own libraries for some reason, leading to conflicting dependencies. This is currently a problem with everything in julia attempting to use system libraries. It's essentially the same problem as we have/had with the Matlab bindings, which also ships its own dependencies. I just saw that Arch patches julia to use the system libraries, explaining why it runs fine on my system. I see two ways for us to deal with this long-term:
I would recommend to try how much of a hassle a separate installation of preCICE is. Ideally, this will be a single shell script in the julia repo that builds preCICE. And a second shellscript that preloads the julian precice and runs julia. Not pretty, but usable. |
What I don't understand is why it doesn't just work when preloading the system So you suggest that users have to build preCICE from source if preloading doesn't fix the error? Shouldn't we then just link to the preCICE documentation for building instead of creating our own script in the julia bindings? Also, I think we should somehow have it that this error occurs when building and not during the first use right? |
Preloading only works if the libraries are compatible. Preloading different versions is a minefield as doesn't impact parts outside of the shared library, think templates. It's very easy to get into ODR issues here. Thankfully the stl libs do catch such things with errors such as the one we ran into.
Good point. The recommended way of installation is to download the binaries, hence, we have a clear target to work with.
The difficult part is getting all the dependencies right, forcing cmake to use the versions shipped with julia. This is a good candidate for a separate script.
This should be covered by tests, which we have, right? We should probably tell the user to always run the tests after building the bindings. |
But building preCICE from source and using the precompiled Julia version worked, why not use this combination instead of building preCICE with the julia library? Wouldn't this be annoying to existing users of preCICE that have an installation of preCICE but want to try Julia?
Yes okay this should work. |
Problem is that it is not guaranteed to work. |
So since it doesn't work with the package on 22.04 and preloading I would still include the documentation for preloading but give compiling with the Julia library as an separate option?
or something similar? |
I think what @fsimonis means here is that we do a source installation of preCICE but instead letting CMake pick the default libraries from the default paths, we point it to pick the libraries from where Julia has them. Have a look at the dependencies section of the preCICE documentation. Here, for every dependency (like boost, PETSc, Eigen) there is a section where it is explained which paths need to be set if the dependency is installed from source. So for us the situation is that the dependencies are not installed from source but are in fact shipped by Julia, so we just set the paths to the appropriate locations. Does this make it clear? |
Yes I understand what we try to do, but I don't see how we can add the Julia Libraries to CMake. Or at least going beyond the
I tried around with the |
I had installed Julia to
/usr/bin/
and preCICE is installed at the location/usr/local/lib/
Following the instructions on the readme, I have installed bindings however the tests are not working as I try
test PreCICE
I get the following error message:It seems Julia only looks at the locally installed folder not looking for the entire system (
LD_LIBRARY_PATH
). Locally installed versions show the same behavior.The text was updated successfully, but these errors were encountered: