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

QML.jl roadmap #73

Closed
5 tasks done
barche opened this issue Apr 17, 2020 · 42 comments
Closed
5 tasks done

QML.jl roadmap #73

barche opened this issue Apr 17, 2020 · 42 comments

Comments

@barche
Copy link
Collaborator

barche commented Apr 17, 2020

QML is currently in a bit of a broken state, for several reasons. This issue is meant to track progress towards getting it back on the rails towards a working package.

Package ecosystem integration

When ready, QML.jl will be for Julia 1.3 and higher only, relying on JLL packages for the binary dependencies. This requires:

Qt compatibility

QML.jl is severely broken with the most recent Qt versions:

New features

@bramtayl
Copy link
Contributor

bramtayl commented Jun 1, 2020

@barche I have a QML application I'd be interested in using with Julia. What's the progress here? Is there anything I could do to help?

@barche
Copy link
Collaborator Author

barche commented Jun 14, 2020

I have just pushed my changes to the propertymap-update branch of both jlqml and QML.jl, for compatibility with the recent Qt versions only the examples still need an update. Trying to get things to run in this state and reporting any problems would be helpful ;)

@bramtayl
Copy link
Contributor

Well I should warn you I'm a total novice, but here's what I got when I tried to checkout the propertymap-update branch of jlqml and follow the instructions in the readme:

jlqml-build ) cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52 ../jlqml
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:10 (find_package):
  By not providing "FindQt5Quick.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Quick",
  but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Quick" with any
  of the following names:

    Qt5QuickConfig.cmake
    qt5quick-config.cmake

  Add the installation prefix of "Qt5Quick" to CMAKE_PREFIX_PATH or set
  "Qt5Quick_DIR" to a directory containing one of the above files.  If
  "Qt5Quick" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:11 (find_package):
  By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Core", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Core" with any
  of the following names:

    Qt5CoreConfig.cmake
    qt5core-config.cmake

  Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
  "Qt5Core_DIR" to a directory containing one of the above files.  If
  "Qt5Core" provides a separate development package or SDK, be sure it has
  been installed.


CMake Warning at CMakeLists.txt:12 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.


CMake Warning at CMakeLists.txt:13 (find_package):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake

  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.


-- Found Julia executable: Julia_EXECUTABLE-NOTFOUND
CMake Error at /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib/cmake/JlCxx/FindJulia.cmake:32 (file):
  file failed to open for reading (No such file or directory):

    /home/brandon/jlqml/Julia_VERSION_INCLUDE-NOTFOUND
Call Stack (most recent call first):
  /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib/cmake/JlCxx/JlCxxConfig.cmake:3 (find_package)
  CMakeLists.txt:14 (find_package)


CMake Error at /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib/cmake/JlCxx/FindJulia.cmake:33 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib/cmake/JlCxx/JlCxxConfig.cmake:3 (find_package)
  CMakeLists.txt:14 (find_package)


-- Julia_VERSION_STRING: 
CMake Error at /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib/cmake/JlCxx/FindJulia.cmake:48 (if):
  if given arguments:

    "VERSION_LESS" "0.7.0"

  Unknown arguments specified
Call Stack (most recent call first):
  /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib/cmake/JlCxx/JlCxxConfig.cmake:3 (find_package)
  CMakeLists.txt:14 (find_package)

@barche
Copy link
Collaborator Author

barche commented Jun 15, 2020

OK, the readme was hopelessly out of date, I have updated it (in the branch). The errors are due to CMake not finding Qt and libcxxwrap, you probably also need to install your distribution's qt5, qtquick and qtdeclarative development packages.

@bramtayl
Copy link
Contributor

Ok...how do I figure out the path to Qt? Sorry if that's a stupid question. I'm on ubuntu. I've done

sudo apt install libqt5qml5
sudo apt install libqt5quick5
sudo apt install qtdeclarative5-dev

I've been using Qt Creator

@barche
Copy link
Collaborator Author

