As a follow-up to the earlier post from February, I believe enough has changed to make a new post. Most importantly, xrepo/xmake has become more feasible as a source to get the dependencies from instead of vcpkg, with several packages getting added recently.
At the moment, I’ve had a python script for installing the dependencies using vcpkg, found at testardourdeps/vcpkg-build/InstallDependencies.vcpkg.py at main · EZ4Stephen/testardourdeps · GitHub. (Once someone verifies this to work, I’ll share it as text here.) This gets most dependencies from vcpkg, plus a few from some port overlays. So far, I haven’t received confirmation of this script working fully for anyone else, and at least one issue faced was that gperf made use of autotools as its build system, and long story short (based on discussion in the previous post), seems like running this script would fail on a non-NTFS drive.
(Note that the above script doesn’t install MSVC, and currently the installed pkgconf from vcpkg needs to be renamed to pkg-config to be used, and then you add the path of pkg-config to path. Then llvm-nm also needs to be in path, which can be done by opening developer PS/CMD. And then the .pc files’ folder needs to be set as pkg_config_path.)
But in the past few months, I have also been working on getting the dependencies to be available from xrepo. While I’m not fully there to building ardour from xrepo’s packages due to some linking errors and missing headers, the installation process seems easier.
To get the packages from xrepo:
- Install xmake by following instructions from here.
- Copy the following into an
xmake.luafile:
set_policy("package.sync_requires_to_deps", true)
add_requireconfs("**", {configs = {shared = true}, system = false})
if is_mode("debug") then
add_requireconfs("**", {configs = {debug = true}})
end
-- Host tools
if is_subhost("windows") then
add_requires("pkgconf")
else
add_requires("pkg-config")
end
add_requires("gperf", {host = true})
-- Library deps
add_requires("libcurl")
add_requires("libogg")
add_requires("libflac")
add_requires("libopus")
add_requires("libvorbis")
add_requires("libsndfile")
add_requires("zlib")
add_requires("bzip2")
add_requires("lz4")
add_requires("zstd")
add_requires("openssl3")
add_requires("libarchive")
add_requires("liblo")
add_requires("utfcpp")
add_requires("taglib")
add_requires("vamp-plugin-sdk")
add_requires("libusb")
add_requires("rubberband")
add_requires("jack2")
add_requires("fftw")
add_requires("aubio")
add_requires("libxml2")
add_requires("cppunit")
add_requires("libwebsockets")
add_requires("portaudio", {configs = {asio = true}})
add_requires("libsamplerate")
add_requires("lv2")
add_requires("serd")
add_requires("zix")
add_requires("sord")
add_requires("sratom")
add_requires("lilv")
add_requires("libjpeg-turbo")
add_requires("boost")
add_requires("libffi")
add_requires("libintl")
add_requires("pcre2")
add_requires("glib")
add_requires("fribidi")
add_requires("freetype")
add_requires("harfbuzz", {configs = {glib = true}})
add_requires("expat")
add_requires("fontconfig")
add_requires("libpng")
add_requires("pixman")
add_requires("cairo")
add_requires("pango")
add_requires("libsigcplusplus <3.0.0")
add_requires("glibmm <2.68.0")
add_requires("cairomm <1.16.0")
add_requires("pangomm <2.48.0")
if is_plat("windows") then
add_requires("pthreads4w")
add_requires("wingetopt")
end
target("collect_deps")
set_kind("phony")
after_load(function()
import("core.project.project")
import("core.project.config")
local dest = path.join(os.projectdir(), config.mode() or "release")
local subdirs = {"include", "lib"}
if is_plat("windows") then table.insert(subdirs, "bin") end
for _, pkg in pairs(project.required_packages()) do
local dir = pkg:installdir()
if dir and os.isdir(dir) then
for _, sub in ipairs(subdirs) do
local src = path.join(dir, sub)
if os.isdir(src) then
for _, fp in ipairs(os.files(path.join(src, "**"))) do
local tgt = path.join(dest, sub, path.relative(fp, src))
os.mkdir(path.directory(tgt))
os.cp(fp, tgt)
end
end
end
end
end
end)
- In a terminal, go to where the xmake.lua file is located, then run
xmake f, then press Enter. (or, runxmake f -yto not need to press another key.)
This should take <25 minutes (at most, it should still take less time than vcpkg), and likely boost will be the last package that gets installed, after which the terminal will take a few seconds to copy the files into a folder called “release”.
But this time, pkg-config is in release/bin, the includes are in release/include, and the .pc files are in release/lib/pkgconfig. Accordingly you can set your path and pkg_config_path variables (and pass the include and lib folders to Ardour’s configure using --also-include and --also-libdir.)
Current (known) catches
- jack and libusb’s .pc files are incorrectly named. They will not be detected during configure.
- libintl has a malformed line in its include header (at least for windows/mingw shared builds?) in line 52, which would generate some warnings.
- You also need to pass the
release/include/pthreadfolder into--also-includefor pthread.h. - In its current state, you will face errors during the build phase of Ardour:
The link step of pbd currently givesunresolved external symbol __imp_libintl_dgettext.
If it reaches temporal, it’ll say some boost headers are missing.
I’m in the process of getting these issues fixed upstream (to be specific, xmake-io/xmake-repo), but in the meantime if someone were to try installing these packages on Windows, the above steps to install the dependencies should be easy to run.
(Also note: I did mark some of the script as being for windows, just in case someone were to test the above on another platform. I cannot confirm all packages exist for any other platform on xrepo, and any package(s) missing will give an error beforehand.)