0

I was trying to cross compile glib for arm. It has a dependency on libffi, but found that a meson build for libffi was last updated 2 yrs back and there is a problem with what is available.

Therefore i had to define a wrap file to take the latest source of libffi.

My first idea was to use a wrap file as below -

    [wrap-git]
    directory=libffi
    url=https://github.com/libffi/libffi
    revision=head

p.s its the head revision that has the right source code for libffi. But it needed a meson revision and doesn't seem to take the head.

Therefore i went for the [wrap-file] option,

    [wrap-file]
    directory = libffi-3.3
    source_url = https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz
    source_filename = libffi-3.3.tar.gz
    source_hash = 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056

But still i get this error "Subproject exists but has no meson.build file" when doing a meson build.

This is the original wrap file that came alongwith glib.

    [wrap-git]
    directory=libffi
    url=https://github.com/centricular/libffi.git
    revision=meson

what is the easiest way to get a wrap file working.

badri
  • 575
  • 2
  • 8
  • 22

1 Answers1

2

As far I can see, someone forked project and added support for meson, named that branch meson, so revision is just a name of branch containing meson.build

Official project does not have support for meson.build. What is really happening is when you build your project that uses wrap git/file, that project is fetched/downloaded&unzip and it searches for meson.build to build that dependency for your project.

You have couple options:

  1. Fork project and add support for meson (optionally: make PR to official project)
  2. Install and use it as dependency
  3. Use conan package manager to get your dependency, you can even integrate it with meson (https://conan.io/center/libffi/3.3/?user=&channel=)
Elvis Oric
  • 1,289
  • 8
  • 22