barche commented Jun 16, 2020

Actually, when using the distribution packages specifying the location should not be needed. What error does it give now? The qt dev packages on Ubuntu are quite fine-grained, so there may be some missing ones.

@bramtayl
Copy link
Contributor

This is what I'm getting now. I checked and libqt5svg5 is already installed

jlqml-build ) cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH='/home/brandon/libcxxwrap-julia-build;/home/brandon/julia-1.4.2/bin' ../jlqml
CMake Warning at CMakeLists.txt:12 (find_package):
  By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5Svg", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Found Julia executable: /home/brandon/julia-1.4.2/bin/julia
-- Julia_VERSION_STRING: 1.4.2
-- Julia_INCLUDE_DIRS:   /home/brandon/julia-1.4.2/include/julia
-- Julia_LIBRARY_DIR:    /home/brandon/julia-1.4.2/lib
-- Julia_LIBRARY:        /home/brandon/julia-1.4.2/lib/libjulia.so.1
-- JULIA_HOME:           /home/brandon/julia-1.4.2/bin
-- Julia_LLVM_VERSION:   v8.0.1
-- Julia_WORD_SIZE:      64
-- Found Julia: /home/brandon/julia-1.4.2/lib/libjulia.so.1 (found version "1.4.2") 
-- Found JlCxx at /home/brandon/.julia/artifacts/d54a2909808f0f05123ef98f8eef4fcde1073e52/lib
-- Configuring done
CMake Error at CMakeLists.txt:31 (add_library):
  Target "jlqml" links to target "Qt5::Svg" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

@bramtayl
Copy link
Contributor

Aha I had to install libqt5svg5-dev too

@bramtayl
Copy link
Contributor

Continuing on with the readme, now I'm getting this:

(@v1.4) pkg> add https://github.com/barche/jlqml_jll.jl.git#master
   Updating git-repo `https://github.com/barche/jlqml_jll.jl.git`
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Updating registry at `~/.julia/registries/TestRegistry`
   Updating git-repo `https://github.com/barche/TestRegistry.git`
  Resolving package versions...
    Cloning [ede63266-ebff-546c-83e0-1c6fb6d0efc8] Qt_jll from [email protected]:barche/Qt_jll.jl.git
Private key location for '[email protected]': 
ERROR: failed to clone from [email protected]:barche/Qt_jll.jl.git, error: GitError(Code:ERROR, Class:SSH, Failed to authenticate SSH session: Unable to open public key file)

@barche
Copy link
Collaborator Author

barche commented Jun 16, 2020

Ah, looks like my TestRegistry has some ssh git URLs stored, I think you can manually change the URL to https in ~/.julia/registries/TestRegistry

@bramtayl
Copy link
Contributor

I tried changing the registry and now I'm getting

(@v1.4) pkg> add https://github.com/barche/jlqml_jll.jl.git#master
   Updating git-repo `https://github.com/barche/jlqml_jll.jl.git`
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Updating registry at `~/.julia/registries/TestRegistry`
┌ Warning: Some registries failed to update:
│     — `~/.julia/registries/TestRegistry` — registry dirty
└ @ Pkg.Types /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:1131
  Resolving package versions...
    Cloning [ede63266-ebff-546c-83e0-1c6fb6d0efc8] Qt_jll from [email protected]:barche/Qt_jll.jl.git
Private key location for '[email protected]':   
ERROR: failed to clone from [email protected]:barche/Qt_jll.jl.git, error: GitError(Code:ERROR, Class:SSH, Failed to authenticate SSH session: Unable to open public key file)

@barche
Copy link
Collaborator Author

barche commented Jun 30, 2020

Update: The Qt jll is ready now, to test the current version do:

(@v1.4) pkg> add https://github.com/barche/jlqml_jll.jl.git
(@v1.4) pkg> add https://github.com/barche/QML.jl.git#propertymap-update
(@v1.4) pkg> add Observables
julia> using QML
julia> cd(joinpath(dirname(dirname(pathof(QML))),"example"))
julia> include("gui.jl")

