bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool: conditional dependencies calculation


From: Dmitry Selyutin
Subject: Re: gnulib-tool: conditional dependencies calculation
Date: Sun, 11 Feb 2018 21:18:18 +0300

Hi Bruno,

thank you for answer! It seems that I was confused by the following entry in 
`diff -ur dir1 dir2` output:

        @@ -123,8 +124,8 @@
         
         BUILT_SOURCES += configmake.h
         CLEANFILES += configmake.h configmake.h-t
        -endif
         
        +endif

I've totally missed the last line and noticed only that line with endif 
disappeared, but from what I see it is present, just with an additional new 
line before it. Sorry for the noise on it; this example was simply incorrect.

However, there are other discrepancies which I observe. Let's consider another 
example which were run on GNU hello:

./gnulib/pygnulib.py --with-tests --conditional-dependencies --no-changelog 
--aux-dir build-aux --doc-base doc --lib libgnu --m4-base m4/ --source-base 
lib/ --tests-base tests --local-dir gl --makefile-name=gnulib.mk --libtool --
import getaddrinfo

./gnulib/gnulib-tool --with-tests --conditional-dependencies --no-changelog 
--aux-dir build-aux --doc-base doc --lib libgnu --m4-base m4/ --source-base 
lib/ --tests-base tests --local-dir gl --makefile-name=gnulib.mk --libtool --
import getaddrinfo

Here is the supposed chain of dependencies for "float" module (conditions are 
below, each condition represents a condition between two modules):

        ('float', 'vasnprintf', 'snprintf', 'getaddrinfo')
        [None, 'test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1', 
'test $HAVE_GETADDRINFO = 0']

>From my perspective it seems that "float" module should have been considered 
conditional; but this is not the case, running `diff -ur hello-py hello-sh` 
yields the following:

         ## begin gnulib module float

        -if gl_GNULIB_ENABLED_float
         BUILT_SOURCES += $(FLOAT_H)
         
         # We need the following in order to create <float.h> when the system
        @@ -180,8 +178,9 @@
                rm -f $@
         endif
         MOSTLYCLEANFILES += float.h float.h-t
        -endif
        +
         EXTRA_DIST += float.c float.in.h itold.c
        +
         EXTRA_libgnu_la_SOURCES += float.c itold.c
        
         ## end   gnulib module float


There are also other modules, which appear to be unconditional in gnulib-tool, 
but conditional in pygnulib; the other way incompatibilities also occur. I've 
listed the supposed dependencies below. The [C] means that module was supposed 
to be conditional by pygnulib, but not by gnulib-tool; [U] means that module 
was supposed to be unconditional by pygnulib, but gnulib-tool decided that it 
is conditional.

alloca-opt [C]
('alloca-opt', 'vasnprintf', 'snprintf', 'getaddrinfo')
[None, 'test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1', 'test 
$HAVE_GETADDRINFO = 0']

float [C]
('float', 'vasnprintf', 'snprintf', 'getaddrinfo')
[None, 'test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1', 'test 
$HAVE_GETADDRINFO = 0']

msvc-inval [U]
('msvc-inval', 'fwrite-tests', 'stdio-tests')
[None, None]
('msvc-inval', 'fread-tests', 'stdio-tests')
[None, None]
('msvc-inval', 'fgetc-tests', 'stdio-tests')
[None, None]
('msvc-inval', 'fputc-tests', 'stdio-tests')
[None, None]
('msvc-inval', 'msvc-nothrow', 'sockets', 'getaddrinfo')
[None, None, 'test $HAVE_GETADDRINFO = 0']
('msvc-inval', 'fdopen', 'fwrite-tests', 'stdio-tests')
['test $REPLACE_FDOPEN = 1', None, None]
('msvc-inval', 'fdopen', 'fread-tests', 'stdio-tests')
['test $REPLACE_FDOPEN = 1', None, None]
('msvc-inval', 'fdopen', 'fgetc-tests', 'stdio-tests')
['test $REPLACE_FDOPEN = 1', None, None]
('msvc-inval', 'fdopen', 'fputc-tests', 'stdio-tests')
['test $REPLACE_FDOPEN = 1', None, None]

stdio [U]
('stdio', 'snprintf', 'getaddrinfo')
[None, 'test $HAVE_GETADDRINFO = 0']
('stdio', 'fdopen', 'fputc-tests', 'stdio-tests')
[None, None, None]
('stdio', 'fdopen', 'fread-tests', 'stdio-tests')
[None, None, None]
('stdio', 'fdopen', 'fgetc-tests', 'stdio-tests')
[None, None, None]
('stdio', 'fdopen', 'fwrite-tests', 'stdio-tests')
[None, None, None]

unistd [U]
('unistd', 'fgetc-tests', 'stdio-tests')
[None, None]
('unistd', 'fread-tests', 'stdio-tests')
[None, None]
('unistd', 'fwrite-tests', 'stdio-tests')
[None, None]
('unistd', 'fputc-tests', 'stdio-tests')
[None, None]
('unistd', 'getpagesize', 'memchr-tests')
[None, None]
('unistd', 'fd-hook', 'sockets', 'getaddrinfo')
[None, None, 'test $HAVE_GETADDRINFO = 0']


I guess that the problem lies somewhere inside module.py, in __init__ method 
of TransitiveClosure class, but I cannot understand what's wrong. I suspect 
that the whole issue is somehow related to handling of the "-tests"-related 
modules.
Could you please take a look on it? I've been dealing with this issue for 
several evenings and yet no result. :-( Thank you!


-- 
With best regards,
Dmitry Selyutin

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]