After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688258 - build: fix make distcheck so that it's usable for occasional checks
build: fix make distcheck so that it's usable for occasional checks
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-0.9.10
 
 
Reported: 2012-11-13 14:41 UTC by Pavel Simerda
Modified: 2013-04-15 18:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavel Simerda 2012-11-13 14:41:06 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
Comment 1 Aleksander Morgado 2012-11-13 14:58:08 UTC
> 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.
Comment 2 Dan Winship 2012-11-13 15:58:34 UTC
(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".
Comment 3 Pavel Simerda 2012-11-13 17:08:45 UTC
Output of:

git clean -dfx && ./autogen.sh --with-tests --with-docs --with-wext=no && make && make distcheck

http://data.pavlix.net/networkmanager-build.log
Comment 4 Pavel Simerda 2012-11-13 17:14:19 UTC
--with-wext=no is redundant, output looks the same.
Comment 5 Pavel Simerda 2012-11-13 17:22:08 UTC
Same result without ccache and make -j3.
Comment 6 Pavel Simerda 2012-11-14 01:19:03 UTC
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.
Comment 7 Pavel Simerda 2012-11-28 19:54:58 UTC
Currently, 'make distcheck' also fails on the ifnet plugin.
Comment 8 Pavel Simerda 2012-12-04 23:43:39 UTC
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
Comment 9 Dan Williams 2013-01-11 21:32:34 UTC
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.
Comment 10 Pavel Simerda 2013-01-14 13:36:10 UTC
(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.
Comment 11 Pavel Simerda 2013-04-15 18:59:22 UTC
Python problems have been fixed recently. Please keep the master distcheck-able. Thank you for cooperation!