Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
F
fontconfig
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 152
    • Issues 152
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • fontconfig
  • fontconfig
  • Issues
  • #261

Closed
Open
Opened Oct 24, 2020 by James Lee@jbitContributor

meson: `meson install` tries to run target's `fc-cache` when cross compiling

Hi,

The new meson setup is great and makes cross compiling much easier than with the autotools build system!

However meson install fails because it tries to execute the just built fc-cache, which is built for the target platform not the build host.

I'm building with master as of today, and meson 0.55.3.

Here's the reproduction steps:

[jbit@hina]/src/fontconfig$ git rev-parse HEAD
abc723366d692df2210346e0d4d3c5686e22c3ef

[jbit@hina]/src/fontconfig$ meson --version
0.55.3

[jbit@hina]/src/fontconfig$ mkdir build/ && cd build/

[jbit@hina]/src/fontconfig/build$ cat << EOF > cross.conf
[host_machine]
system = 'linux'
cpu_family = 'aarch64'
cpu = 'cortex-a53'
endian = 'little'
[properties]
sys_root          = '/sysroot/aarch64'
pkg_config_libdir = '/sysroot/aarch64/usr/lib/pkgconfig'
[binaries]
c         = 'aarch64-linux-musl-gcc'
cpp       = 'aarch64-linux-musl-g++'
ar        = 'aarch64-linux-musl-ar'
ld        = 'aarch64-linux-musl-ld'
objcopy   = 'aarch64-linux-musl-objcopy'
strip     = 'aarch64-linux-musl-strip'
pkgconfig = 'pkg-config'
EOF

[jbit@hina]/src/fontconfig/build$ meson ./ ../ --cross-file=cross.conf -Ddoc=disabled -Dtests=disabled 
[... Meson output, succeeds ...]

[jbit@hina]/src/fontconfig/build$ meson compile
[... Meson output, succeeds ...]

[jbit@hina]/src/fontconfig/build$ DESTDIR=$PWD/out meson install
[... snipped ...]
Running custom install script '/usr/bin/python3 /src/fontconfig/fc-cache/../install-cache.py /src/fontconfig/build/fc-cache/fc-cache'
Traceback (most recent call last):
  File "/src/fontconfig/fc-cache/../install-cache.py", line 11, in <module>
    sys.exit(subprocess.run([args.fccache, '-s', '-f', '-v']).returncode)
  File "/usr/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/src/fontconfig/build/fc-cache/fc-cache'
FAILED: install script '/usr/bin/python3 /src/fontconfig/fc-cache/../install-cache.py /src/fontconfig/build/fc-cache/fc-cache' exit code 1, stopped

I have a fix for this, and will open a Merge Request, I just wanted to make sure it's in the issue tracker too.

Cheers

jbit

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: fontconfig/fontconfig#261