Skip to content

Add build scripts for cairo/pixman#7

Open
deveee wants to merge 7 commits intoMultiCraft:mainfrom
deveee:cairo-meson
Open

Add build scripts for cairo/pixman#7
deveee wants to merge 7 commits intoMultiCraft:mainfrom
deveee:cairo-meson

Conversation

@deveee
Copy link
Copy Markdown
Member

@deveee deveee commented Apr 13, 2026

No description provided.

@MoNTE48
Copy link
Copy Markdown
Member

MoNTE48 commented Apr 16, 2026

 User defined options
    Cross files             : .../deps/cairo-src/android-armeabi-v7a.cross
    buildtype               : release
    default_library         : static
    fontconfig              : disabled
    freetype                : enabled
    glib                    : disabled
    gtk2-utils              : disabled
    gtk_doc                 : false
    lzo                     : disabled
    png                     : enabled
    prefix                  : /
    spectre                 : disabled
    symbol-lookup           : disabled
    tests                   : disabled
    xcb                     : disabled
    xlib                    : disabled
    xlib-xcb                : disabled
    zlib                    : disabled

Found ninja-1.12.1 at /usr/bin/ninja
Cleaning... 0 files.
[1/42] Linking target subprojects/pixman-0.43.4/test/region-translate-test
FAILED: subprojects/pixman-0.43.4/test/region-translate-test 
/home/multicraft/work/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi23-clang  -o subprojects/pixman-0.43.4/test/region-translate-test subprojects/pixman-0.43.4/test/region-translate-test.p/region-translate-test.c.o -L/.../output/freetype/lib/armeabi-v7a -L/.../output/libpng/lib/armeabi-v7a -L/.../output/pixman/lib/armeabi-v7a -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -pie -fPIC -Wl,--start-group subprojects/pixman-0.43.4/pixman/libpixman-1.a subprojects/pixman-0.43.4/test/utils/libtestutils.a -pthread -fopenmp -L/home/multicraft/work/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib64 -lpng16 -lm -fopenmp -L/home/multicraft/work/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib64 -lpng16 -Wl,--end-group
ld.lld: error: unable to find library -lpng16
ld.lld: error: unable to find library -lpng16
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@deveee
Copy link
Copy Markdown
Member Author

deveee commented Apr 17, 2026

You can try to add --wrap-mode=nodownload to meson options in cario.sh

meson setup build \
	--cross-file "$CROSS_FILE" \
	--wrap-mode=nodownload \
	--default-library=static \
	--buildtype=release \
	-Dprefix=/ \
	-Dfreetype=enabled \
	-Dpng=enabled \
	-Dfontconfig=disabled \
	-Dxcb=disabled \
	-Dxlib=disabled \
	-Dxlib-xcb=disabled \
	-Dzlib=disabled \
	-Dtests=disabled \
	-Dlzo=disabled \
	-Dgtk2-utils=disabled \
	-Dglib=disabled \
	-Dspectre=disabled \
	-Dsymbol-lookup=disabled \
	-Dgtk_doc=false

so it doesn't try to use subprojects.

And not sure if full log is possible?

@MoNTE48
Copy link
Copy Markdown
Member

MoNTE48 commented Apr 17, 2026

@deveee

Configured for armeabi-v7a
Configured for Linux
Cloning into 'cairo-src'...
remote: Enumerating objects: 3487, done.
remote: Counting objects: 100% (3487/3487), done.
remote: Compressing objects: 100% (3293/3293), done.
remote: Total 3487 (delta 437), reused 2871 (delta 186), pack-reused 0 (from 0)
Receiving objects: 100% (3487/3487), 33.02 MiB | 73.50 MiB/s, done.
Resolving deltas: 100% (437/437), done.
warning: refs/tags/1.18.4 7f3ad250e06b422010635abefb5e58eb1d8af4c1 is not a commit!
Note: switching to '4541e0cd3a751b85e52e2a83d02ac6145a5efa85'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

WARNING: Unknown CPU family , please report this at https://github.com/mesonbuild/meson/issues/new
The Meson build system
Version: 1.7.2
Source dir: .../deps/cairo-src
Build dir: .../deps/cairo-src/build
Build type: cross build
Program version.py found: YES (.../deps/cairo-src/version.py)
Project name: cairo
Project version: 1.18.4
C compiler for the host machine: /home/multicraft/work/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi23-clang (clang 21.0.0 "Android (13989888, +pgo, +bolt, +lto, +mlgo, based on r563880c) clang version 21.0.0 (https://android.googlesource.com/toolchain/llvm-project 5e96669f06077099aa41290cdb4c5e6fa0f59349)")
C linker for the host machine: /home/multicraft/work/android-ndk-r29/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi23-clang ld.lld 21.0.0
C compiler for the build machine: cc (gcc 15.2.1 "cc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7)")
C linker for the build machine: cc ld.bfd 2.44-12
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: 
Host machine cpu: 
Target machine cpu family: 
Target machine cpu: 
Compiler for C supports arguments -Wmissing-declarations: YES 
Compiler for C supports arguments -Werror-implicit-function-declaration: YES 
Compiler for C supports arguments -Wpointer-arith: YES 
Compiler for C supports arguments -Wwrite-strings: YES 
Compiler for C supports arguments -Wsign-compare: YES 
Compiler for C supports arguments -Wpacked: YES 
Compiler for C supports arguments -Wswitch-enum: YES 
Compiler for C supports arguments -Wmissing-format-attribute: YES 
Compiler for C supports arguments -Wvolatile-register-var: YES 
Compiler for C supports arguments -Wstrict-aliasing=2: YES 
Compiler for C supports arguments -Winit-self: YES 
Compiler for C supports arguments -Wunsafe-loop-optimizations: NO 
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Wno-attributes: YES 
Compiler for C supports arguments -Wno-long-long: YES 
Compiler for C supports arguments -Winline: YES 
Compiler for C supports arguments -Wno-unused-but-set-variable: YES 
Compiler for C supports arguments -Wno-enum-conversion: YES 
Compiler for C supports arguments -fno-strict-aliasing: YES 
Compiler for C supports arguments -fno-common: YES 
Compiler for C supports arguments -Wp,-D_FORTIFY_SOURCE=2: YES 
Program python3 found: YES (/usr/bin/python3)
Library m found: YES
Dependency gtk+-2.0 skipped: feature gtk2-utils disabled
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
Fetching value of define "__FLOAT_WORD_ORDER__" : (undefined) 
Dependency lzo2 skipped: feature lzo disabled
Library dl found: YES
Checking for function "dlsym" with dependency -ldl: YES 
Dependency zlib skipped: feature zlib disabled
Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
Run-time dependency libpng found: YES 1.6.55
Dependency fontconfig skipped: feature fontconfig disabled
Program ttx found: NO
Found CMake: NO
Run-time dependency freetype2 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency freetype2
ERROR: Subproject freetype2 is buildable: NO

meson.build:307:15: ERROR: Automatic wrap-based subproject downloading is disabled

A full log can be found at ...deps/cairo-src/build/meson-logs/meson-log.txt
[multicraft@static deps_android_new]$ 

@deveee
Copy link
Copy Markdown
Member Author

deveee commented Apr 17, 2026

Even more ugly but hopefully working now (previously pkg-config was finding system libraries even though our compiled libraries were used).

@MoNTE48
Copy link
Copy Markdown
Member

MoNTE48 commented Apr 17, 2026

@deveee pixman:
warning: overriding currently unsupported use of floating point exceptions on this target [-Wunsupported-floating-point-opt]
../pixman/pixman-arm.c:98:10: fatal error: 'cpu-features.h' file not found
98 | #include <cpu-features.h>
| ^~~~~~~~~~~~~~~~
1 warning and 1 error generated.
ninja: build stopped: subcommand failed.

The header may be removed in newer ndk anyway. In worst case
we can just disable neon/simd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants