GNOME Bugzilla – Bug 688258
build: fix make distcheck so that it's usable for occasional checks
Last modified: 2013-04-15 18:59:22 UTC
I would very much like to use make distcheck before pushing modifications to avoid build system errors and some other problems. But, currently, it takes me too much time to play with the build system to get it work at all, circulating through the same errors all the time. In my opinion, the first desired thing would be to be able to run: WARNING: Unversioned files in your source tree will be deleted. git checkout master git clean -dfx ./autogen.sh make distcheck And all of this should work out of the box. When master is checked out, it's just: git clean -dfx && ./autogen.sh && make distcheck This method fails: make[3]: Entering directory `/root/NetworkManager/docs/libnm-glib' DOC Scanning header files DOC Introspecting gobjects libtool: link: cannot find the library `../../libnm-glib/libnm-glib.la' or unhandled argument `../../libnm-glib/libnm-glib.la' That means we have to use: git clean -dfx && ./autogen.sh && make && make distcheck This one fails with: make[4]: Entering directory `/root/NetworkManager/NetworkManager-0.9.7.0/_build/docs/libnm-util' DOC Scanning header files DOC Preparing build DOC Introspecting gobjects DOC Rebuilding template files DOC Building XML DOC Building HTML warning: failed to load external entity "../xml/annotation-glossary.xml" Tested with current git master: c225a6397fc1f2c413c6d6a417abaa349a13d2c0
> make[3]: Entering directory `/root/NetworkManager/docs/libnm-glib' > DOC Scanning header files > DOC Introspecting gobjects > libtool: link: cannot find the library `../../libnm-glib/libnm-glib.la' or > unhandled argument `../../libnm-glib/libnm-glib.la' > > That means we have to use: > > git clean -dfx && ./autogen.sh && make && make distcheck > Not sure there's a clean way of fixing this one. I spent a lot of time last year trying to avoid the 'make' before the 'make distcheck' in Tracker and got me nowhere... the introspection scanner and gtk-doc just make it very difficult if not impossible.
(In reply to comment #1) > > git clean -dfx && ./autogen.sh && make && make distcheck > > Not sure there's a clean way of fixing this one. Nothing within NM anyway; I think gtk-doc.make is just written to assume that you have already done "make" before you do "make distcheck".
Output of: git clean -dfx && ./autogen.sh --with-tests --with-docs --with-wext=no && make && make distcheck http://data.pavlix.net/networkmanager-build.log
--with-wext=no is redundant, output looks the same.
Same result without ccache and make -j3.
So, with the patches that we got to 'master' today, I can do 'make && make distcheck' on some systems. It currently fails on systems where 'python' starts Python 3.
Currently, 'make distcheck' also fails on the ifnet plugin.
Thanks to Dan Williams, 'make distcheck' now works at least on F17. On Gentoo with different versions of gcc and Glib, even make fails on warning: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../src/dnsmasq-manager -I../.. -I../../../libnm-util -I../../../src/logging -I../../../src/posix-signals -I../../../src -I../../../include -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 "-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,34)" -DLOCALSTATEDIR=\"/usr/local/var\" -Wall -std=gnu89 -g -O2 -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -Wno-unused-but-set-variable -Wundef -Wimplicit-function-declaration -Wpointer-arith -Winit-self -Wmissing-include-dirs -Waggregate-return -Werror -MT libdnsmasq_manager_la-nm-dnsmasq-manager.lo -MD -MP -MF .deps/libdnsmasq_manager_la-nm-dnsmasq-manager.Tpo -c ../../../src/dnsmasq-manager/nm-dnsmasq-manager.c -fPIC -DPIC -o .libs/libdnsmasq_manager_la-nm-dnsmasq-manager.o ../../../src/dnsmasq-manager/nm-dnsmasq-manager.c: In function 'create_dm_cmd_line': ../../../src/dnsmasq-manager/nm-dnsmasq-manager.c:304:3: error: format not a string literal and no format arguments [-Werror=format-security] ../../../src/dnsmasq-manager/nm-dnsmasq-manager.c:320:3: error: format not a string literal and no format arguments [-Werror=format-security] ../../../src/dnsmasq-manager/nm-dnsmasq-manager.c:334:3: error: format not a string literal and no format arguments [-Werror=format-security] cc1: all warnings being treated as errors make[4]: *** [libdnsmasq_manager_la-nm-dnsmasq-manager.lo] Error 1 make[4]: Leaving directory `/root/NetworkManager/_build/src/dnsmasq-manager' gcc: 4.6.3 glib: 2.32.4-r1
If we have any "format not a string literal" then we should fix those in the code. BTW, git clean -dfx is pretty dangerous; I tend to store patches and other stuff in my directory (but not in git of course) and they'll get blown away if I do -dfx. I'm sure other people do too.
(In reply to comment #9) > If we have any "format not a string literal" then we should fix those in the > code. I fixed some recently, so afaik this is OK now. The only problem is with python tests on systems where python points to python3. They can be fixed to be version-neutral or /usr/bin/python can be replaced with /usr/bin/python2.
Python problems have been fixed recently. Please keep the master distcheck-able. Thank you for cooperation!