-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
when LLVM is dynamically linked, Julia is broken when the runtime LLVM is not the same than the one used for building #2494
Comments
This ought to be some weird bug, and perhaps is a manifestation of some other bug. Julia's behaviour should not change based on whether LLVM is statically or dynamically linked, so long as it is the correct version of LLVM. |
It looks like part of the purpose of the llvm patch was to change the library name from There is probably no reliable way to fix this within a day. Does this happen on both 32-bit and 64-bit? |
Yes this happens on both 32- and 64-bit. Since a new binary for LLVM 3.2 has just been uploaded to Debian, the Julia package there is now affected again by the issue. For me this issue is fairly severe, because it makes Julia distribution-unfriendly. Don't hesitate to ask if I can be of any help to solve it. |
I will see if I can use your patch and create a dynamically linked julia. Our rpath stuff is pretty good now, and it may be ok for us to link dynamically with LLVM. |
Actually the problem is more severe than that. For example I sometimes get Since the bug is making the Debian package unusable, I have decided to statically link LLVM in the Debian package. This is clearly substandard, so I hope we can solve this issue so that I can revert to dynamic linking. |
Would you be able to add an option for Also cc: @staticfloat |
This is a somewhat unusual case because LLVM isn't really a shared library in the regular sense. It's fundamentally part of the language infrastructure and slight changes in LLVM mess everything up. This seems like a case where static linking might actually be warranted. |
We do certainly require a specific version of llvm at any given time, but it ought to work when dynamically linked. I still have no idea what the problem is here. |
I'll try reproducing this in the near future. |
While that may be the case, LLVM provides a shared library with a well defined interface. Also, how come the static library works fine but the shared one does not? Are we the only language with this issue in debian? |
My understanding was that the issue occurs when the Julia package is compiled using one version of LLVM and then another version of LLVM is used when Julia is run. |
Indeed the problem occurs when the version of LLVM is changed, but the strange thing is that it occurs even if the change is minimal (i.e. a small patch clearly not affecting ABI compatibility). |
Is this still an issue? LLVM makes no guarantees whatsoever on ABI stability. Now that we are not compiling LLVM while WHOLE_ARCHIVE anymore, I would still like to add the option to link to the dynamic library instead. |
Does this work now with llvm 3.3? Now that 0.2-rc1 build has gone through unstable, it is worth revisiting this. |
I am temporarily marking this as 0.2. |
I would certainly love to have this fixed, but AFAIK we still have no idea what is going on here. |
Perhaps we just try it out again and see if it works this time? |
@sebastien-villemot Is this still an issue? |
Sorry, I've been busy recently so I could not test it so far. I'll come back to you soon. |
I have provided a build option to make this easier. I will move this to 0.3 for now, and perhaps we can even close it, if it doesn't reoccur. |
I have retested this with Julia 0.2.0-rc2 and LLVM 3.3 and the problem seems to be now gone. Closing. BTW, thanks for the new build option, it makes the thing easier. |
That is great. Don't we have to wait for a new llvm package to appear in unstable and then see if this still works? |
I made a test: I compiled julia against llvm-3.3-dev from version 3.3-9, then I upgraded llvm-3.3-dev to 3.3-10 without recompiling, and julia did not break.. So I am fairly confident (though not certain) that this issue is fixed. |
This is such a relief! |
As of today, the Julia package in Ubuntu (version 0.1) exhibits the following:
When I first uploaded julia 0.1 into Ubuntu, the problem was not present. But later on, Ubuntu updated their LLVM 3.2 package (with a minor patch), and this problem appeared. I experienced the same issue some time ago in Debian.
The problem is going to disappear temporarily if I manage to upload 0.1.1 into Ubuntu 13.04, but it may reappear if there is another update to LLVM 3.2.
In short, there seems to be a coupling problem between Julia and the system-wide LLVM. Note that the julia binary is linked against shared libraries of LLVM, via the following patch:
http:https://anonscm.debian.org/gitweb/?p=pkg-julia/julia.git;a=blob;f=debian/patches/use-shared-llvm.patch
Statically linking LLVM into Julia is not a reasonable option for a distribution, for various well-known reasons.
Any clues?
In order to debug this, a first step would probably to try to reproduce it outside the Debian/Ubuntu packaging.
The text was updated successfully, but these errors were encountered: