BinDeps.jl icon indicating copy to clipboard operation
BinDeps.jl copied to clipboard

dlopen/dlcose change

Open daviehh opened this issue 6 years ago • 3 comments
trafficstars

Related: https://github.com/JuliaPackaging/BinDeps.jl/issues/396

also reported https://github.com/JuliaGraphics/Cairo.jl/issues/271 and https://github.com/JuliaLang/julia/issues/31517

According to the glib upstream https://gitlab.gnome.org/GNOME/pango/issues/363, dlopen followed by dlclose is not supported and it's surprising if it worked before.

Should changes be made to BinDeps.jl?

  • do not use dlclose() at all: maybe using h = nothing instead (is it safe? shall we also use GC.gc()?) https://github.com/JuliaPackaging/BinDeps.jl/blob/f375ead63ed7376bcd900991690f2a4a3d620042/src/dependencies.jl#L681

  • or, test if file exist at path; is so, use addprocs() and remotecall() , then rmprocs() to execute in new process each time?

daviehh avatar Apr 01 '19 16:04 daviehh

Isn't BinDeps obsolescent?

The old world of BinDeps.jl fades slowly into the long, dark sleep of forgotten heroes.

Elliot in 2018

cormullion avatar Apr 02 '19 10:04 cormullion

BinDeps is still used by a lot of packages, it needs to be maintained, at least for a while.

It looks like the build command is ran in a separate process, so maybe not closing the libraries isn't an issue. We could try it out.

jonathanBieler avatar Apr 03 '19 18:04 jonathanBieler

@jonathanBieler not closing libraries for cairo by using: https://github.com/daviehh/Cairo.jl/commit/1f5984500128f8043921c5431d8e370b5c701579

  • doesn't segfault for julia 0.7 and 1.0 (CI error for julia v0.6 since pathof not available there): https://travis-ci.org/daviehh/Cairo.jl/builds/515349602

  • not sure how "safe" it would be: like you mentioned, many other packages use it; but it runs on a separate process so may be the impact is low.

  • btw, upstream glib thinks dlopen/dlclose is not supported to be used that way and may not fix it: https://gitlab.gnome.org/GNOME/pango/issues/363

daviehh avatar Apr 03 '19 19:04 daviehh