@bramtayl
Copy link
Contributor

bramtayl commented Jul 1, 2020

Yay!

I tried that, this is what I'm getting now:

julia> using QML
[ Info: Precompiling QML [2db162a6-7e43-52c3-8d84-290c1c42d82a]
ERROR: InitError: could not load library "/usr/lib/libQt5Core.so"

@bramtayl
Copy link
Contributor

bramtayl commented Jul 1, 2020

Wait nevermind I got it to work!!! So excited thanks!!!

@giordano
Copy link
Contributor

giordano commented Jul 1, 2020

I got it to work!!! So excited thanks!!!

How? What was the problem?

@diam
Copy link

diam commented Jul 1, 2020

Thank you very much Bart : it works!!

  • Macos10.15.4 Catalina
  • julia version 1.4.0
  • But I had to update all the packages for them to work
  • Then the window must be killed for quitting
(@v1.4) pkg> update
(@v1.4) pkg> add https://github.com/barche/jlqml_jll.jl.git
(@v1.4) pkg> add https://github.com/barche/QML.jl.git#propertymap-update
(@v1.4) pkg> add Observables
julia> using QML
julia> cd(joinpath(dirname(dirname(pathof(QML))),"example"))
julia> include("gui.jl")

I assume that the QML installation will end with a single add QML?

-- Maurice

@barche
Copy link
Collaborator Author

barche commented Jul 1, 2020

Great to hear it works, although I don't understand how, since on Mac I need to manually load the Fontconfig_jll package first :)

Yes, add QML should work Real Soon Now ;)

@bramtayl
Copy link
Contributor

bramtayl commented Jul 1, 2020

@giordano I just removed everything and tried again. Not sure what did it. @barche would you be interested in documenter docs? I could make a PR?

@barche
Copy link
Collaborator Author

barche commented Jul 1, 2020

I just removed everything and tried again. Not sure what did it.

I think it may have been the Overrides.toml that caused problems

would you be interested in documenter docs? I could make a PR?

Sure, that would help! The readme even in the propertymap-update is probably out-of-date though, so you may need to check with the examples.

@bramtayl
Copy link
Contributor

bramtayl commented Jul 1, 2020

I'm getting a bunch of warnings when I try to run the tests?

julia> Pkg.test("QML")
    Testing QML
Status `/tmp/jl_oVWAvX/Manifest.toml`
  [6e4b80f9] BenchmarkTools v0.5.0
  [b99e7846] BinaryProvider v0.5.10
  [6e34b625] Bzip2_jll v1.0.6+2
  [1f15a43c] CxxWrap v0.11.0
  [2e619515] Expat_jll v2.2.7+3
  [5789e2e9] FileIO v1.3.0
  [a3f928ae] Fontconfig_jll v2.13.1+11
  [d7e528f0] FreeType2_jll v2.10.1+2
  [682c06a0] JSON v0.21.0
  [38a345b3] Libuuid_jll v2.34.0+4
  [1914dd2f] MacroTools v0.5.5
  [510215fc] Observables v0.3.1
  [69de0a69] Parsers v1.0.6
  [2db162a6] QML v0.5.0 [`~/.julia/dev/QML`]
  [ede63266] Qt_jll v5.15.0+1
  [ae029012] Requires v0.5.2
  [83775a58] Zlib_jll v1.2.11+14
  [6b5019fb] jlqml_jll v0.1.2+0 #master (https://github.com/barche/jlqml_jll.jl.git)
  [3eaa8342] libcxxwrap_julia_jll v0.8.0+0
  [2a0f44e3] Base64 
  [ade2ca70] Dates 
  [8ba89e20] Distributed 
  [b77e0a4c] InteractiveUtils 
  [76f85450] LibGit2 
  [8f399da3] Libdl 
  [37e2e46d] LinearAlgebra 
  [56ddb016] Logging 
  [d6f4376e] Markdown 
  [a63ad114] Mmap 
  [44cfe95a] Pkg 
  [de0858da] Printf 
  [3fa0cd96] REPL 
  [9a3f8284] Random 
  [ea8e919c] SHA 
  [9e88b42a] Serialization 
  [6462fe0b] Sockets 
  [2f01184e] SparseArrays 
  [10745b16] Statistics 
  [8dfed614] Test 
  [cf7118a7] UUIDs 
  [4ec0a83e] Unicode 
