Closed barche closed 4 years ago
@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?
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 ;)
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)
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.
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
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.
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.
Aha I had to install libqt5svg5-dev too
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 git@github.com:barche/Qt_jll.jl.git
Private key location for 'git@github.com':
ERROR: failed to clone from git@github.com:barche/Qt_jll.jl.git, error: GitError(Code:ERROR, Class:SSH, Failed to authenticate SSH session: Unable to open public key file)
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
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 git@github.com:barche/Qt_jll.jl.git
Private key location for 'git@github.com':
ERROR: failed to clone from git@github.com:barche/Qt_jll.jl.git, error: GitError(Code:ERROR, Class:SSH, Failed to authenticate SSH session: Unable to open public key file)
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")
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"
Wait nevermind I got it to work!!! So excited thanks!!!
I got it to work!!! So excited thanks!!!
How? What was the problem?
Thank you very much Bart : it works!!
(@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
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 ;)
@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?
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.
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
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)
@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
You should update the packages, there is Qt_jll v5.15.0+1 now
Ref #75
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
...
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.
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")
I tested it, and it works for me (Julia 1.4.1, Ubuntu 18.04). :+1: And either the fonts or the sizing is a bit strange, see screenshot.
Update: Fonts are fine, now. Thank you!
This is what I see:
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:
Same on Ubuntu:
Ubuntu after removing fontconfig from Qt_jll:
So I think this is solvable using proper configuration, maybe using the Fontconfig Julia package?
Oh, do push that "start counting" button, it crashes for me sometimes, curious how widespread that is 😬
I'm on Archlinux and I get something very different from you :confused:
To be clear, I'm pretty sure the font problem is the same as https://github.com/JuliaGraphics/Cairo.jl/issues/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
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
Ubuntu after removing fontconfig from Qt_jll
How can I remove fontconfig ? Locate fontconfig gives me 692 hits. Which one shall I remove?
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 https://github.com/JuliaLang/Pkg.jl/issues/1704)
You then need to run Julia with the FONTCONFIG_FILE
environment variable set to /etc/fonts/fonts.conf
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 https://github.com/barche/QML.jl/commit/03e84e3291b58c2b7e65dc8119ba9b8f446977ca on all machines tested (Ubuntu, Centos 7, Arch)
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 https://github.com/JuliaPackaging/Yggdrasil/pull/1287. Note: I don't like forcing the value to /etc/fonts/fonts.conf
as you did in https://github.com/barche/QML.jl/commit/03e84e3291b58c2b7e65dc8119ba9b8f446977ca: 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 https://github.com/JuliaPackaging/Yggdrasil/pull/1287
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.
All done, let's see if this works...
@JuliaRegistrator register
@JuliaRegistrator register
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.
Can this issue be closed? Or what is missing?
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