Build failure with Cairo 1.18.4
Helde, Paavo
Paavo.Helde at revvity.com
Wed Apr 2 20:53:35 UTC 2025
I am trying to build the new cairo 1.18.4 on Windows, but it fails with some Meson error. I am not familiar with Meson, not sure if I have done something wrong myself, or is it something else. Maybe someone more familiar with it can help me?
PS. Cairo 1.18.0 used to build fine with the same build (Meson itself might have been older).
TIA
Paavo
The cairo build commands look like:
$MESON setup \
--reconfigure \
--default-library=static \
--buildtype release \
-Dstrip=false \
-Dtests=disabled \
--prefix $INSTALL_ROOT/$PROJECT \
--libdir $INSTALL_ROOT/$PROJECT/lib \
$BUILD_ROOT/$PROJECT \
$DOWNLOAD_ROOT/$PROJECT
$MESON compile -C $BUILD_ROOT/$PROJECT
$MESON install -C $BUILD_ROOT/$PROJECT
# Meson build produces .a files which are unusable from CMake, rename to .lib
cd $INSTALL_ROOT/$PROJECT/lib
# In our minimal bash shell `rename` command is missing, do it in a harder way.
for i in *.a; do
mv $i ${i/.a/.lib}
done
The build output:
Downloading cairo from https://cairographics.org/releases/cairo-1.18.4.tar.xz
Unpacking cairo from cairo.tar.xz
The Meson build system
Version: 1.4.99
Source dir: C:\work\Acapella\main\Build\Debug\ThirdParty\Download\cairo
Build dir: C:\work\Acapella\main\Build\Debug\ThirdParty\build\cairo
Build type: native build
Program version.py found: YES (C:\work\Acapella\main\Build\Debug\ThirdParty\BuildProducts\python\PCbuild\amd64\python.exe C:\work\Acapella\main\Build\Debug\ThirdParty\Download\cairo\version.py)
Project name: cairo
Project version: 1.18.4
C compiler for the host machine: cl (msvc 19.42.34438 "Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64")
C linker for the host machine: link link 14.42.34438.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES (C:\work\Acapella\main\Build\Debug\ThirdParty\BuildProducts\python\PCbuild\amd64\python.exe)
Library m found: NO
Dependency gtk+-2.0 skipped: feature gtk2-utils disabled
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: NO
Fetching value of define "__FLOAT_WORD_ORDER__" : (undefined)
CUSTOMBUILD : warning : Found pkg-config 'perl C:\\work\\Acapella\\main\\Build\\Debug\\ThirdParty\\Download\\strawberry-perl\\perl\\bin\\pkg-config' but it failed when ran
[C:\work\Acapella\main\Build\Debug\Common\Windows\ThirdPartyBuild\ThirdPartyBuild_target.vcxproj]
Found pkg-config: NO
Found CMake: C:/work/Acapella/main/Production/Common/Windows/MasterbuildTools/CMake/bin/cmake.exe (3.27.6)
Run-time dependency lzo2 found: NO (tried pkgconfig and cmake)
Library dl found: NO
Checking for function "dlsym" : NO
Checking for function "dlsym" : NO
Run-time dependency zlib found: NO (tried pkgconfig, cmake and system)
Looking for a fallback subproject for the dependency zlib
Downloading zlib source from http://zlib.net/fossils/zlib-1.3.1.tar.gz
Downloading zlib patch from https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch
Executing subproject zlib
zlib| Project name: zlib
zlib| Project version: 1.3.1
zlib| C compiler for the host machine: cl (msvc 19.42.34438 "Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64")
zlib| C linker for the host machine: link link 14.42.34438.0
zlib| Compiler for C supports link arguments -Wl,--version-script,C:\work\Acapella\main\Build\Debug\ThirdParty\Download\cairo\subprojects\zlib-1.3.1/zlib.map: NO
zlib| Windows resource compiler: Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
zlib| Build targets in project: 3
zlib| Subproject zlib finished.
Dependency zlib from subproject subprojects/zlib-1.3.1 found: YES 1.3.1
Run-time dependency libpng found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libpng
Downloading libpng source from https://github.com/glennrp/libpng/archive/v1.6.43.tar.gz
Downloading file of unknown size.
Downloading libpng patch from https://wrapdb.mesonbuild.com/v2/libpng_1.6.43-1/get_patch
Traceback (most recent call last):
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\mesonmain.py", line 188, in run
return options.run_func(options)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\msetup.py", line 363, in run
app.generate()
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\msetup.py", line 187, in generate
return self._generate(env, capture, vslite_ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\msetup.py", line 226, in _generate
intr.run()
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreter\interpreter.py", line 3027, in run
super().run()
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 169, in run
self.evaluate_codeblock(self.ast, start=1)
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 195, in evaluate_codeblock
raise e
Executing subproject libpng
libpng| Project name: libpng
libpng| Project version: 1.6.43
libpng| C compiler for the host machine: cl (msvc 19.42.34438 "Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64")
libpng| C linker for the host machine: link link 14.42.34438.0
libpng| Dependency zlib found: YES 1.3.1 (cached)
libpng| Library m found: NO
libpng| Fetching value of define "__ARM_NEON" : (undefined)
libpng| Configuring libpng16.pc using configuration
libpng| Configuring libpng.pc using configuration
libpng| Build targets in project: 5
libpng| Subproject libpng finished.
Dependency libpng from subproject subprojects/libpng-1.6.43 found: YES 1.6.43
Dependency fontconfig skipped: feature fontconfig disabled
Program ttx found: NO
Dependency freetype2 skipped: feature freetype disabled
Run-time dependency x11 found: NO (tried pkgconfig and cmake)
Run-time dependency xext found: NO (tried pkgconfig and cmake)
Run-time dependency xcb found: NO (tried pkgconfig and cmake)
Run-time dependency xcb-render found: NO (tried pkgconfig and cmake)
C++ compiler for the host machine: cl (msvc 19.42.34438 "Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34438 for x64")
C++ linker for the host machine: link link 14.42.34438.0
Library gdi32 found: YES
Library msimg32 found: YES
Library d2d1 found: YES
Library dwrite found: YES
CUSTOMBUILD : warning : msvc does not support C++11; attempting best effort; setting the standard to C++14 [C:\work\Acapella\main\Build\Debug\Common\Windows\ThirdPartyBuild\ThirdPartyBuild_target.vcxproj]
..\cairo\meson.build(518,28): error G9B8F94EC: Unhandled python exception [C:\work\Acapella\main\Build\Debug\Common\Windows\ThirdPartyBuild\ThirdPartyBuild_target.vcxproj]
This is a Meson bug and should be reported!
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 219, in evaluate_statement
return self.evaluate_if(cur)
^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 309, in evaluate_if
self.evaluate_codeblock(i.block)
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 195, in evaluate_codeblock
raise e
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 187, in evaluate_codeblock
self.evaluate_statement(cur)
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 205, in evaluate_statement
self.assignment(cur)
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 642, in assignment
value = self.evaluate_statement(node.value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 207, in evaluate_statement
return self.method_call(cur)
^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\interpreterbase.py", line 557, in method_call
res = obj.method_call(method_name, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\baseobjects.py", line 81, in method_call
return method(args, kwargs)
^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\decorators.py", line 250, in wrapper
return f(*nargs, **wrapped_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreterbase\decorators.py", line 569, in wrapper
return f(*wrapped_args, **wrapped_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreter\compiler.py", line 653, in has_header_method
return self._has_header_impl(args[0], kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreter\compiler.py", line 638, in _has_header_impl
haz, cached = self.compiler.has_header(hname, kwargs['prefix'], self.environment,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\compilers\mixins\clike.py", line 351, in has_header
return self.compiles(code, env, extra_args=extra_args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\compilers\compilers.py", line 1310, in compiles
with self._build_wrapper(code, env, extra_args, dependencies, mode, disable_cache=disable_cache) as p:
File "C:\work\Acapella\main\Build\Debug\ThirdParty\BuildProducts\python\Lib\contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\compilers\compilers.py", line 1291, in _build_wrapper
args = self.build_wrapper_args(env, extra_args, dependencies, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\compilers\mixins\clike.py", line 420, in build_wrapper_args
extra_args = mesonlib.listify([e(mode.value) if callable(e) else e for e in extra_args])
^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\interpreter\compiler.py", line 274, in _determine_args
args += self.compiler.get_option_compile_args(opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\compilers\cpp.py", line 856, in get_option_compile_args
args = super().get_option_compile_args(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\compilers\cpp.py", line 815, in get_option_compile_args
options.set_value(key, 'c++14')
File "C:\work\Acapella\main\Build\Debug\ThirdParty\Download\meson\mesonbuild\coredata.py", line 940, in set_value
self.overrides[key] = value
~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object does not support item assignment
C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\work\Acapella\
main\Build\Debug\CMakeFiles\577c39a0e18058a69e71990c40b7569a\ThirdPartyBuild_target.rule' exited with code 2. Build failed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20250402/895fa6d5/attachment-0001.htm>
More information about the cairo
mailing list