Closed sharkcz closed 5 months ago
Looks like a real bug, unfortunately setuptools
confuses the hell out of me, so I don't really know how to fix it. @blmaier @sjg20 any ideas?
Are you using the DTC 1.7.0 tag or the main branch? What Meson version?
I tried running the steps provided but on my Fedora 40 machine it doesn't rebuild the python library.
$ DESTDIR=./dest meson install -C build --no-rebuild
Installing libfdt/libfdt.so.1.7.0 to /home/brandon/work/dtc/build/dest/usr/local/lib64
Installing libfdt/libfdt.a to /home/brandon/work/dtc/build/dest/usr/local/lib64
Installing convert-dtsv0 to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing dtc to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing fdtdump to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing fdtget to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing fdtput to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing fdtoverlay to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing /home/brandon/work/dtc/libfdt/fdt.h to /home/brandon/work/dtc/build/dest/usr/local/include
Installing /home/brandon/work/dtc/libfdt/libfdt.h to /home/brandon/work/dtc/build/dest/usr/local/include
Installing /home/brandon/work/dtc/libfdt/libfdt_env.h to /home/brandon/work/dtc/build/dest/usr/local/include
Installing /home/brandon/work/dtc/build/meson-private/libfdt.pc to /home/brandon/work/dtc/build/dest/usr/local/lib64/pkgconfig
Installing /home/brandon/work/dtc/dtdiff to /home/brandon/work/dtc/build/dest/usr/local/bin
Installing symlink pointing to libfdt.so.1.7.0 to /home/brandon/work/dtc/build/dest/usr/local/lib64/libfdt.so.1
Installing symlink pointing to libfdt.so.1 to /home/brandon/work/dtc/build/dest/usr/local/lib64/libfdt.so
Running custom install script '/home/brandon/work/dtc/pylibfdt/../setup.py --quiet --top-builddir /home/brandon/work/dtc/build install --prefix=/usr/local --root=$DESTDIR'
/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
I am on the main branch, meson meson-1.4.1-1.fc40.noarch, the host is ppc64le, but it shouldn't really matter :-)
And I made the python setup.py script non-quiet (see #134) with
diff --git a/pylibfdt/meson.build b/pylibfdt/meson.build
index 978c53f..a043d0a 100644
--- a/pylibfdt/meson.build
+++ b/pylibfdt/meson.build
@@ -1,5 +1,5 @@
setup_py = find_program('../setup.py')
-setup_py = [setup_py, '--quiet', '--top-builddir', meson.project_build_root()]
+setup_py = [setup_py, '--top-builddir', meson.project_build_root()]
pylibfdt = custom_target(
'pylibfdt',
Isn't the rebuild output just hidden in your case?
@sharkcz you're right, I hadn't removed --quiet
, I do see this behavior now.
I opened #136 which should work around the issue.
Looks like the python extension is rebuilt when running meson's install command. Which is generally wrong and in a package build it means that the rebuild during installation won't use the proper compiler and linker flags from the compile phase, but rather the defaults. Running
produces