Running tests from badqml.jl
Warning: QQmlApplicationEngine failed to load component ((null):0, (null))
Warning: file:///home/brandon/.julia/dev/QML/test/qml/badqml.qml:7:1: Expected token `:' (file:///home/brandon/.julia/dev/QML/test/qml/badqml.qml:7, (null))
Running tests from functions.jl
Running tests from julia_arrays.jl
julia_array = Any["A", "TEST2", "Added", 2, 3]
move_array = [0, 1, 5, 6, 7, 2, 3, 4, 8, 9]
custom_list = ListElem[ListElem("a", 1), ListElem("b", 5), ListElem("ten", 10)]
Running tests from julia_object.jl
Running tests from julia_signal.jl
Running tests from libinfo.jl
qt_prefix_path() = "/home/brandon/.julia/artifacts/88bbc8793de2b34fc7d2140c7442f780a3390154"
Running tests from listviews.jl
Warning: file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:69:7: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } (file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:69, (null))
Fontconfig error: Cannot load default config file
Warning: file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:21: ReferenceError: string is not defined (file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:21, (null))
Warning: file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:21: ReferenceError: string is not defined (file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:21, (null))
Warning: file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:21: ReferenceError: string is not defined (file:///home/brandon/.julia/dev/QML/test/qml/listviews.qml:21, (null))
julia_array = Any["TEST", 1, 2.2]
Running tests from properties.jl
Running tests from qml_propertymap.jl
displaying propertymap
JuliaPropertyMap with 2 entries:
  "testkey2" => Observable{Int64} with 1 listeners. Value:
1
  "testkey1" => 3
setting ob from Julia to value 3
Debug: Setting Observable from QML to 5 (file:///home/brandon/.julia/dev/QML/test/qml/qml_propertymap.qml:12, onTriggered)
Debug: Requesting update from Julia for value 4 (file:///home/brandon/.julia/dev/QML/test/qml/qml_propertymap.qml:16, onTriggered)
Running tests from qqmlcomponent.jl
Running tests from qquickview.jl
Running tests from qstring.jl
Running tests from qtimer.jl
Running tests from qvariant.jl
Julia sum timing:
  123.596 ns (0 allocations: 0 bytes)
Variant sum timing:
  18.539 μs (100 allocations: 1.56 KiB)
Variant sum ref timing:
  2.171 μs (1 allocation: 16 bytes)
Variant return timing:
  17.680 μs (100 allocations: 1.56 KiB)
Variant return ref timing:
  1.864 μs (0 allocations: 0 bytes)
Test Summary: | Pass  Total
QML tests     |  122    122
    Testing QML tests passed 

@giordano
Copy link
Contributor

giordano commented Jul 1, 2020

For the Fontconfig error, this package needs to set FONTSCONFIG_FILE at __init__-time:

ENV["FONTCONFIG_FILE"] = fonts_conf

or maybe

ENV["FONTCONFIG_FILE"] = get(ENV, "FONTCONFIG_FILE", fonts_conf)

@diam
Copy link

diam commented Jul 1, 2020

@barche: It looks like I don't have a Fontconfig_jll installed.
With my same macos config than above, the same test than @bramtayl is ok for me :

julia> using Pkg ; Pkg.test("QML")
    Testing QML
Status `/private/var/folders/9z/ycwfksdx6y56hb8b4_5qr0sr0005gm/T/jl_ECLm7T/Manifest.toml`
  [6e4b80f9] BenchmarkTools v0.5.0
  [1f15a43c] CxxWrap v0.11.0
  [5789e2e9] FileIO v1.3.0
  [682c06a0] JSON v0.21.0
  [1914dd2f] MacroTools v0.5.5
  [510215fc] Observables v0.3.1
  [69de0a69] Parsers v1.0.6
  [2db162a6] QML v0.5.0 #propertymap-update (https://github.com/barche/QML.jl.git)
  [ede63266] Qt_jll v5.15.0+0
  [ae029012] Requires v1.0.1
  [6b5019fb] jlqml_jll v0.1.2+0 #master (https://github.com/barche/jlqml_jll.jl.git)
  [3eaa8342] libcxxwrap_julia_jll v0.8.0+0
  [2a0f44e3] Base64 
  [ade2ca70] Dates 
  [8ba89e20] Distributed 
  [b77e0a4c] InteractiveUtils 
  [76f85450] LibGit2 
  [8f399da3] Libdl 
  [37e2e46d] LinearAlgebra 
  [56ddb016] Logging 
  [d6f4376e] Markdown 
  [a63ad114] Mmap 
  [44cfe95a] Pkg 
  [de0858da] Printf 
  [3fa0cd96] REPL 
  [9a3f8284] Random 
  [ea8e919c] SHA 
  [9e88b42a] Serialization 
  [6462fe0b] Sockets 
  [2f01184e] SparseArrays 
  [10745b16] Statistics 
  [8dfed614] Test 
  [cf7118a7] UUIDs 
  [4ec0a83e] Unicode 
Running tests from badqml.jl
Warning: QQmlApplicationEngine failed to load component ((null):0, (null))
Warning: .../.julia/packages/QML/KDgga/test/qml/badqml.qml:7:1: Expected token `:' 
      (.../.julia/packages/QML/KDgga/test/qml/badqml.qml:7, (null))
Running tests from functions.jl
Running tests from julia_arrays.jl
julia_array = Any["A", "TEST2", "Added", 2, 3]
move_array = [0, 1, 5, 6, 7, 2, 3, 4, 8, 9]
custom_list = ListElem[ListElem("a", 1), ListElem("b", 5), ListElem("ten", 10)]
Running tests from julia_object.jl
Running tests from julia_signal.jl
Running tests from libinfo.jl
qt_prefix_path() = "/.../.julia/artifacts/4bfd6fb900752af41a3e7ec7e7902d401e288193"
Running tests from listviews.jl
Warning: .../.julia/packages/QML/KDgga/test/qml/listviews.qml:69:7: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } (.../.julia/packages/QML/KDgga/test/qml/listviews.qml:69, (null))
Warning: .../.julia/packages/QML/KDgga/test/qml/listviews.qml:21: ReferenceError: string is not defined (.../.julia/packages/QML/KDgga/test/qml/listviews.qml:21, (null))
Warning: .../.julia/packages/QML/KDgga/test/qml/listviews.qml:21: ReferenceError: string is not defined (.../.julia/packages/QML/KDgga/test/qml/listviews.qml:21, (null))
Warning: .../.julia/packages/QML/KDgga/test/qml/listviews.qml:21: ReferenceError: string is not defined (.../.julia/packages/QML/KDgga/test/qml/listviews.qml:21, (null))
julia_array = Any["TEST", 1, 2.2]
Running tests from properties.jl
Running tests from qml_propertymap.jl
displaying propertymap
JuliaPropertyMap with 2 entries:
  "testkey2" => Observable{Int64} with 1 listeners. Value:
1
  "testkey1" => 3
setting ob from Julia to value 3
Debug: Setting Observable from QML to 5 (.../.julia/packages/QML/KDgga/test/qml/qml_propertymap.qml:12, onTriggered)
Debug: Requesting update from Julia for value 4 (.../.julia/packages/QML/KDgga/test/qml/qml_propertymap.qml:16, onTriggered)
Running tests from qqmlcomponent.jl
Running tests from qquickview.jl
Running tests from qstring.jl
Running tests from qtimer.jl
Running tests from qvariant.jl
Julia sum timing:
  67.993 ns (0 allocations: 0 bytes)
Variant sum timing:
  17.378 μs (100 allocations: 1.56 KiB)
Variant sum ref timing:
  2.510 μs (1 allocation: 16 bytes)
Variant return timing:
  16.399 μs (100 allocations: 1.56 KiB)
Variant return ref timing:
  2.194 μs (0 allocations: 0 bytes)
Test Summary: | Pass  Total
QML tests     |  122    122
    Testing QML tests passed 

@giordano
Copy link
Contributor

giordano commented Jul 1, 2020

You should update the packages, there is Qt_jll v5.15.0+1 now

@bramtayl
Copy link
Contributor

bramtayl commented Jul 1, 2020

Ref #75

@giordano giordano mentioned this issue Jul 1, 2020
@diam
Copy link

diam commented Jul 2, 2020

giordano@

After updating (in fact after removing ~/.julia then reinstalling package), there are only still two warning.

using Pkg ; Pkg.test("QML")
...
  [4ec0a83e] Unicode 
Running tests from badqml.jl
Warning: QQmlApplicationEngine failed to load component ((null):0, (null))
Warning: .../.julia/packages/QML/vxg2L/test/qml/badqml.qml:7:1: Expected token `:' 
    (file.../.julia/packages/QML/vxg2L/test/qml/badqml.qml:7, (null))
Running tests from functions.jl
Running tests from julia_arrays.jl
...

@barche
Copy link
Collaborator Author

barche commented Jul 2, 2020

giordano@

After updating (in fact after removing ~/.julia then reinstalling package), there are only still two warning.

These are normal, that test checks that Julia doesn’t crash when you write bad QML code.

@barche
Copy link
Collaborator Author

barche commented Jul 3, 2020

The jlqml package is waiting to be merged to the general package repository, in the mean time these are the updated test instructions (everything is in the master branch now)

(@v1.4) pkg> add https://github.com/JuliaBinaryWrappers/jlqml_jll.jl.git
(@v1.4) pkg> add https://github.com/barche/QML.jl.git
(@v1.4) pkg> add Observables
julia> using QML
julia> cd(joinpath(dirname(dirname(pathof(QML))),"example"))
julia> include("gui.jl")

@ufechner7
Copy link
Member

ufechner7 commented Jul 3, 2020

I tested it, and it works for me (Julia 1.4.1, Ubuntu 18.04). 👍
And either the fonts or the sizing is a bit strange, see
Screenshot from 2020-07-04 00-45-34
screenshot.

Update: Fonts are fine, now. Thank you!

@giordano
Copy link
Contributor

giordano commented Jul 3, 2020

This is what I see:
Screenshot_20200704_000259

@barche
Copy link
Collaborator Author

barche commented Jul 4, 2020

Well, looks like "Linux on the desktop" is still next year 😂

Several factors seem to influence this, but it is related to fontconfig.

Arch linux, clean install using the instructions above:
arch

Same on Ubuntu:
ubuntu-fontconfig

Ubuntu after removing fontconfig from Qt_jll:
nofontconfig

So I think this is solvable using proper configuration, maybe using the Fontconfig Julia package?

@barche
Copy link
Collaborator Author

barche commented Jul 4, 2020

Oh, do push that "start counting" button, it crashes for me sometimes, curious how widespread that is 😬

@giordano
Copy link
Contributor

giordano commented Jul 4, 2020

I'm on Archlinux and I get something very different from you 😕

To be clear, I'm pretty sure the font problem is the same as JuliaGraphics/Cairo.jl#312 but no one so far has understood what the problem exactly is. Yesterday night I've spent some time trying to debug it once again, to no avail. The only thing I can say is that the sans serif font is picked up when I replaced the libfontconfig.so in the artifact with the system one. In #75 I insisted on using the existing value of FONTCONFIG_FILE so that the users can set it to the system one, but apparently this is of little help, apart from hiding the error message.

I have the feeling this is either a fontconfig bug that doesn't allow relocation or there are some other environment variables to set, but I don't know which. In the last section of https://www.freedesktop.org/software/fontconfig/fontconfig-user.html the relevant variables are listed, but I never managed to get find any that does the trick

@giordano
Copy link
Contributor

giordano commented Jul 4, 2020

Oh, do push that "start counting" button, it crashes for me sometimes, curious how widespread that is grimacing

I played with the gui yesterday a few times when trying to debug the font issue and it never crashed for me, it always worked quite nicely

@ufechner7
Copy link
Member

ufechner7 commented Jul 4, 2020

Ubuntu after removing fontconfig from Qt_jll

How can I remove fontconfig ?
Locate fontconfig gives me 692 hits. Which one shall I remove?

@barche
Copy link
Collaborator Author

barche commented Jul 5, 2020

How can I remove fontconfig ?
Locate fontconfig gives me 692 hits. Which one shall I remove?

The easiest way is to use the Overrides system. Create an Overrides.toml in ~/.julia/artifacts/Overrides.toml with contents like this:

[a3f928ae-7b40-5064-980b-68af3947d34b]
Fontconfig = "/localhome/user/julia/cleandepot/overrides"

Here, /localhome/user/julia/cleandepot/overrides is a directory which contains a symlink called lib to the system lib directory, i.e. on Ubuntu I did:

ln -s /usr/lib/x86_64-linux-gnu /localhome/user/julia/cleandepot/overrides/lib

(This step is needed because of JuliaLang/Pkg.jl#1704)

You then need to run Julia with the FONTCONFIG_FILE environment variable set to /etc/fonts/fonts.conf

@barche
Copy link
Collaborator Author

barche commented Jul 5, 2020

I have the feeling this is either a fontconfig bug that doesn't allow relocation or there are some other environment variables to set, but I don't know which. In the last section of https://www.freedesktop.org/software/fontconfig/fontconfig-user.html the relevant variables are listed, but I never managed to get find any that does the trick

It seems FONTCONFIG_PATH was the one we need, for me it works with the changes from commit 03e84e3 on all machines tested (Ubuntu, Centos 7, Arch)

@giordano
Copy link
Contributor

giordano commented Jul 5, 2020

Wow, thanks for finding the right combination of variables! I've probably set FONTCONFIG_PATH to a wrong value. Since this is a problem common to all packages depending on Fontconfig_jll, I'm going to fix once and for all in JuliaPackaging/Yggdrasil#1287. Note: I don't like forcing the value to /etc/fonts/fonts.conf as you did in 03e84e3: since these are standard environment variables, I prefer relying on the user setting them to the right values or use the file/directory in the artifact

Edit: I figured I should probably add a screenshot of what I get now after JuliaPackaging/Yggdrasil#1287
Screenshot_20200705_170043

@barche
Copy link
Collaborator Author

barche commented Jul 5, 2020

Yep, this works, seems setting the FONTCONFIG_PATH to the directory in the fontconfig artifact is fine too, so no need to use the system /etc/fonts for anything.

@barche
Copy link
Collaborator Author

barche commented Jul 27, 2020

All done, let's see if this works...

@JuliaRegistrator register

@barche
Copy link
Collaborator Author

barche commented Jul 27, 2020

@JuliaRegistrator register

@JuliaRegistrator
Copy link

Registration pull request created: JuliaRegistries/General/18516

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.0 -m "<description of version>" 5fa8f827e75e38207beaf28ab06d091c3cf520d4
git push origin v0.6.0

Also, note the warning: This looks like a new registration that registers version 0.6.0.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

@ufechner7
Copy link
Member

Can this issue be closed? Or what is missing?

@barche barche closed this as completed Aug 10, 2020
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

6 participants