dgibson / dtc

Device Tree Compiler
235 stars 134 forks source link

Fix version in libfdt/meson.build #95

Closed anatol closed 5 months ago

anatol commented 1 year ago

Currently meson generates file /usr/lib/libfdt.so.1.6.0 that does not match Makefile build version.

dgibson commented 1 year ago

Ugh, yes. I already knew of the duplicated version between Makefile and meson.build, but I hadn't spotted there was a third version in libfdt/meson.build in the specifics for the shared library. We really need to remove this redundancy.

I suspect there's a nice way to do that in meson, but I don't know what it is.

eli-schwartz commented 1 year ago

Since the library soname is always based on the project release version, you can just use version: meson.project_version() to ensure that meson.build never gets out of sync with libfdt/meson.build.

Syncing the Makefile and meson.build is a different question. As far as I can tell, in the Makefile build you never actually use the individual integer components, so you could just store the version in a file as DTC_VERSION = $(shell cat VERSION.txt). For meson, that can be read in with

project(
    ...,
    version: files('VERSION.txt'),
    meson_version: '>=0.57.0'
)

Note your current minimum required meson is not spelled out but is 0.56.0 due to use of features introduced in that version. Bumping from 0.56.0 to 0.57.0 is a bit notable inasmuch as Debian stable ships 0.56.2 unless users enable the backports repository, in which case they receive 1.0.0.

ernestask commented 1 year ago

This is causing me issues somewhat. @anatol, do you plan to continue with this PR?

blmaier commented 5 months ago

@anatol @dgibson this was fixed awhile ago, this pull request can be closed

dgibson commented 5 months ago

@blmaier thanks for the update.