dgibson / dtc

Device Tree Compiler
219 stars 130 forks source link

meson: set minimum Meson version to 0.56.0 #111

Closed blmaier closed 1 year ago

blmaier commented 1 year ago

Set the minimum required version of Meson based on the highest version feature used, as detected by meson-setup.

dgibson commented 1 year ago

When I try a meson build with this patch I get an error:

$ meson setup build
The Meson build system
Version: 1.0.1
Source dir: /home/dwg/src/dtc
Build dir: /home/dwg/src/dtc/build
Build type: native build
Project name: dtc
Project version: 1.7.0
C compiler for the host machine: ccache cc (gcc 13.2.1 "cc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1)")
C linker for the host machine: cc ld.bfd 2.39-9
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wpointer-arith: YES 
Compiler for C supports arguments -Wcast-qual: YES 
Compiler for C supports arguments -Wnested-externs: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -Wredundant-decls: YES 
Compiler for C supports arguments -Wshadow: YES 
Compiler for C supports arguments -Wsuggest-attribute=format: YES 
Compiler for C supports arguments -Wwrite-strings: YES 
Found pkg-config: /bin/pkg-config (1.8.0)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency yaml-0.1 found: NO (tried pkgconfig and cmake)
Run-time dependency valgrind found: NO (tried pkgconfig)
Program python3 found: YES (/usr/bin/python3)
Program swig found: YES (/bin/swig)
Found git repository at /home/dwg/src/dtc
Compiler for C supports link arguments -Wl,--version-script=/home/dwg/src/dtc/libfdt/version.lds: YES 
Compiler for C supports link arguments -Wl,--no-undefined: YES 
Program flex found: YES (/bin/flex)
Program bison found: YES (/bin/bison)
Check usable header "fnmatch.h" : YES 
Program ../setup.py found: YES (/home/dwg/src/dtc/pylibfdt/../setup.py)
pylibfdt/meson.build:2: WARNING: Project targets '>=0.50.0' but uses feature introduced in '0.56.0': meson.project_build_root.
Library dl found: YES
Program run_tests.sh found: YES (/home/dwg/src/dtc/tests/run_tests.sh)
Build targets in project: 84
WARNING: Project specifies a minimum meson_version '>=0.50.0' but uses features which were added in newer versions:
 * 0.56.0: {'meson.project_build_root'}
NOTICE: Future-deprecated features used:
 * 0.55.0: {'ExternalProgram.path'}
 * 0.56.0: {'meson.source_root'}

Found ninja-1.11.1 at /bin/ninja

Looks like this needs an update.

blmaier commented 1 year ago

I was missing swig from my environment, so it was skipping over the pylibfdt/meson.build. Fixed on my end, and verified it's hitting all meson.build files now. Version 0.56.0 is working on my end now.

Of note, I am seeing some deprecated feature warnings now. They don't break anything in the current build, but if I get a chance, I'll see about opening a PR for them.

pylibfdt/meson.build:2: WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead
Library dl found: YES
Program run_tests.sh found: YES (./dtc/tests/run_tests.sh)
tests/meson.build:123: WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead
tests/meson.build:124: WARNING: Project targets '>=0.56.0' but uses feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.
Build targets in project: 84
WARNING: Deprecated features used:
 * 0.55.0: {'ExternalProgram.path'}
 * 0.56.0: {'meson.source_root'}
dgibson commented 1 year ago

I was missing swig from my environment, so it was skipping over the pylibfdt/meson.build. Fixed on my end, and verified it's hitting all meson.build files now. Version 0.56.0 is working on my end now.

Ok, here too. Merged.

Of note, I am seeing some deprecated feature warnings now. They don't break anything in the current build, but if I get a chance, I'll see about opening a PR for them.

That would be good, thanks.