Describe the bug
DOSBox Staging is transitioning to meson. We depend on FluidSynth (2.x, a CMake project), which in turn depends on Glib-2.0 (a Meson project), both of which aren't guaranteed to exist on all our supported platforms - so we've written Meson wraps for them.
When _both_ FluidSynth and Glib do not exist on a system, the fluidsynth subproject is not being provided the glib-2.0 dependencies generated from the glib subproject.
Here's how it plays out sequentially if Glib doesn't exist:
glib_dep = dependency('glib-2.0', fallback : ['glib'])
gthread_dep = dependency('gthread-2.0', fallback : ['glib'])
All goes well -- Meson falls back to the glib subproject wrap and reports the dependencies are found:
Run-time dependency glib-2.0 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency glib-2.0
|Executing subproject glib method meson
|Project name: glib
|Project version: 2.67.1
...
Dependency glib-2.0 found: YES 2.67.1 (overridden)
Dependency gthread-2.0 found: YES 2.67.1 (overridden)
Great - so Meson is taking care of that for us. Onto FluidSynth..
Executing subproject fluidsynth method cmake
||Configuring the build directory with CMake version 3.16.3
||-- Checking for modules 'glib-2.0>=2.6.5;gthread-2.0>=2.6.5'
||-- No package 'glib-2.0' found
||-- Package 'glib-2.0', required by 'gthread-2.0', not found
|| A required package was not found
So despite Meson telling us it has control of glib-2.0 found: YES 2.67.1 and gthread-2.0 found: YES 2.67.1, it's unable to provide them to the cmake subproject, despite FluidSynth being configured it with these dependencies:
fluidsynth_proj = cmake.subproject('fluidsynth')
fluidsynth_proj.dependency('glib-2.0', fallback: ['glib'])
fluidsynth_proj.dependency('gthread-2.0', fallback: ['glib'])
fluidsynth_dep = fluidsynth_proj.dependency(
'fluidsynth',
version : '>=2',
fallback: ['fluidsynth'],
dependencies: ['glib-2.0', 'gthread-2.0']
)
To Reproduce
See attached tarball consisting of tiny 19-line meson.build and two wraps to reproduce the issue.
_Note_: To have Meson fallback to using the Glib subproject, you will need to hide your system's existing Glib library. You can do this temporarily by moving glib's pkg-config (.pc) file, such as:
cd /usr/lib/x86_64-linux-gnu/pkgconfig && sudo mv glib-2.0.pc glib-2.0.pc-bak
Expected behavior
If Meson says it has a given dependency (via system discovery or subproject fallback), then subsequently using that dependency (such as in other subprojects) should "just work".
I guess this means that Meson doesn't know how to provide dependencies to cmake.subprojects?
system parameters
I think the problem happens because you try to put fluidsynth's dependencies in dosbox-staging project file. The correct solution will probably be providing a build patch - build patch archive should probably include a meson.build with associated dependencies (this way they won't pollute dosbox-staging project - if fluidsynth will depend on new libs or remove existing ones, it will affect a wrap file and not our project directly).
But I am not a meson expert, only kicked off the transition… Advice from a seasoned meson user/developer would be great.
This is currently a known issue with CMake subprojects.
I guess this means that Meson doesn't know how to provide dependencies to
cmake.subprojects?
This is exactly the issue. The problem is that we use CMake itself to configure cmake.subprojects and we currently have no way to provide subproject dependency information to CMake.
The problem is especially tricky because nothing of the subproject exists when CMake is run. We would essentially need a mechanism to communicate subproject dependencies that are built by meson to CMake, which should not be impossible but is still tricky.
if fluidsynth will depend on new libs or remove existing ones, it will affect a wrap file and not our project directly
@dreamer , this would be a nice solution as well - to embed a subproject's dependencies directly in its own wrap file. This isn't yet available (I don't believe), even for meson-based subprojects managed via a wrap.
I guess this means that Meson doesn't know how to provide dependencies to cmake.subprojects?
This is exactly the issue. The problem is especially tricky because nothing of the subproject exists when CMake is run.
@mensinda, I suspect this might be generalized to chaining dependency discovery in a pure-source-build environment? (absent pkg-config records).
A depends on B
`- B depends on C
`- C depends on nothing
Let's assume they don't have pkg-config records.
Let's also assume each package wants hard-proof their dependencies exist, ie: library symbols, #define values, and lightweight compile and linking tests.
Solving this requires downstream dependencies be both built _and_ installed prior to upstream dependers.
C-build & install
|- ..
|- B-configure (gather results: from C's installed headers & libs)
`- B-build & install
|- ..
|- .. A-configure (gather results: from B's installed headers & libs)
`- .. A-build & install
I believe solving this robustly will involve:
This is the only robust way I see to solve heterogeneous dependency projects.
Right now, meson's workflow is "flat": one big config-everything step, followed by one-big-build step: this only works when everything can be defined upfront; be it a mix of meson.build files and pkg-config records.
Does meson have some kind of workflow control? Can I tell meson to exercise the build/install phase for a specific dependency _prior to the configuration phase_ of another?
For CMake specifically, can its dependency checks be pacified through some environment variables or options - such that it can be told _"You will have glib-2.0 v1.66.1 at the time of compiling, just take my word for it"_?
Solving this requires downstream dependencies be both built and installed prior to upstream dependers.
This approach won't fly, unfortunately. Any approach that has required building a project during meson configure time was rejected (for good reasons).
My current idea (not 100% sure that this will work) is to generate some dummy FindXXX.cmake files and tell CMake to look for those first with metadata for meson. This way we can make CMake "happy" and meson can still deduce subproject dependencies from the resulting CMake output.
Near-term workarounds?
Not that I am aware of.
Thanks for the assessment, @mensinda.
My current idea (not 100% sure that this will work) is to generate some dummy
FindXXX.cmakefiles and tell CMake to look for those first with metadata for meson. This way we can make CMake "happy" and meson can still deduce subproject dependencies from the resulting CMake output.Near-term workarounds?
Not that I am aware of.
Near-term enough; the idea idea is half the battle :-)
I suspect this will be the lynchpin allowing us to provide equally robust coverage as autotools on platforms currently requiring source builds and static linkage of FluidSynth 2.x and its deps.
fluidsynth has a cmake option enable-pkgconfig for trying to use pkg-config to find glib / other deps. If it uses pkg-config, then the glib subproject does provide pkg-config files, and since 0.54 meson generates -uninstalled.pc versions of these in <builddir>/meson-uninstalled.
So if that directory is in your PKG_CONFIG_PATH then cmake should be able to know ahead of time, that there's a public linkable interface to glib via the pkg-config lookup, and proceed with configuring.
The non-pkg-config lookup in fluidsynth uses:
FIND_LIBRARY( GLIB_LIB NAMES glib glib-2.0 PATH GLIB_LIBRARY_DIR )
FIND_LIBRARY( GTHREAD_LIB NAMES gthread gthread-2.0 PATH GTHREAD_LIBRARY_DIR )
FIND_PATH( GLIBH_DIR glib.h PATH GLIB_INCLUDE_DIR )
FIND_PATH( GLIBCONF_DIR glibconfig.h PATH GLIBCONF_INCLUDE_DIR )
I think it could be reasonably expected that cmake subprojects won't ever work with this to find meson subprojects.
@mensinda, I don't see how FindXXX.cmake would work here if the subproject doesn't use find_package(), generally by writing their own cmake_modules/FindXXX.cmake containing the actual find_library() goop. And quite frankly I'm not hopeful that lots of projects will do the technically correct thing here. :p
Though yes, it would give projects a way forward to "fix your stuff so meson can use it".
fluidsynth has a cmake option enable-pkgconfig for trying to use pkg-config to find glib / other deps
Indeed; and that relies on upstream deps being built and installed prior to downstream deps: but doing so without depending on external scripts requires a DAG and a workflow change.
The non-pkg-config lookup in fluidsynth uses:
FIND_LIBRARY( GLIB_LIB NAMES glib glib-2.0 PATH GLIB_LIBRARY_DIR )
FIND_LIBRARY( GTHREAD_LIB NAMES gthread gthread-2.0 PATH GTHREAD_LIBRARY_DIR )
FIND_PATH( GLIBH_DIR glib.h PATH GLIB_INCLUDE_DIR )
FIND_PATH( GLIBCONF_DIR glibconfig.h PATH GLIBCONF_INCLUDE_DIR )
I think it could be reasonably expected that cmake subprojects won't ever work with this to find meson subprojects.
I agree; it's too unreliable to have meson discover and populate this dynamically... But allowing the author to manually specify these linkages would help meson connect the dots into cmake.
For example, by telling meson to use its understanding of glib_dep's header path to be passed into FluidSynth's cmake.subproject settings as the GLIBH_DIR variable. Likewise passing glib_dep's library in as GLIB_LIB: presumably both would allow this check to be skipped. Perhaps a library version linkage would be an option too.
Indeed; and that relies on upstream deps being built and installed prior to downstream deps: but doing so without depending on external scripts requires a DAG and a workflow change.
No, it does not... I specifically mentioned -uninstalled.pc for an extremely good reason as pkg-config files are generated during configure, not build. It does not matter if they reference libraries that aren't built yet -- they will be built later during the build, but they still permit cmake to know during configure, that it should rely on them being available.
I specifically mentioned -uninstalled.pc for an extremely good reason as pkg-config files are generated during configure, not build.
Ahh; my fault @mensinda -- this was a fact I did not realize! Thank you for this.
In that case, then I think we're in business if you can connected the dots to the subpackage's configure-generated .pc files!
Did you try exporting PKG_CONFIG_PATH yourself, before running meson configure? Did it work?
@mensinda, I don't see how FindXXX.cmake would work here if the subproject doesn't use find_package(), generally by writing their own cmake_modules/FindXXX.cmake containing the actual find_library() goop. And quite frankly I'm not hopeful that lots of projects will do the technically correct thing here. :p
This is indeed quite the challenge. However, we do have the preload.cmake script where we are already overwriting some functions for better integration with meson. We could do the same for find_package() to redirect to one of our generated *.cmake files when required.
I am well aware of how suboptimal this solution would be (and I do feel a bit unclean after proposing this), however, this would be the only reliable way of "fixing" those vendored FindXXX.cmake files.
Also, CMake projects using pkg-config is far from the norm, since most projects only use the CMake provided stuff or write their own FindXXX.cmake files.
So even though overriding PKG_CONFIG_PATH with
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/build/meson-uninstalledis used during the cmake subproject configure phase, the subproject is looking forglib-2.0and notglib-2.0-uninstalled.
This is not even how pkg-config works. If glib-2.0-uninstalled.pc is found on the search path, it is used instead of glib-2.0.pc, that is literally the entire, sole, explicit purpose of -uninstalled.pc files.
So if this doesn't work, it's NOT because "they have the wrong names", it's either due to cmake not using a conformant pkg-config implementation, or it is due to the cmake subproject getting configured before the glib subproject. The order of dependency() calls should be relevant here.
@eli-schwartz .. thanks for the explanation - TIL.
I'm trying this now, but getting:
File "~/.local/lib/python3.8/site-packages/mesonbuild/cmake/interpreter.py", line 1005, in analyse
tgt.postprocess(self.output_target_map, self.src_dir, self.subdir, self.install_prefix, self.trace)
File "~/.local/lib/python3.8/site-packages/mesonbuild/cmake/interpreter.py", line 465, in postprocess
self.includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.includes)] + [build_dir_rel]))
File "~/.local/lib/python3.8/site-packages/mesonbuild/cmake/interpreter.py", line 465, in <listcomp>
self.includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.includes)] + [build_dir_rel]))
File "~/.local/lib/python3.8/site-packages/mesonbuild/cmake/interpreter.py", line 458, in rel_path
return x.relative_to(Path(self.env.get_build_dir()) / subdir)
File "/usr/lib/python3.8/pathlib.py", line 907, in relative_to
raise ValueError("{!r} does not start with {!r}"
However suspect this is a problem in my meson.build file. Will try to fix and report back.
Deleting my prior comment to keep the signal-to-noise on track here.
@kcgen This looks like a different meson bug and should definitely not happen. Could you please provide some steps on how to reproduce this (in a new issue)?
meson.build
project('test', ['c', 'cpp'])
glib_dep = dependency('glib-2.0', fallback : ['glib'])
gthread_dep = dependency('gthread-2.0', fallback : ['glib'])
cmake = import('cmake')
fluidsynth_proj = cmake.subproject('fluidsynth')
subprojects/glib.wrap
[wrap-git]
url = https://gitlab.gnome.org/GNOME/glib.git
revision = master
depth = 1
[provide]
dependency_names = glib-2.0, gthread-2.0, gobject-2.0, gio-2.0
subprojects/fluidsynth.wrap
[wrap-git]
url = https://github.com/FluidSynth/fluidsynth.git
revision = master
depth = 1
[provide]
dependency_names = fluidsynth
( cd /usr/lib/x86_64-linux-gnu/pkgconfig
[[ -f glib-2.0.pc ]] && sudo mv glib-2.0.pc glib-2.0.pc-bak )
export PKG_CONFIG_PATH="$PWD/build/meson-uninstalled"
meson setup build
cd build
meson configure
Maybe my meson.build file is missing some required fields or syntax?
But good news - the exception occurs at the tail end of the configure phase, and the Cmake subproject is indeed picking up the generated -uninstalled PCs as you anticipated!
||-- Checking for modules 'glib-2.0>=2.6.5;gthread-2.0>=2.6.5'
||-- Found glib-2.0, version 2.67.1
||-- Found gthread-2.0, version 2.67.1
Nice. So, cmake can depend on a meson project as long as they both use pkg-config for an interchange format.
Maybe it would make sense to automatically add the meson-uninstalled directory to the pkg_config_path for at least cmake subprojects. Less manual intervention for the user trying to do the build.
@eli-schwartz - have you reproduce the exception?
...
File "~/.local/lib/python3.8/site-packages/mesonbuild/cmake/interpreter.py", line 465, in <listcomp>
self.includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.includes)] + [build_dir_rel]))
File "~/.local/lib/python3.8/site-packages/mesonbuild/cmake/interpreter.py", line 458, in rel_path
return x.relative_to(Path(self.env.get_build_dir()) / subdir)
File "/usr/lib/python3.8/pathlib.py", line 907, in relative_to
raise ValueError("{!r} does not start with {!r}"
Currently meson configure is unable to finish cleanly.
Indeed...
$ PKG_CONFIG_PATH=$PWD/builddir/meson-uninstalled/ meson builddir --wrap-mode=forcefallback
Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
The Meson build system
Version: 0.56.0
Source dir: /tmp/proj
Build dir: /tmp/proj/builddir
Build type: native build
Project name: test
Project version: undefined
C compiler for the host machine: ccache cc (gcc 10.2.0 "cc (GCC) 10.2.0")
C linker for the host machine: cc ld.bfd 2.35.1
C++ compiler for the host machine: ccache c++ (gcc 10.2.0 "c++ (GCC) 10.2.0")
C++ linker for the host machine: c++ ld.bfd 2.35.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Looking for a fallback subproject for the dependency glib-2.0 because:
Use of fallback dependencies is forced.
|Executing subproject glib method meson
|
|Project name: glib
|Project version: 2.67.1
|C compiler for the host machine: ccache cc (gcc 10.2.0 "cc (GCC) 10.2.0")
|C linker for the host machine: cc ld.bfd 2.35.1
|C++ compiler for the host machine: ccache c++ (gcc 10.2.0 "c++ (GCC) 10.2.0")
|C++ linker for the host machine: c++ ld.bfd 2.35.1
|Compiler for C supports arguments -fno-strict-aliasing: YES
|Checking if "GNU C visibility attributes test" compiles: YES
|Compiler for C supports arguments -fvisibility=hidden: YES
|Message: Enabling various debug infrastructure
|Has header "alloca.h" : YES
|Has header "crt_externs.h" : NO
|Has header "dirent.h" : YES
|Has header "float.h" : YES
|Has header "fstab.h" : YES
|Has header "grp.h" : YES
|Has header "inttypes.h" : YES
|Has header "limits.h" : YES
|Has header "linux/magic.h" : YES
|Has header "locale.h" : YES
|Has header "mach/mach_time.h" : NO
|Has header "memory.h" : YES
|Has header "mntent.h" : YES
|Has header "poll.h" : YES
|Has header "pwd.h" : YES
|Has header "sched.h" : YES
|Has header "spawn.h" : YES
|Has header "stdint.h" : YES
|Has header "stdlib.h" : YES
|Has header "string.h" : YES
|Has header "strings.h" : YES
|Has header "sys/auxv.h" : YES
|Has header "sys/event.h" : NO
|Has header "sys/filio.h" : NO
|Has header "sys/inotify.h" : YES
|Has header "sys/mkdev.h" : NO
|Has header "sys/mntctl.h" : NO
|Has header "sys/mnttab.h" : NO
|Has header "sys/mount.h" : YES
|Has header "sys/param.h" : YES
|Has header "sys/resource.h" : YES
|Has header "sys/select.h" : YES
|Has header "sys/statfs.h" : YES
|Has header "sys/stat.h" : YES
|Has header "sys/statvfs.h" : YES
|Has header "sys/sysctl.h" : NO
|Has header "sys/time.h" : YES
|Has header "sys/times.h" : YES
|Has header "sys/types.h" : YES
|Has header "sys/uio.h" : YES
|Has header "sys/vfs.h" : YES
|Has header "sys/vfstab.h" : NO
|Has header "sys/vmount.h" : NO
|Has header "sys/wait.h" : YES
|Has header "termios.h" : YES
|Has header "unistd.h" : YES
|Has header "values.h" : YES
|Has header "wchar.h" : YES
|Has header "xlocale.h" : NO
|Checking if "malloc.h" compiles: YES
|Has header "linux/netlink.h" : YES
|Checking if "statx() test" compiles: YES
|Header <locale.h> has symbol "LC_MESSAGES" : YES
|Checking whether type "struct stat" has member "st_mtimensec" : NO
|Checking whether type "struct stat" has member "st_mtim.tv_nsec" : YES
|Checking whether type "struct stat" has member "st_atimensec" : NO
|Checking whether type "struct stat" has member "st_atim.tv_nsec" : YES
|Checking whether type "struct stat" has member "st_ctimensec" : NO
|Checking whether type "struct stat" has member "st_ctim.tv_nsec" : YES
|Checking whether type "struct stat" has member "st_birthtime" : NO
|Checking whether type "struct stat" has member "st_birthtimensec" : NO
|Checking whether type "struct stat" has member "st_birthtim" : NO
|Checking whether type "struct stat" has member "st_birthtim.tv_nsec" : NO
|Checking whether type "struct stat" has member "st_blksize" : YES
|Checking whether type "struct stat" has member "st_blocks" : YES
|Checking whether type "struct statfs" has member "f_fstypename" : NO
|Checking whether type "struct statfs" has member "f_bavail" : YES
|Checking whether type "struct dirent" has member "d_type" : YES
|Checking whether type "struct statvfs" has member "f_basetype" : NO
|Checking whether type "struct statvfs" has member "f_fstypename" : NO
|Checking whether type "struct tm" has member "tm_gmtoff" : YES
|Checking whether type "struct tm" has member "__tm_gmtoff" : NO
|Compiler for C supports arguments -Wduplicated-branches: YES
|Compiler for C supports arguments -Wimplicit-fallthrough: YES
|Compiler for C supports arguments -Wmisleading-indentation: YES
|Compiler for C supports arguments -Wstrict-prototypes: YES
|Compiler for C supports arguments -Wunused: YES
|Compiler for C supports arguments -Wno-unused-parameter: YES
|Compiler for C supports arguments -Wno-bad-function-cast: YES
|Compiler for C supports arguments -Wno-cast-function-type: YES
|Compiler for C supports arguments -Wno-pedantic: YES
|Compiler for C supports arguments -Wno-format-zero-length: YES
|Compiler for C supports arguments -Werror=declaration-after-statement: YES
|Compiler for C supports arguments -Werror=format=2: YES
|Compiler for C supports arguments -Werror=implicit-function-declaration: YES
|Compiler for C supports arguments -Werror=init-self: YES
|Compiler for C supports arguments -Werror=missing-include-dirs: YES
|Compiler for C supports arguments -Werror=missing-prototypes: YES
|Compiler for C supports arguments -Werror=pointer-arith: YES
|Compiler for C supports link arguments -Wl,-z,nodelete: YES
|Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES
|Checking for function "close_range" : NO
|Checking for function "endmntent" : YES
|Checking for function "endservent" : YES
|Checking for function "fallocate" : YES
|Checking for function "fchmod" : YES
|Checking for function "fchown" : YES
|Checking for function "fdwalk" : NO
|Checking for function "fsync" : YES
|Checking for function "getauxval" : YES
|Checking for function "getc_unlocked" : YES
|Checking for function "getfsstat" : NO
|Checking for function "getgrgid_r" : YES
|Checking for function "getmntent_r" : YES
|Checking for function "getpwuid_r" : YES
|Checking for function "getresuid" : YES
|Checking for function "getvfsstat" : NO
|Checking for function "gmtime_r" : YES
|Checking for function "hasmntopt" : YES
|Checking for function "inotify_init1" : YES
|Checking for function "issetugid" : NO
|Checking for function "kevent" : NO
|Checking for function "kqueue" : NO
|Checking for function "lchmod" : YES
|Checking for function "lchown" : YES
|Checking for function "link" : YES
|Checking for function "localtime_r" : YES
|Checking for function "lstat" : YES
|Checking for function "mbrtowc" : YES
|Checking for function "memalign" : YES
|Checking for function "mmap" : YES
|Checking for function "newlocale" : YES
|Checking for function "pipe2" : YES
|Checking for function "poll" : YES
|Checking for function "prlimit" : YES
|Checking for function "readlink" : YES
|Checking for function "recvmmsg" : YES
|Checking for function "sendmmsg" : YES
|Checking for function "setenv" : YES
|Checking for function "setmntent" : YES
|Checking for function "strerror_r" : YES
|Checking for function "strnlen" : YES
|Checking for function "strsignal" : YES
|Checking for function "strtod_l" : YES
|Checking for function "strtoll_l" : YES
|Checking for function "strtoull_l" : YES
|Checking for function "symlink" : YES
|Checking for function "timegm" : YES
|Checking for function "unsetenv" : YES
|Checking for function "uselocale" : YES
|Checking for function "utimes" : YES
|Checking for function "valloc" : YES
|Checking for function "vasprintf" : YES
|Checking for function "vsnprintf" : YES
|Checking for function "wcrtomb" : YES
|Checking for function "wcslen" : YES
|Checking for function "wcsnlen" : YES
|Checking for function "sysctlbyname" : NO
|Checking for function "statvfs" : YES
|Checking for function "statfs" : YES
|Checking for function "if_indextoname" : YES
|Checking for function "if_nametoindex" : YES
|Checking for function "splice" : YES
|Checking for function "stpcpy" : YES
|Checking for function "posix_memalign" : YES
|Checking for function "posix_spawn" : YES
|Checking if "strerror_r() returns char *" compiles: YES
|Checking for function "snprintf" : YES
|Checking for function "strcasecmp" : YES
|Checking for function "strncasecmp" : YES
|Header <sys/sysmacros.h> has symbol "major" : YES
|Header <dlfcn.h> has symbol "RTLD_LAZY" : YES
|Header <dlfcn.h> has symbol "RTLD_NOW" : YES
|Header <dlfcn.h> has symbol "RTLD_GLOBAL" : YES
|Header <dlfcn.h> has symbol "RTLD_NEXT" : YES
|Message: Checking whether to use statfs or statvfs .. statfs
|Checking for function "mkostemp" : YES
|Checking if "futex(2) system call" links: YES
|Checking if "eventfd(2) system call" links: YES
|Checking if "__uint128_t available" compiles: YES
|Checking if "clock_gettime" links: YES
|Checking if "dlopen() and dlsym() in system libraries" links: NO
|Checking if "dlopen() and dlsym() in libdl" links: YES
|Library dl found: YES
|Checking if "number of arguments to statfs() (n=2)" compiles: YES
|Checking if "open() option O_DIRECTORY" compiles: YES
|Checking if "fcntl() option F_FULLFSYNC" compiles: NO
|Checking if "C99 vsnprintf" runs: YES
|Checking if "C99 snprintf" runs: YES
|Checking if "Unix98 printf positional parameters" runs: YES
|Checking if "nl_langinfo and CODESET" links: YES
|Checking if "nl_langinfo (PM_STR)" links: YES
|Checking if "nl_langinfo (_NL_CTYPE_OUTDIGITn_MB)" links: YES
|Checking if "nl_langinfo (ALTMON_n)" links: YES
|Checking if "nl_langinfo (_NL_ABALTMON_n)" links: YES
|Checking if "signed" compiles: YES
|Header <stddef.h> has symbol "ptrdiff_t" : YES
|Checking if "sig_atomic_t" links: YES
|Checking if "long long" compiles: YES
|Checking if "long double" compiles: YES
|Header <stddef.h> has symbol "wchar_t" : YES
|Header <wchar.h> has symbol "wint_t" : YES
|Checking if "uintmax_t in inttypes.h" compiles: YES
|Checking if "uintmax_t in stdint.h" compiles: YES
|Checking for size of "char" : 1
|Checking for size of "short" : 2
|Checking for size of "int" : 4
|Checking for size of "void*" : 8
|Checking for size of "long" : 8
|Checking for size of "long long" : 8
|Checking for size of "size_t" : 8
|Checking for size of "ssize_t" : 8
|Checking if "int64_t is long" compiles: YES
|Checking for alignment of "char" : 1
|Checking for alignment of "short" : 2
|Checking for alignment of "int" : 4
|Checking for alignment of "void*" : 8
|Checking for alignment of "long" : 8
|Checking for alignment of "long long" : 8
|Checking for alignment of "size_t" : 8
|Checking for size of "wchar_t" : 4
|Checking if "GCC size_t typedef is long" compiles: YES
|Checking if "GCC size_t typedef is long long" compiles: NO
|Checking if "__va_copy check" compiles: YES
|Checking if "va_copy check" compiles: YES
|Checking if "va_lists can be copied as values" runs: DID NOT COMPILE
|Checking if "ISO C99 varargs macros in C" compiles: YES
|Checking if "ISO C99 varargs macros in C++" compiles: YES
|Checking if "GNUC varargs macros" compiles: YES
|Has header "alloca.h" : YES (cached)
|Has header "sys/poll.h" : YES
|Has header "sys/types.h" : YES (cached)
|Has header "winsock2.h" : NO
|Computing int of "POLLIN" : 1
|Computing int of "POLLOUT" : 4
|Computing int of "POLLPRI" : 2
|Computing int of "POLLERR" : 8
|Computing int of "POLLHUP" : 16
|Computing int of "POLLNVAL" : 32
|Computing int of "AF_UNIX" : 1
|Computing int of "AF_INET" : 2
|Computing int of "AF_INET6" : 10
|Computing int of "MSG_OOB" : 1
|Computing int of "MSG_PEEK" : 2
|Computing int of "MSG_DONTROUTE" : 4
|Checking if "atomic ops" links: YES
|Checking if "atomic ops define" compiles: YES
|Run-time dependency threads found: YES
|Header <pthread.h> has symbol "pthread_attr_setstacksize" : YES
|Header <pthread.h> has symbol "pthread_attr_setinheritsched" : YES
|Header <pthread.h> has symbol "pthread_condattr_setclock" : YES
|Header <pthread.h> has symbol "pthread_cond_timedwait_relative_np" : NO
|Header <pthread.h> has symbol "pthread_getname_np" : YES
|Header <sys/syscall.h> has symbol "SYS_sched_getattr" : YES
|Checking if "pthread_setname_np(const char*)" with dependency threads links: NO
|Checking if "pthread_setname_np(pthread_t, const char*)" with dependency threads links: YES
|Checking if "stack grows check" runs: NO (1)
|Checking for function "iconv_open" : YES
|Found pkg-config: /usr/bin/pkg-config (1.7.3)
|Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
|Run-time dependency libpcre found: YES 8.44
|Library m found: YES
|Looking for a fallback subproject for the dependency libffi because:
|Use of fallback dependencies is forced.
|Using subprojects/glib/subprojects/libffi.wrap
|
||Executing subproject libffi method meson
||
||Project name: libffi
||Project version: 3.2.9999
||C compiler for the host machine: ccache cc (gcc 10.2.0 "cc (GCC) 10.2.0")
||C linker for the host machine: cc ld.bfd 2.35.1
||Message: host cpu: x86_64
||Message: host cpu_family: x86_64
||Message: host system: linux
||Checking if "ASM .cfi" compiles: NO
||Checking if "ASM x86 PCREL" compiles: YES
||Checking if "ASM .ascii" compiles: YES
||Checking if "ASM .string" compiles: YES
||Checking for size of "size_t" : 8
||Checking for size of "long double" : 16
||Checking for size of "double" : 8
||Message: sizeof "long double" is greater than "double"
||Message: .eh_frame is hard-coded to not be ro
||Message: Assembler supports .unwind section type
||Checking for function "memcpy" : YES
||Checking for function "mkostemp" : YES
||Has header "alloca.h" : YES (cached)
||Has header "inttypes.h" : YES (cached)
||Has header "stdint.h" : YES (cached)
||Compiler for C supports function attribute visibility: YES
||Program test-cc-supports-hidden-visibility.py found: YES (/usr/bin/python /tmp/proj/subprojects/libffi/test-cc-supports-hidden-visibility.py)
||Message: .hidden pseudo-op is available
||Program msvcc.sh found: YES (/tmp/proj/subprojects/libffi/msvcc.sh)
||Configuring ffi-x86_64.h using configuration
||Configuring ffitarget.h using configuration
||Configuring ffi.h using configuration
||Configuring fficonfig.h using configuration
||Build targets in project: 1
||Subproject libffi finished.
|
|Dependency libffi from subproject subprojects/libffi found: YES 3.2.9999
|Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
|Run-time dependency zlib found: YES 1.2.11
|Checking for function "ngettext" : YES
|Checking for function "bind_textdomain_codeset" : YES
|Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
|Run-time dependency mount found: YES 2.36.1
|Found CMake: /usr/bin/cmake (3.19.1)
|Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
|Checking for function "getxattr" : YES
|Has header "sys/xattr.h" : YES
|Checking if "XATTR_NOFOLLOW" compiles: NO
|Checking for function "strlcpy" : NO
|Checking if "/proc/self/cmdline" runs: YES
|Program python3 found: YES (/usr/bin/python3)
|Program bash found: YES (/usr/bin/bash)
|Program sh found: YES (/usr/bin/sh)
|Program env found: YES (/usr/bin/env)
|Configuring glibconfig.h using configuration
|Dependency sysprof-capture-4 skipped: feature sysprof disabled
|Configuring gtester-report using configuration
|Configuring libglib-2.0.so.0.6701.0-gdb.py using configuration
|Program xmllint found: YES (/usr/bin/xmllint)
|Configuring glib-genmarshal using configuration
|Program glib-genmarshal found: YES (/tmp/proj/builddir/subprojects/glib/gobject/glib-genmarshal)
|Configuring glib-mkenums using configuration
|Program glib-mkenums found: YES (/tmp/proj/builddir/subprojects/glib/gobject/glib-mkenums)
|Configuring libgobject-2.0.so.0.6701.0-gdb.py using configuration
|Checking if "dlsym() preceding underscores" with dependency -ldl runs: NO (1)
|Checking for function "dlerror" with dependency -ldl: YES
|Configuring gmoduleconf.h using configuration
|Checking if "C_IN in public headers (no arpa/nameser_compat.h needed)" compiles: YES
|Checking if "res_query()" links: NO
|Checking if "res_query() in -lresolv" links: YES
|Library resolv found: YES
|Checking if "socket()" links: YES
|Checking if "res_init()" links: YES
|Checking if "res_nclose()" links: YES
|Checking if "res_ndestroy()" links: NO
|Checking if "res_ninit()" links: YES
|Checking if "res_nquery()" links: YES
|Checking for type "struct ip_mreqn" : YES
|Checking if "ioctl with request SIOCGIFADDR" compiles: YES
|Configuring gnetworking.h using configuration
|Configuring gdbus-codegen using configuration
|Program gdbus-codegen found: YES (/tmp/proj/builddir/subprojects/glib/gio/gdbus-2.0/codegen/gdbus-codegen)
|Configuring config.py using configuration
|Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
|Run-time dependency libelf found: YES 0.178
|Program gengiotypefuncs.py found: YES (/usr/bin/python /tmp/proj/subprojects/glib/gio/tests/gengiotypefuncs.py)
|Using 'PKG_CONFIG_PATH' from environment with value: '/tmp/proj/builddir/meson-uninstalled/'
|Run-time dependency dbus-1 found: YES 1.12.20
|Program dbus-daemon found: YES (/usr/bin/dbus-daemon)
|Program msgfmt found: YES (/usr/bin/msgfmt)
|Configuring appinfo-test-gnome.desktop using configuration
|Configuring appinfo-test-notgnome.desktop using configuration
|Configuring appinfo-test.desktop using configuration
|Configuring appinfo-test2.desktop using configuration
|Program objcopy found: YES (/usr/bin/objcopy)
|Program ld found: YES (/usr/bin/ld)
|Configuring org.freedesktop.portal.Documents.service using configuration
|Compiler for C supports arguments -Werror=unused-function: YES
|Library FuzzingEngine skipped: feature oss_fuzz disabled
|Program xgettext found: YES (/usr/bin/xgettext)
|Configuring glib-gettextize using configuration
|Configuring config.h using configuration
|Build targets in project: 393
|Subproject glib finished.
Dependency glib-2.0 found: YES 2.67.1 (overridden)
Dependency gthread-2.0 found: YES 2.67.1 (overridden)
|Executing subproject fluidsynth method cmake
|
|
||Configuring the build directory with CMake version 3.19.1
||Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
|| - build directory: /tmp/proj/builddir/subprojects/fluidsynth/__CMake_build
|| - source directory: /tmp/proj/subprojects/fluidsynth
|| - toolchain file: /tmp/proj/builddir/subprojects/fluidsynth/CMakeMesonToolchainFile.cmake
|| - preload file: /tmp/proj/builddir/meson-private/data/preload.cmake
|| - trace args: --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
|| - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]
||
||Running with expanded trace output on.
||Not searching for unused variables given on the command line.
||Trace will be written to cmake_trace.txt
||-- The C compiler identification is GNU 10.2.0
||-- The CXX compiler identification is GNU 10.2.0
||-- Detecting C compiler ABI info
||-- Detecting C compiler ABI info - done
||-- Check for working C compiler: /usr/bin/cc - skipped
||-- Detecting C compile features
||-- Detecting C compile features - done
||-- Detecting CXX compiler ABI info
||-- Detecting CXX compiler ABI info - done
||-- Check for working CXX compiler: /usr/bin/c++ - skipped
||-- Detecting CXX compile features
||-- Detecting CXX compile features - done
||-- Checking whether system has ANSI C header files
||-- Looking for 8 include files dlfcn.h, ..., float.h
||-- Looking for 8 include files dlfcn.h, ..., float.h - found
||-- Performing Test memchrExists
||-- Performing Test memchrExists - Success
||-- Performing Test freeExists
||-- Performing Test freeExists - Success
||-- ANSI C header files - found
||-- Looking for include file unistd.h
||-- Looking for include file unistd.h - found
||-- Looking for DIR in sys/stat.h;sys/types.h;dirent.h
||-- Looking for DIR in sys/stat.h;sys/types.h;dirent.h - found
||-- Looking for stdio.h
||-- Looking for stdio.h - found
||-- Looking for math.h
||-- Looking for math.h - found
||-- Looking for errno.h
||-- Looking for errno.h - found
||-- Looking for stdarg.h
||-- Looking for stdarg.h - found
||-- Looking for sys/mman.h
||-- Looking for sys/mman.h - found
||-- Looking for sys/time.h
||-- Looking for sys/time.h - found
||-- Looking for fcntl.h
||-- Looking for fcntl.h - found
||-- Looking for sys/socket.h
||-- Looking for sys/socket.h - found
||-- Looking for netinet/in.h
||-- Looking for netinet/in.h - found
||-- Looking for netinet/tcp.h
||-- Looking for netinet/tcp.h - found
||-- Looking for arpa/inet.h
||-- Looking for arpa/inet.h - found
||-- Looking for limits.h
||-- Looking for limits.h - found
||-- Looking for pthread.h
||-- Looking for pthread.h - found
||-- Looking for signal.h
||-- Looking for signal.h - found
||-- Looking for getopt.h
||-- Looking for getopt.h - found
||-- Check size of long long
||-- Check size of long long - done
||-- Performing Test _have_inline
||-- Performing Test _have_inline - Success
||-- Performing Test _have_vla
||-- Performing Test _have_vla - Success
||-- Check if the system is big endian
||-- Searching 16 bit integer
||-- Check size of unsigned short
||-- Check size of unsigned short - done
||-- Searching 16 bit integer - Using unsigned short
||-- Check if the system is big endian - little endian
||-- Performing Test HAVE_INCOMPATIBLE_POINTER_TYPES
||-- Performing Test HAVE_INCOMPATIBLE_POINTER_TYPES - Success
||-- Looking for pthread.h
||-- Looking for pthread.h - found
||-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
||-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
||-- Looking for pthread_create in pthreads
||-- Looking for pthread_create in pthreads - not found
||-- Looking for pthread_create in pthread
||-- Looking for pthread_create in pthread - found
||-- Found Threads: TRUE
||-- Looking for inet_ntop
||-- Looking for inet_ntop - found
||-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
||-- Checking for modules 'glib-2.0>=2.6.5;gthread-2.0>=2.6.5'
||-- Found glib-2.0, version 2.67.1
||-- Found gthread-2.0, version 2.67.1
||-- Checking for module 'sndfile>=1.0.0'
||-- Found sndfile, version 1.0.28
||-- Checking for module 'sndfile>=1.0.18'
||-- Found sndfile, version 1.0.28
||-- Checking for module 'libpulse-simple>=0.9.8'
||-- Found libpulse-simple, version 14.0
||-- Checking for module 'alsa>=0.9.1'
||-- Found alsa, version 1.2.4
||-- Checking for module 'jack'
||-- Found jack, version 0.125.0
||-- Checking for module 'lash-1.0>=0.3'
||-- Package 'lash-1.0', required by 'virtual:world', not found
||-- Checking for module 'libsystemd'
||-- Found libsystemd, version 247
||-- Checking for module 'dbus-1>=1.0.0'
||-- Found dbus-1, version 1.12.20
||-- Looking for ladspa.h
||-- Looking for ladspa.h - not found
||-- Checking for module 'libinstpatch-1.0>=1.1.0'
||-- Package 'libinstpatch-1.0', required by 'virtual:world', not found
||-- Checking for module 'sdl2'
||-- Found sdl2, version 2.0.12
||-- Checking for module 'readline'
||-- Found readline, version 8.1
||-- Found OpenMP 201511
||-- Looking for sinf
||-- Looking for sinf - not found
||-- Looking for cosf
||-- Looking for cosf - not found
||-- Looking for fabsf
||-- Looking for fabsf - not found
||-- Looking for powf
||-- Looking for powf - not found
||-- Looking for sqrtf
||-- Looking for sqrtf - not found
||-- Looking for logf
||-- Looking for logf - not found
||-- Found Doxygen: /usr/bin/doxygen (found version "1.8.20") found components: doxygen dot
||-- Found LibXslt: /usr/lib/libxslt.so (found version "1.1.34")
||--
||**************************************************************
||Build Summary:
||Build type: RelWithDebInfo
||Install Prefix: /usr/local
||
||Audio / MIDI driver support:
|| ALSA: yes
|| CoreAudio: no
|| CoreMIDI: no
|| DSound: no
|| JACK: yes
|| MidiShare: no
|| Oboe: no
|| OpenSLES: no
|| OS/2 DART: no
|| OSS: yes
|| PortAudio: no
|| PulseAudio: yes
|| SDL2: yes
|| WaveOut: no
|| WinMidi: no
||
||Support for SF3 files: yes
||Support for DLS files: no (libinstpatch not found)
||
||Audio to file rendering: yes
|| libsndfile: yes
||
||Miscellaneous support:
|| D-Bus: yes
|| LADSPA support: no
|| LASH support: no
|| NETWORK Support: yes
|| IPV6 Support: yes
|| Readline: yes (NOTE: GPL library)
|| systemd: yes
|| getopt: yes
||
||Developer nerds info:
|| Samples type: double
|| Multithread rendering: yes
|| OpenMP 4.0: yes
|| Profiling: no
|| Debug Build: no
|| Trap on FPE (debug): no
|| Check FPE (debug): no
|| UBSan (debug): no
||
||**************************************************************
||
||
||-- Configuring done
||-- Generating done
||-- Build files have been written to: /tmp/proj/builddir/subprojects/fluidsynth/__CMake_build
|
|CMake configuration: SUCCEEDED
|WARNING: Unknown c_std "gnu90" -> Ignoring. Try setting the project-level c_std if build errors occur. Known c_stds are: none c89 c99 c11 c17 c18 c2x gnu89 gnu99 gnu11 gnu17 gnu18 gnu2x
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/mesonbuild/mesonmain.py", line 140, in run
return options.run_func(options)
File "/usr/lib/python3.9/site-packages/mesonbuild/msetup.py", line 253, in run
app.generate()
File "/usr/lib/python3.9/site-packages/mesonbuild/msetup.py", line 161, in generate
self._generate(env)
File "/usr/lib/python3.9/site-packages/mesonbuild/msetup.py", line 200, in _generate
intr.run()
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreter.py", line 4703, in run
super().run()
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 519, in run
self.evaluate_codeblock(self.ast, start=1)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 544, in evaluate_codeblock
raise e
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 537, in evaluate_codeblock
self.evaluate_statement(cur)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 552, in evaluate_statement
self.assignment(cur)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 1219, in assignment
value = self.evaluate_statement(node.value)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 554, in evaluate_statement
return self.method_call(cur)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 951, in method_call
return obj.method_call(method_name, args, kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreter.py", line 1833, in method_call
value = fn(self.interpreter, state, args, kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 301, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 393, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 393, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 228, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreterbase.py", line 197, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/modules/cmake.py", line 389, in subproject
subp = interpreter.do_subproject(dirname, 'cmake', kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreter.py", line 2942, in do_subproject
raise e
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreter.py", line 2928, in do_subproject
return self._do_subproject_cmake(subp_name, subdir, subdir_abs, default_options, kwargs)
File "/usr/lib/python3.9/site-packages/mesonbuild/interpreter.py", line 2996, in _do_subproject_cmake
cm_int.analyse()
File "/usr/lib/python3.9/site-packages/mesonbuild/cmake/interpreter.py", line 1005, in analyse
tgt.postprocess(self.output_target_map, self.src_dir, self.subdir, self.install_prefix, self.trace)
File "/usr/lib/python3.9/site-packages/mesonbuild/cmake/interpreter.py", line 465, in postprocess
self.includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.includes)] + [build_dir_rel]))
File "/usr/lib/python3.9/site-packages/mesonbuild/cmake/interpreter.py", line 465, in <listcomp>
self.includes = list(OrderedSet([rel_path(x, True, False) for x in OrderedSet(self.includes)] + [build_dir_rel]))
File "/usr/lib/python3.9/site-packages/mesonbuild/cmake/interpreter.py", line 458, in rel_path
return x.relative_to(Path(self.env.get_build_dir()) / subdir)
File "/usr/lib/python3.9/pathlib.py", line 928, in relative_to
raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: '/tmp/proj/builddir/subprojects/glib/glib' is not in the subpath of '/tmp/proj/builddir/subprojects/fluidsynth' OR one path is relative and the other is absolute.
@mensinda the ValueError here implies this is very much due to cmake trying to get info out of a different subproject's builddir.
Maybe it would make sense to automatically add the meson-uninstalled directory to the pkg_config_path for at least cmake subprojects. Less manual intervention for the user trying to do the build.
Yes please :-) Otherwise we'll be wrapping meson in shell script to do this.
Ideally we could describe the dependencies of a cmake.subproject, something like:
subproj = cmake.subproject(
'my_subproj',
dependencies : [ 'glib-2.0', 'gthread-2.0'])
Where meson has previously been told how to resolve those dependencies:
glib_dep = dependency('glib-2.0', fallback : ['glib'])
gthread_dep = dependency('gthread-2.0', fallback : ['glib'])
meson-uninstalled directory for the respective dependency to the respective cmake-subproject's pkg_config_path In both:
https://github.com/mesonbuild/meson/blob/bab108742244bdfde769ea34424a0c0722a460c2/mesonbuild/cmake/interpreter.py#L457-L458
https://github.com/mesonbuild/meson/blob/bab108742244bdfde769ea34424a0c0722a460c2/mesonbuild/cmake/interpreter.py#L438-L440
it assumes anything inside the build_root is of necessity also in the per-subproject project_build_root, and then trips over a logic error if that turns out to be false.
My naive attempt to correct this by checking instead for path_is_in_root(x, Path(self.env.get_build_dir()) / subdir), permitted it to finish configuring a subprojects/fluidsynth/meson.build. Unfortunately, this failed due to containing include_directories('/tmp/proj/builddir/subprojects/glib/glib')
The resulting configure failed for a different reason:
|CMake configuration: SUCCEEDED
|WARNING: Unknown c_std "gnu90" -> Ignoring. Try setting the project-level c_std if build errors occur. Known c_stds are: none c89 c99 c11 c17 c18 c2x gnu89 gnu99 gnu11 gnu17 gnu18 gnu2x
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/builddir/lib/glib-2.0/include does not exist.
|WARNING: --> Ignoring. This can lead to build errors.
|WARNING: CMake: path /tmp/proj/subprojects/glib/gthread is inside the root project but not inside the subproject.
|WARNING: --> Ignoring. This can lead to build errors.
|CMake project FluidSynth has 50 build targets.
|
||Processing generated meson AST
||Build file: /tmp/proj/builddir/subprojects/fluidsynth/meson.build
||
||Project name: FluidSynth
||Project version: undefined
||C compiler for the host machine: ccache cc (gcc 10.2.0 "cc (GCC) 10.2.0")
||C linker for the host machine: cc ld.bfd 2.35.1
||C++ compiler for the host machine: ccache c++ (gcc 10.2.0 "c++ (GCC) 10.2.0")
||C++ linker for the host machine: c++ ld.bfd 2.35.1
subprojects/fluidsynth/meson.build:0:0: ERROR: Tried to form an absolute path to a source dir. You should not do that but use relative paths instead.
To get include path to any directory relative to the current dir do
incdir = include_directories(dirname)
After this incdir will contain both the current source dir as well as the
corresponding build dir. It can then be used in any subdirectory and
Meson will take care of all the busywork to make paths work.
Dirname can even be '.' to mark the current directory. Though you should
remember that the current source and build directories are always
put in the include directories by default so you only need to do
include_directories('.') if you intend to use the result in a
different subdirectory.
This will, I guess, need to explicitly grow support for getting values from a different subproject. Maybe inspecting the meson AST for matching include objects?
The main problem here is that the CMake subproject is basically an automatic conversion from a CMake project to a meson project with all the encapsulation requirements. So, directly using stuff from a different subproject is very much not recommended (and even probably prohibited, since I think that you can't .. out of the project root in meson).
This will, I guess, need to explicitly grow support for getting values from a different subproject. Maybe inspecting the meson AST for matching include objects?
No. It would be technically possible to do this with introspection of course, however, this will be very fragile in practice and essentially breaks the meson subproject encapsulation. Here, for instance, is a (hopefully) valid meson code which is a pain to introspect correctly form the AST.
project('foo', ['c', 'cpp'])
s_inc = 42 # Be as confusing as possible
sp_prefix = 'cm_'
sp_suffix = '_pro'
sp_name = run_command('echo "test"').stdout().strip()
sp = sp_prefix + sp_name + sp_suffix
s_inc = include_directories([sp])
The correct solution (as far as I can tell) here would be to directly generate a second subproject() call (with all the required get_variable() stuff) from metadata that is directly passed to the cmake.subproject() method and the CMake introspection data we get back from CMake.