-
Notifications
You must be signed in to change notification settings - Fork 43
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
Latest version doesn't load with pre-compiled version of julia #39
Comments
Yes, I get the same on nightly. I know of only three possible solutions:
I think this is because the C++ stdlib that is shipped with Julia is of a different version now, but I don't know why or when exactly this changed. CC @staticfloat @giordano in case they have another workaround |
The first solution would be the worst, the third solution the best, IMHO. I
understand the difficulties doing this in BB, though.
…On Thu, Jan 2, 2020, 12:03 AM Bart Janssens ***@***.***> wrote:
Yes, I get the same on nightly. I know of only three possible solutions:
- use the julia supplied by the linux distribution
- compile Julia from source
- compile inside BinaryBuilder
I think this is because the C++ stdlib that is shipped with Julia is of a
different version now, but I don't know why or when exactly this changed.
CC @staticfloat <https://github.com/staticfloat> @giordano
<https://github.com/giordano> in case they have another workaround
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39?email_source=notifications&email_token=AACX57UXCZDXNHABEBLJJEDQ3WNU5A5CNFSM4KBZ7WO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH52I4Y#issuecomment-570139763>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACX57WWTR2LJEYK6WTU6WLQ3WNU5ANCNFSM4KBZ7WOQ>
.
|
To be clear, I was talking mostly about easing local development of CxxWrap-based packages. For final distribution, BinaryBuilder is a must, since that's the way to guarantee compatibility with the official binaries. For local development, what could possibly also work is to switch to the clang compiler for CxxWrap and its dependents, I havent't tested this but it should avoid the conflict with the GNU stdlib. |
For local development, I'm ok with building Julia from source. It's pretty quick these days. |
Hi, just came over here by chance... I have a similar problem on OpenSUSE tumbleweed (which BTW has a decent system package, but still at 1.2). What works for me is to change the CXX lib used in Julia to the one from the system (which is assumed by your compiled code). Find the stdc++ library used by g++ in your system
Jürgen |
We got hit by this as well and there is a roadmap for adressing this here: JuliaLang/julia#34276 The easiest workaround is probably to just delete libstdc++ from the julia lib directory. The more recent one from the system will be used instead and is backwards compatible. |
Is this error related? |
Did you run I have the same error when trying to use binaries from Yggdrasil in the Main REPL. But if I wrap it in a module, the error is gone. |
Yeah, I'm not running this interactively... Can you explain what exactly you are wrapping in the REPL? Am I missing something in the LCIO package? |
Oh, I just find that it has nothing to do with whether to wrap it in a module or not... What I have done previously:
BUT, if I execute
|
Hmmm. Interesting... |
I've tried a couple different combinations in terms of load order, but I haven't found one that works. |
Strange, this error happens when |
Good idea. I tried. It does get called, but the error still occurs. This makes sense, because it does work on a different system.
|
I think this might actually be related to the flags used for You could add the flags @wrapmodule(lciowrap, :define_julia_module, Libdl.RTLD_NOLOAD | Libdl.RTLD_GLOBAL) Also, for the same reason, whatever you do, don't import or use libcxxwrap_julia_jll, it will dlopen the stl library automatically with the wrong flags. This is fixed in the upcoming version 0.7 of libcxxwrap_julia_jll. |
That's an interesting suggestion, but it doesn't help in this case, unfortunately. |
Is this related? JuliaPackaging/BinaryBuilder.jl#453 |
Yes, it is. I was just experimenting a bit, since I could reproduce this easily on my machine, and manually changing the
Unfortunately I couldn't find any other short-term workaround. |
Interesting... Thanks for finding that!
Looks like I need to make a new release again soon.
…On Sun, Feb 16, 2020, 2:41 PM Bart Janssens ***@***.***> wrote:
Yes, it is. I was just experimenting a bit, since I could reproduce this
easily on my machine, and manually changing the dlopen line in the
LCIO_Julia_Wrapper_jll package to this fixed the problem:
global lciowrap_handle = dlopen(lciowrap_path, Libdl.RTLD_GLOBAL)
Unfortunately I couldn't find any other short-term workaround.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39?email_source=notifications&email_token=AACX57UDIYWMU7UNET7BMX3RDG6KJA5CNFSM4KBZ7WO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL4UXFI#issuecomment-586763157>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACX57WFYV4QCAMKK5Z6D2TRDG6KJANCNFSM4KBZ7WOQ>
.
|
OK, manually adding the line Libdl.dlopen("/home/user/tmp/cleandepot/artifacts/0d6202473ddcca22a6d7c6c527d2ccd99884412f/lib/libcxxwrap_julia_stl.so", Libdl.RTLD_GLOBAL | Libdl.RTLD_NOLOAD, throw_error = false) to The problem is that the libraries get loaded from the precompiled code, which disregards the fact that you first import CxxWrap, which in the non-precompiled case should be enough to avoid this too. |
Cool, thank you! I'd be ok with requiring Julia 1.3+ from the next version. |
I just tried with CxxWrap master and the experimental libcxxwrap 0.7 binaries at https://github.com/barche/libcxxwrap_julia_jll.jl and it appears to work without dlopen tricks. |
sorry to bump this issue, but I followed the README with julia-1.5.1 (ubuntu 20.4) and got the same error. Am I doing something wrong or this bug isn't solved yet on the master? |
Do you mean that this happens when you compile It's also possible to adopt a container-based workflow now, this is demonstrated in the JuliaCon2020 workshop: https://live.juliacon.org/talk/NNVQQF |
I did compile it me self (not sure why but I'm following this ) Thanks for your response |
Ah, yes, for now OpenCV requires building everything from source, until someone builds OpenCV binaries using BinaryBuilder. |
I'm on 1b1980e
Building with cmake and
gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
is fine, but then loading with a downloaded version of julia-1.3.1 fails withThis works fine with a version of julia that I've built myself...
The text was updated successfully, but these errors were encountered: