Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

failed install in 1.0.0 version julia #364

Open
shang-zd opened this issue Aug 19, 2018 · 12 comments
Open

failed install in 1.0.0 version julia #364

shang-zd opened this issue Aug 19, 2018 · 12 comments

Comments

@shang-zd
Copy link

Hi there,

I cannot add Gtk package in my 1.0.0 version julia and below are some more infos. Anyone can help?

Thank you.
Zd

julia> versioninfo()

Julia Version 1.0.0
Commit 5d4eaca0c9 (2018-08-08 20:58 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, westmere)

julia> Pkg.add("Gtk")

Updating registry at C:\Users\zd\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions...
Cloning [9e28174c-4ba2-5203-b857-d8d62c4213ee] BinDeps from https://github.co
m/JuliaPackaging/BinDeps.jl.git
[ Info: Installed BinDeps ────────────────── v0.8.10
Cloning [0862f596-cf2d-50af-8ef4-f2be67dfa83f] HTTPClient from https://github
.com/JuliaWeb/HTTPClient.jl.git
[ Info: Installed HTTPClient ──────────── v0.2.1
Cloning [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] Gtk from https://github.com/Ju
liaGraphics/Gtk.jl.git
[ Info: Installed Gtk ────────────────────────── v0.16.1
Cloning [d9be37ee-ecc9-5288-90f1-b9ca67657a75] Homebrew from https://github.c
om/JuliaPackaging/Homebrew.jl.git
[ Info: Installed Homebrew ──────────────── v0.7.0
Cloning [2ec943e9-cfe8-584d-b93d-64dcb6d567b7] Libz from https://github.com/B
ioJulia/Libz.jl.git
[ Info: Installed Libz ──────────────────────── v1.0.0
Cloning [c17dfb99-b4f7-5aad-8812-456da1ad7187] WinRPM from https://github.com
/JuliaPackaging/WinRPM.jl.git
[ Info: Installed WinRPM ──────────────────── v0.4.0
Cloning [522f3ed2-3f36-55e3-b6df-e94fee9b0c07] LibExpat from https://github.c
om/JuliaIO/LibExpat.jl.git
[ Info: Installed LibExpat ──────────────── v0.4.2
Cloning [b27032c2-a3e7-50c8-80cd-2d36dbcbfd21] LibCURL from https://github.co
m/JuliaWeb/LibCURL.jl.git
[ Info: Installed LibCURL ────────────────── v0.3.1
Cloning [e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d] BufferedStreams from https://g
ithub.com/BioJulia/BufferedStreams.jl.git
[ Info: Installed BufferedStreams ── v1.0.0
Cloning [b99e7846-7c00-51b0-8f62-c81ae34c0232] BinaryProvider from https://gi
thub.com/JuliaPackaging/BinaryProvider.jl.git
[ Info: Installed BinaryProvider ──── v0.4.1
Cloning [30578b45-9adc-5946-b283-645ec420af67] URIParser from https://github.
com/JuliaWeb/URIParser.jl.git
[ Info: Installed URIParser ────────────── v0.4.0
Cloning [a2bd30eb-e257-5431-a919-1863eab51364] Graphics from https://github.c
om/JuliaGraphics/Graphics.jl.git
[ Info: Installed Graphics ──────────────── v0.3.0
Cloning [159f3aea-2a34-519c-b102-8c37f9878175] Cairo from https://github.com/
JuliaGraphics/Cairo.jl.git
[ Info: Installed Cairo ────────────────────── v0.5.4
Updating C:\Users\zd\.julia\environments\v1.0\Project.toml
[4c0ca9eb] + Gtk v0.16.1
Updating C:\Users\zd\.julia\environments\v1.0\Manifest.toml
[9e28174c] + BinDeps v0.8.10
[b99e7846] + BinaryProvider v0.4.1
[e1450e63] + BufferedStreams v1.0.0
[159f3aea] + Cairo v0.5.4
[a2bd30eb] + Graphics v0.3.0
[4c0ca9eb] + Gtk v0.16.1
[0862f596] + HTTPClient v0.2.1
[d9be37ee] + Homebrew v0.7.0
[b27032c2] + LibCURL v0.3.1
[522f3ed2] + LibExpat v0.4.2
[2ec943e9] + Libz v1.0.0
[30578b45] + URIParser v0.4.0
[c17dfb99] + WinRPM v0.4.0
Building LibCURL ──→→ C:\Users\zd\.julia\packages\LibCURL\Qs5og\deps\build.lo g
┌┌ Error: Error building LibCURL:
�cknx�0/T�R �W�i�n�d�o�w�s� �P�o�w�e�r�S�h�e�l�l� �Hr,g �3� ��V:N�o��N�[ň
││ �ERROR: LoadError: Downloading files requires Windows Management Framework 3.
0 or later.
││ Stacktrace:
││ [1] error(::String) at .\error.jl:33
││ [2] download(::String, ::String) at .\download.jl:20
││ [3] top-level scope at C:\Users\zd.julia\packages\LibCURL\Qs5og\deps\build.
jl:20
││ [4] include at .\boot.jl:317 [inlined]
││ [5] include_relative(::Module, ::String) at .\loading.jl:1038
││ [6] include(::Module, ::String) at .\sysimg.jl:29
││ [7] include(::String) at .\client.jl:388
││ [8] top-level scope at none:0
││ in expression starting at C:\Users\zd.julia\packages\LibCURL\Qs5og\deps\buil
d.jl:17
└└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\b
uild\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1068
Building WinRPM ────→→ C:\Users\zd\.julia\packages\WinRPM\rDDZz\deps\build.lo g
┌┌ Error: Error building WinRPM:
││ ERROR: LoadError: LoadError: UndefVarError: Void not defined
││ Stacktrace:
││ [1] top-level scope at C:\Users\zd.julia\packages\LibExpat\FAade\src\lX_com
mon_h.jl:10
││ [2] include at .\boot.jl:317 [inlined]
││ [3] include_relative(::Module, ::String) at .\loading.jl:1038
││ [4] include at .\sysimg.jl:29 [inlined]
││ [5] include(::String) at C:\Users\zd.julia\packages\LibExpat\FAade\src\LibE
xpat.jl:3
││ [6] top-level scope at none:0
││ [7] include at .\boot.jl:317 [inlined]
││ [8] include_relative(::Module, ::String) at .\loading.jl:1038
││ [9] include(::Module, ::String) at .\sysimg.jl:29
││ [10] top-level scope at none:2
││ [11] eval at .\boot.jl:319 [inlined]
││ [12] eval(::Expr) at .\client.jl:389
││ [13] top-level scope at .\none:3
││ in expression starting at C:\Users\zd.julia\packages\LibExpat\FAade\src\lX_c
ommon_h.jl:18
││ in expression starting at C:\Users\zd.julia\packages\LibExpat\FAade\src\LibE
xpat.jl:16
││ ERROR: LoadError: Failed to precompile LibExpat [522f3ed2-3f36-55e3-b6df-e94f
ee9b0c07] to C:\Users\zd.julia\compiled\v1.0\LibExpat\MYp8o.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:1184
││ [4] _require(::Base.PkgId) at .\logging.jl:311
││ [5] require(::Base.PkgId) at .\loading.jl:852
││ [6] macro expansion at .\logging.jl:311 [inlined]
││ [7] require(::Module, ::Symbol) at .\loading.jl:834
││ [8] include at .\boot.jl:317 [inlined]
││ [9] include_relative(::Module, ::String) at .\loading.jl:1038
││ [10] include(::Module, ::String) at .\sysimg.jl:29
││ [11] top-level scope at none:2
││ [12] eval at .\boot.jl:319 [inlined]
││ [13] eval(::Expr) at .\client.jl:389
││ [14] top-level scope at .\none:3
││ in expression starting at C:\Users\zd.julia\packages\WinRPM\rDDZz\src\WinRPM
.jl:12
││ ERROR: LoadError: Failed to precompile WinRPM [c17dfb99-b4f7-5aad-8812-456da1
ad7187] to C:\Users\zd.julia\compiled\v1.0\WinRPM\ko3j0.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:1184
││ [4] _require(::Base.PkgId) at .\logging.jl:311
││ [5] require(::Base.PkgId) at .\loading.jl:852
││ [6] macro expansion at .\logging.jl:311 [inlined]
││ [7] require(::Module, ::Symbol) at .\loading.jl:834
││ [8] top-level scope at C:\Users\zd.julia\packages\WinRPM\rDDZz\deps\build.j
l:2
││ [9] include at .\boot.jl:317 [inlined]
││ [10] include_relative(::Module, ::String) at .\loading.jl:1038
││ [11] include(::Module, ::String) at .\sysimg.jl:29
││ [12] include(::String) at .\client.jl:388
││ [13] top-level scope at none:0
││ in expression starting at C:\Users\zd.julia\packages\WinRPM\rDDZz\deps\build
.jl:1
└└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\b
uild\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1068
Building Homebrew →→ C:\Users\zd\.julia\packages\Homebrew\l8kUw\deps\build.lo g
Building Cairo ──────→→ C:\Users\zd\.julia\packages\Cairo\blE1h\deps\build.lo g
┌┌ Error: Error building Cairo:
││ ERROR: LoadError: LoadError: UndefVarError: Void not defined
││ Stacktrace:
││ [1] top-level scope at C:\Users\zd.julia\packages\LibExpat\FAade\src\lX_com
mon_h.jl:10
││ [2] include at .\boot.jl:317 [inlined]
││ [3] include_relative(::Module, ::String) at .\loading.jl:1038
││ [4] include at .\sysimg.jl:29 [inlined]
││ [5] include(::String) at C:\Users\zd.julia\packages\LibExpat\FAade\src\LibE
xpat.jl:3
││ [6] top-level scope at none:0
││ [7] include at .\boot.jl:317 [inlined]
││ [8] include_relative(::Module, ::String) at .\loading.jl:1038
││ [9] include(::Module, ::String) at .\sysimg.jl:29
││ [10] top-level scope at none:2
││ [11] eval at .\boot.jl:319 [inlined]
││ [12] eval(::Expr) at .\client.jl:389
││ [13] top-level scope at .\none:3
││ in expression starting at C:\Users\zd.julia\packages\LibExpat\FAade\src\lX_c
ommon_h.jl:18
││ in expression starting at C:\Users\zd.julia\packages\LibExpat\FAade\src\LibE
xpat.jl:16
││ ERROR: LoadError: Failed to precompile LibExpat [522f3ed2-3f36-55e3-b6df-e94f
ee9b0c07] to C:\Users\zd.julia\compiled\v1.0\LibExpat\MYp8o.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:1184
││ [4] _require(::Base.PkgId) at .\logging.jl:311
││ [5] require(::Base.PkgId) at .\loading.jl:852
││ [6] macro expansion at .\logging.jl:311 [inlined]
││ [7] require(::Module, ::Symbol) at .\loading.jl:834
││ [8] include at .\boot.jl:317 [inlined]
││ [9] include_relative(::Module, ::String) at .\loading.jl:1038
││ [10] include(::Module, ::String) at .\sysimg.jl:29
││ [11] top-level scope at none:2
││ [12] eval at .\boot.jl:319 [inlined]
││ [13] eval(::Expr) at .\client.jl:389
││ [14] top-level scope at .\none:3
││ in expression starting at C:\Users\zd.julia\packages\WinRPM\rDDZz\src\WinRPM
.jl:12
││ ERROR: LoadError: Failed to precompile WinRPM [c17dfb99-b4f7-5aad-8812-456da1
ad7187] to C:\Users\zd.julia\compiled\v1.0\WinRPM\ko3j0.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:1184
││ [4] require(::Base.PkgId) at .\logging.jl:311
││ [5] require(::Base.PkgId) at .\loading.jl:852
││ [6] macro expansion at .\logging.jl:311 [inlined]
││ [7] require(::Module, ::Symbol) at .\loading.jl:834
││ [8] top-level scope at C:\Users\zd.julia\packages\Cairo\blE1h\deps\build.jl
:33
││ [9] include at .\boot.jl:317 [inlined]
││ [10] include_relative(::Module, ::String) at .\loading.jl:1038
││ [11] include(::Module, ::String) at .\sysimg.jl:29
││ [12] include(::String) at .\client.jl:388
││ [13] top-level scope at none:0
││ in expression starting at C:\Users\zd.julia\packages\Cairo\blE1h\deps\build.
jl:32
└└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\b
uild\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1068
Building Gtk ──────────→→ C:\Users\zd\.julia\packages\Gtk\oHM1K\deps\build.lo g
┌┌ Error: Error building Gtk:
││ ERROR: LoadError: syntax: misplaced assignment statement in "[glib = library

dependency("glib", aliases = ["libglib-2.0", "libglib-2.0-0"], group = group); g
object = library_dependency("gobject", aliases = ["libgobject-2.0", "libgobject-
2.0-0"], group = group); gtk = library_dependency("gtk", aliases = ["libgtk-3",
"libgtk-3-0"], group = group); gdk = library_dependency("gdk", aliases = ["libgd
k-3", "libgdk-3-0"], group = group); gdk_pixbuf = library_dependency("gdk_pixbuf
", aliases = ["libgdk_pixbuf-2.0", "libgdk_pixbuf-2.0-0"], group = group); gio =
library_dependency("gio", aliases = ["libgio-2.0", "libgio-2.0-0"], group = gro
up)]"
││ Stacktrace:
││ [1] include at .\boot.jl:317 [inlined]
││ [2] include_relative(::Module, ::String) at .\loading.jl:1038
││ [3] include(::Module, ::String) at .\sysimg.jl:29
││ [4] include(::String) at .\client.jl:388
││ [5] top-level scope at none:0
││ in expression starting at C:\Users\zd.julia\packages\Gtk\oHM1K\deps\build.jl
:7
└└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\b
uild\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1068

When I tried to use Gtk ignoring these install errors, I got the following errors:

julia> using Gtk

[ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
WARNING: could not import Base.showall into GLib
WARNING: could not import Base.showcompact into GLib
WARNING: could not import Base.start into GLib
WARNING: could not import Base.next into GLib
WARNING: could not import Base.done into GLib
WARNING: could not import Base.endof into GLib
WARNING: could not import Base.shift! into GLib
ERROR: LoadError: LoadError: error compiling top-level scope: could not load lib
rary "libgobject-2.0"
The specified module could not be 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 C:\Users\zd.julia\packages\Gtk\oHM1K\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:389
[12] top-level scope at .\none:3
in expression starting at C:\Users\zd.julia\packages\Gtk\oHM1K\src\GLib\GLib.jl
:49
in expression starting at C:\Users\zd.julia\packages\Gtk\oHM1K\src\Gtk.jl:7
ERROR: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to C:\Use
rs\zd.julia\compiled\v1.0\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:1184
[4] _require(::Base.PkgId) at .\logging.jl:311
[5] require(::Base.PkgId) at .\loading.jl:852
[6] macro expansion at .\logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at .\loading.jl:834

@tknopp
Copy link
Collaborator

tknopp commented Aug 19, 2018

The issue is this:

Downloading files requires Windows Management Framework 3.
0 or later.

within LibCURL.

@shang-zd
Copy link
Author

Hi @tknopp , thank you for you advice.

I installed the latest Windows Management Framework (version 5.1) Win7AndW2K8R2-KB3191566-x64.zip but the error still exists.
Here are some more details:

julia> using Gtk

ERROR: ArgumentError: Package Gtk not found in current path:
- Run Pkg.add("Gtk") to install the Gtk package.

Stacktrace:
[1] require(::Module, ::Symbol) at .\loading.jl:817

julia> using Pkg

julia> Pkg.add("Gtk")

Updating registry at C:\Users\zd\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions...
Installed Colors ── v0.9.3
Updating C:\Users\zd\.julia\environments\v1.0\Project.toml
[4c0ca9eb] + Gtk v0.16.1
Updating C:\Users\zd\.julia\environments\v1.0\Manifest.toml
[9e28174c] + BinDeps v0.8.10
[b99e7846] + BinaryProvider v0.4.1
[e1450e63] + BufferedStreams v1.0.0
[159f3aea] + Cairo v0.5.4
[5ae59095] ↑↑ Colors v0.9.2 ⇒ v0.9.3
[a2bd30eb] + Graphics v0.3.0
[4c0ca9eb] + Gtk v0.16.1
[0862f596] + HTTPClient v0.2.1
[d9be37ee] + Homebrew v0.7.0
[b27032c2] + LibCURL v0.3.1
[522f3ed2] + LibExpat v0.4.2
[2ec943e9] + Libz v1.0.0
[30578b45] + URIParser v0.4.0
[c17dfb99] + WinRPM v0.4.0

julia> Pkg.update()

Updating registry at C:\Users\zd\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions...
Updating C:\Users\zd\.julia\environments\v1.0\Project.toml
[no changes]
Updating C:\Users\zd\.julia\environments\v1.0\Manifest.toml
[no changes]

julia> using Gtk

[ Info: Precompiling Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44]
WARNING: could not import Base.showall into GLib
WARNING: could not import Base.showcompact into GLib
WARNING: could not import Base.start into GLib
WARNING: could not import Base.next into GLib
WARNING: could not import Base.done into GLib
WARNING: could not import Base.endof into GLib
WARNING: could not import Base.shift! into GLib
ERROR: LoadError: LoadError: error compiling top-level scope: could not load lib
rary "libgobject-2.0"
The specified module could not be 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 C:\Users\zd.julia\packages\Gtk\oHM1K\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:389
[12] top-level scope at .\none:3
in expression starting at C:\Users\zd.julia\packages\Gtk\oHM1K\src\GLib\GLib.jl
:49
in expression starting at C:\Users\zd.julia\packages\Gtk\oHM1K\src\Gtk.jl:7
ERROR: Failed to precompile Gtk [4c0ca9eb-093a-5379-98c5-f87ac0bbbf44] to C:\Use
rs\zd.julia\compiled\v1.0\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:1184
[4] _require(::Base.PkgId) at .\logging.jl:311
[5] require(::Base.PkgId) at .\loading.jl:852
[6] macro expansion at .\logging.jl:311 [inlined]
[7] require(::Module, ::Symbol) at .\loading.jl:834

By the way, Gtk package runs well in my 0.6.4 version julia. So I guess this might not be the problem of my os but I have no idea about any other steps I need to do.

Thank you.
Regards.
Zd

@jonathanBieler
Copy link
Collaborator

jonathanBieler commented Aug 19, 2018

We only got Gtk to run on v0.7/v1.0 recently so there's probably some issues left with it. I managed to install it on my windows 7 machine, but I'm using v0,7 (which is the same as v1.0 btw, just with deprecations, so it's generally recommended to use it, more packages will work on it).

It seems like Cairo doesn't work on windows, so there's still some work on upstream packages.

@timholy
Copy link
Member

timholy commented Aug 29, 2018

Works for me locally. Time for a new release?

@tknopp
Copy link
Collaborator

tknopp commented Aug 29, 2018

@timholy Lets do it. Cairo makes us still fail on Mac since there is also a release missing (I fixed the Homebrew issue with a hack (JuliaGraphics/Cairo.jl#250) that works and got critique by Tony). So maybe (if you can live with the hack) you could push their so that Travis can go all green on Gtk.

@mark-summerfield
Copy link

I tried using Julia's pkg command to add Gtk on two different Xubuntu 18.04.1 machines. On the first it seemed to work without error, on the second it produced errors:

  Building LibCURL ─→ `~/.julia/packages/LibCURL/Z32eb/deps/build.log`
┌ Error: Error building `LibCURL`: 
│ ERROR: LoadError: IOError: could not spawn `curl -g -L -f -o /home/mark/.julia/packages/LibCURL/Z32eb/deps/build_Zlib.v1.2.11.jl https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/build_Zlib.v1.2.11.jl`: no such file or directory (ENOENT)
│ Stacktrace:
│  [1] _jl_spawn(::String, ::Array{String,1}, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:367
│  [2] (::getfield(Base, Symbol("##495#496")){Cmd})(::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:509
│  [3] setup_stdio(::getfield(Base, Symbol("##495#496")){Cmd}, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:490
│  [4] #_spawn#494(::Nothing, ::Function, ::Cmd, ::Tuple{RawFD,RawFD,RawFD}) at ./process.jl:508
│  [5] _spawn at ./process.jl:504 [inlined]
│  [6] #run#505(::Bool, ::Function, ::Cmd) at ./process.jl:652
│  [7] run at ./process.jl:651 [inlined]
│  [8] download(::String, ::String) at ./download.jl:48
│  [9] top-level scope at /home/mark/.julia/packages/LibCURL/Z32eb/deps/build.jl:19
│  [10] include at ./boot.jl:317 [inlined]
│  [11] include_relative(::Module, ::String) at ./loading.jl:1038
│  [12] include(::Module, ::String) at ./sysimg.jl:29
│  [13] include(::String) at ./client.jl:388
│  [14] top-level scope at none:0
│ in expression starting at /home/mark/.julia/packages/LibCURL/Z32eb/deps/build.jl:16
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068

On both machines when I tried running the getting started example I got this error:

WARNING: Method definition curr_module() in module GLib at /home/mark/.julia/packages/Gtk/b18rN/src/GLib/GLib.jl:31 overwritten in module Gtk at /home/mark/.julia/packages/Gtk/b18rN/src/Gtk.jl:17.

Thereafter trying to run (on both machines) produced a pause and then no window appears and the program finishes.
Here's what running under gdb says:

GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from julia...done.
(gdb) set args tmp/gtk1.jl
(gdb) run
Starting program: /home/mark/opt/bin/julia tmp/gtk1.jl
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3190700 (LWP 4681)]
[New Thread 0x7fffe1bd9700 (LWP 4682)]
[New Thread 0x7fffe13d8700 (LWP 4683)]
[New Thread 0x7fffe0bd7700 (LWP 4684)]
[New Thread 0x7fffc16f2700 (LWP 4685)]
[New Thread 0x7fffc0ef1700 (LWP 4686)]

(julia:4677): Gtk-WARNING **: 14:15:09.788: Theme parsing error: gtk.css:2:28: expected ':'
[Thread 0x7fffe0bd7700 (LWP 4684) exited]
[Thread 0x7fffe13d8700 (LWP 4683) exited]
[Thread 0x7fffe1bd9700 (LWP 4682) exited]
[Thread 0x7fffc16f2700 (LWP 4685) exited]
[Thread 0x7ffff3190700 (LWP 4681) exited]
[Thread 0x7ffff7fc6cc0 (LWP 4677) exited]
[Inferior 1 (process 4677) exited normally]

For the record, here's gtk1.jl:

#!/usr/bin/env julia

using Gtk

win = GtkWindow("My First Gtk.jl Program", 400, 200)

b = GtkButton("Click Me")
push!(win,b)

function on_button_clicked(w)
  println("The button has been clicked")
end
signal_connect(on_button_clicked, b, "clicked")

showall(win)

@jonathanBieler
Copy link
Collaborator

For the first error does this path exists on your machine ?

/home/mark/.julia/packages/LibCURL/Z32eb/deps/

Maybe you have Julia installed in a unusual path and that confuses LibCURL.

You should also put a sleep(5) after showall(win) in your test script if you want to have a chance to see your window before Julia's exits. Or you have to use this:

http://juliagraphics.github.io/Gtk.jl/latest/manual/nonreplusage.html#Non-REPL-Usage-1

@mark-summerfield
Copy link

mark-summerfield commented Sep 5, 2018

Yes that exact path exists.

I added the extra bit as per your suggestion at the end:

if !isinteractive()
    c = Condition()
    signal_connect(win, :destroy) do widget
        notify(c)
    end
    wait(c)
end

And now the Window shows up and I can click the button. Tried this on both machines and both work.

So I would say that this is a doc bug because the 'getting started' example as written does not work.
I think it is reasonable to expect people writing GUI apps to copy/paste the 'getting started' examples into a file and run it & expect it to work. Anyway, that's up to you; at least it works:-)

@jonathanBieler
Copy link
Collaborator

It doesn't work if you run it in a script, but it does if you copy-paste it in the REPL, correct ?

@mark-summerfield
Copy link

mark-summerfield commented Sep 5, 2018

It works as a script if I add the if isinteractive() stuff. It also works in the REPL although each statement produces lots of output (Gtk..Leaf(...)), without the if isinteractive() stuff.

@jonathanBieler
Copy link
Collaborator

I'm also getting the LibCURL error on Ubuntu, I'm not sure what's going on there, I never saw it before.

@mark-summerfield
Copy link

I think the reason is that curl is no longer installed by default in 18.04. I never use it myself (I use wget) so didn't notice. However the package is still there so it can be installed.

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

No branches or pull requests

5 participants