Skip to content
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

Load library "libgobject-2.0" and precompile Gtk #104

Closed
henselman-petrusek opened this issue Nov 14, 2018 · 15 comments
Closed

Load library "libgobject-2.0" and precompile Gtk #104

henselman-petrusek opened this issue Nov 14, 2018 · 15 comments

Comments

@henselman-petrusek
Copy link

Have been getting the following errors, though everything seems to be up to date.

julia> versioninfo()
Julia Version 0.7.0
Commit a4cb80f3ed (2018-08-08 06:46 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

julia> Pkg.update()
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
 [no changes]

julia> using Profile

julia> using ProfileView
[ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
ERROR: LoadError: LoadError: error compiling top-level scope: could not load library "libgobject-2.0"
dlopen(libgobject-2.0.dylib, 1): image not found
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include at ./sysimg.jl:29 [inlined]
 [4] include(::String) at /Users/gh10/.julia/packages/Gtk/ADDrn/src/Gtk.jl:2
 [5] top-level scope at none:0
 [6] include at ./boot.jl:317 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1038
 [8] include(::Module, ::String) at ./sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:319 [inlined]
 [11] eval(::Expr) at ./client.jl:399
 [12] top-level scope at ./none:3
in expression starting at /Users/gh10/.julia/packages/Gtk/ADDrn/src/GLib/GLib.jl:48
in expression starting at /Users/gh10/.julia/packages/Gtk/ADDrn/src/Gtk.jl:7
ERROR: InitError: LoadError: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to /Users/gh10/.julia/compiled/v0.7/Gtk/Vjnq0.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1185
 [4] macro expansion at ./logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at ./loading.jl:941
 [6] require(::Base.PkgId) at ./loading.jl:852
 [7] macro expansion at ./logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at ./loading.jl:834
 [9] include at ./boot.jl:317 [inlined]
 [10] include_relative(::Module, ::String) at ./loading.jl:1038
 [11] include at ./sysimg.jl:29 [inlined]
 [12] include at /Users/gh10/.julia/packages/ProfileView/0MFdX/src/ProfileView.jl:1 [inlined]
 [13] __init__() at /Users/gh10/.julia/packages/ProfileView/0MFdX/src/ProfileView.jl:53
 [14] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:627
 [15] macro expansion at ./logging.jl:312 [inlined]
 [16] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:698
 [17] _require(::Base.PkgId) at ./loading.jl:931
 [18] require(::Base.PkgId) at ./loading.jl:852
 [19] macro expansion at ./logging.jl:311 [inlined]
 [20] require(::Module, ::Symbol) at ./loading.jl:834
in expression starting at /Users/gh10/.julia/packages/ProfileView/0MFdX/src/ProfileViewGtk.jl:4
during initialization of module ProfileView
@timholy
Copy link
Owner

timholy commented Nov 14, 2018

Could you search existing issues in Gtk.jl and see if any of them report a workaround? And if not report your results with using Gtk there?

@timholy timholy closed this as completed Nov 14, 2018
@henselman-petrusek
Copy link
Author

Thanks very much! Will do.

@timholy
Copy link
Owner

timholy commented Dec 3, 2019

Should be fixed if you use Julia 1.3 and up-to-date packages

@henselman-petrusek
Copy link
Author

Seems to work! Error message is gone. Thank you!

@henselman-petrusek
Copy link
Author

Ah - spoke too soon. Now I have

julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.0.0)
  CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

julia> using Pkg

julia> Pkg.update()
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.3/Project.toml`
 [no changes]
  Updating `~/.julia/environments/v1.3/Manifest.toml`
 [no changes]

julia> using Profile

julia> using ProfileView
[ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
ERROR: LoadError: Cairo not properly installed. Please run
Pkg.build("Cairo")
Stacktrace:
 [1] error(::String, ::String) at ./error.jl:42
 [2] top-level scope at /Users/gh10/.julia/packages/Cairo/p68X8/src/Cairo.jl:9
 [3] include at ./boot.jl:328 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1105
 [5] include(::Module, ::String) at ./Base.jl:31
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:330 [inlined]
 [8] eval(::Expr) at ./client.jl:425
 [9] top-level scope at ./none:3
in expression starting at /Users/gh10/.julia/packages/Cairo/p68X8/src/Cairo.jl:9
ERROR: LoadError: Failed to precompile Cairo [159f3aea-2a34-519c-b102-8c37f9878175] to /Users/gh10/.julia/compiled/v1.3/Cairo/l6vnT_Ljzqc.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1105
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:330 [inlined]
 [11] eval(::Expr) at ./client.jl:425
 [12] top-level scope at ./none:3
in expression starting at /Users/gh10/.julia/packages/Gtk/mVhmL/src/Gtk.jl:30
ERROR: InitError: LoadError: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to /Users/gh10/.julia/compiled/v1.3/Gtk/Vjnq0_Ljzqc.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1105
 [8] include at ./Base.jl:31 [inlined]
 [9] include at /Users/gh10/.julia/packages/ProfileView/rxOtc/src/ProfileView.jl:1 [inlined]
 [10] __init__() at /Users/gh10/.julia/packages/ProfileView/rxOtc/src/ProfileView.jl:68
 [11] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:692
 [12] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:776
 [13] _require(::Base.PkgId) at ./loading.jl:1001
 [14] require(::Base.PkgId) at ./loading.jl:922
 [15] require(::Module, ::Symbol) at ./loading.jl:917
in expression starting at /Users/gh10/.julia/packages/ProfileView/rxOtc/src/ProfileViewGtk.jl:4
during initialization of module ProfileView

I deduce from JuliaGraphics/Cairo.jl#271 and JuliaGraphics/Cairo.jl#292 that getting Cairo installed is still something of an issue. Don't have time to dive in at the moment, but seems that folks are working on it. Thanks again!

@timholy
Copy link
Owner

timholy commented Dec 6, 2019

Actually it's I who jumped the gun; there's a dependency on GtkReactive that needs updating, but that's running into a bug with the new libraries (JuliaGizmos/GtkReactive.jl#91). Once that updates, you'll get the new Cairo & Gtk and it shouldn't take any manual effort at all.

@henselman-petrusek
Copy link
Author

Wonderful! Thank you again!

@timholy
Copy link
Owner

timholy commented Dec 8, 2019

Give it a try now?

@anirudhpammi
Copy link

I am using the juliapro and it is running the 1.0 version of julia. I have the same problems during the precompiling process of ImageView. Can you please tell me how I can update my julia version with the IDE? Thanks.

@timholy
Copy link
Owner

timholy commented Dec 11, 2019

If you're on OSX, you need to be running Julia 1.3 for this to work. You can get a binary at https://julialang.org/downloads/.

@anirudhpammi
Copy link

Yes, I am on OSX.
I installed Julia 1.3 command line version and tried adding and using the package ImageView, I still had some issues.
Coming back to the juliapro issue, both the LTS and latest stable version do not run julia 1.3 (they have 1.0.5 and 1.2 respectively). Anyway I can use the package on juliapro?

@timholy
Copy link
Owner

timholy commented Dec 11, 2019

Short answer is no, not without a lot of work. You can dig around in issues in Cairo.jl and Gtk.jl for details (it's a Homebrew bug, IIUC).

"had some issues" is not sufficiently specific for me to offer any advice.

@anirudhpammi
Copy link

Sorry for being vague, the plot on Julia 1.3 works but displays the following:
Warning: Failed to set locale category LC_NUMERIC to en_IN.
Warning: Failed to set locale category LC_TIME to en_IN.
Warning: Failed to set locale category LC_COLLATE to en_IN.
Warning: Failed to set locale category LC_MONETARY to en_IN.
Warning: Failed to set locale category LC_MESSAGES to en_IN.
Warning: Failed to set locale category LC_NUMERIC to en_IN.
Warning: Failed to set locale category LC_TIME to en_IN.
Warning: Failed to set locale category LC_COLLATE to en_IN.
Warning: Failed to set locale category LC_MONETARY to en_IN.
Warning: Failed to set locale category LC_MESSAGES to en_IN.
Warning: Failed to set locale category LC_NUMERIC to en_IN.
Warning: Failed to set locale category LC_TIME to en_IN.
Warning: Failed to set locale category LC_COLLATE to en_IN.
Warning: Failed to set locale category LC_MONETARY to en_IN.
Warning: Failed to set locale category LC_MESSAGES to en_IN.

As for the juliapro, I edited the path of the julia binary (originally set to the binary that comes with juliapro (1.0.5) ) to julia 1.3 binary. The ImageView seems to work now, however every time I start Julia, I have an error that a package called TokenManager is missing and I cannot seem to add it.

Thank you!

@timholy
Copy link
Owner

timholy commented Dec 11, 2019

None of those are ImageView issues. The locale issue is probably best for Gtk, the TokenManager is a JuliaBox issue. (Perhaps see https://discourse.julialang.org/t/i-am-stuck-at-please-authenticate/26313/8)

@henselman-petrusek
Copy link
Author

The example in the documentation under header "Usage and visual interpretation" now works perfectly! Thanks very much!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants