Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886472 - >=x11-libs/cairo-1.17.6[X] cross-compile fails: ERROR: Can not run test applications in this cross environment
Summary: >=x11-libs/cairo-1.17.6[X] cross-compile fails: ERROR: Can not run test appli...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo X packagers
URL: https://gitlab.freedesktop.org/cairo/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-17 09:16 UTC by tt_1
Modified: 2023-04-23 15:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log from aarch64-cross (cairo-1.17.6-cross-build.log,7.15 KB, text/x-log)
2022-12-17 09:16 UTC, tt_1
Details
meson log (meson-log.txt,53.57 KB, text/plain)
2022-12-17 09:16 UTC, tt_1
Details
emerge --info from host (emerge-info,8.17 KB, text/plain)
2022-12-17 09:17 UTC, tt_1
Details
output from emerge --info (aarch64) (emerge-info-aarch64,5.26 KB, text/plain)
2022-12-17 09:17 UTC, tt_1
Details
simple patch to fix cross-compile (0001-fix-cross.patch,626 bytes, patch)
2022-12-22 15:46 UTC, tt_1
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-12-17 09:16:26 UTC
Created attachment 843201 [details]
build log from aarch64-cross

attempting to cross-compile x11-libs/cairo-1.17.6: 

Run-time dependency zlib found: YES 1.2.13
Run-time dependency libpng found: YES 1.6.38
Run-time dependency fontconfig found: YES 2.14.0
Run-time dependency freetype2 found: YES 24.3.18
Checking if "FT has color" with dependency freetype2: links: YES 
Run-time dependency x11 found: YES 1.8.1
Run-time dependency xext found: YES 1.3.5

../cairo-1.17.6/meson.build:375:4: ERROR: Can not run test applications in this cross environment.

system is running meson-0.63.3

build log is attached
Comment 1 tt_1 2022-12-17 09:16:54 UTC
Created attachment 843202 [details]
meson log
Comment 2 tt_1 2022-12-17 09:17:12 UTC
Created attachment 843209 [details]
emerge --info from host
Comment 3 tt_1 2022-12-17 09:17:46 UTC
Created attachment 843210 [details]
output from emerge --info (aarch64)
Comment 4 tt_1 2022-12-17 09:18:45 UTC
I see this error in the meson log: 

Compiler stderr:
 /var/tmp/portage/portage/x11-libs/cairo-1.17.6/work/cairo-1.17.6-.arm64/meson-private/tmpnwsy540f/testfile.cpp: In function 'int main()':
/var/tmp/portage/portage/x11-libs/cairo-1.17.6/work/cairo-1.17.6-.arm64/meson-private/tmpnwsy540f/testfile.cpp:3:65: error: narrowing conversion of '-1' from 'int' to 'long unsigned int' [-Wnarrowing]
    3 |         int main(void) { static int a[1-2*!(sizeof(void *) > 15)]; a[0]=0; return 0; }
      |                                                                 ^
/var/tmp/portage/portage/x11-libs/cairo-1.17.6/work/cairo-1.17.6-.arm64/meson-private/tmpnwsy540f/testfile.cpp:3:40: error: size '-1' of array 'a' is negative
    3 |         int main(void) { static int a[1-2*!(sizeof(void *) > 15)]; a[0]=0; return 0; }
Comment 5 tt_1 2022-12-22 12:29:54 UTC
I forgot to provide the output of emerge -pv x11-libs/cairo

[ebuild     U  ] x11-libs/cairo-1.17.6::gentoo [1.16.0-r6::gentoo] to /usr/armv7a-unknown-linux-gnueabihf/ USE="X glib (-aqua) (-debug) (-gles2-only) -gles3% -gtk-doc% -opengl -test% (-static-libs%) (-svg%*) (-utils%) (-valgrind%)" 0 KiB


the configure is broken with using X, if USE="-X" is provided, it passes
Comment 6 tt_1 2022-12-22 15:46:16 UTC
Created attachment 844749 [details, diff]
simple patch to fix cross-compile

simple hack to workaround, it does compile now

I've opened an upstream patch, maybe there will be a proper solution soon.