[Pkg-amule-devel] Bug#795061: amule: Lack a rule to generate Scanner.h, may break build procedure.

Tianming Xie persmule at gmail.com
Mon Aug 10 05:08:42 UTC 2015


Package: amule
Version: 2.3.1+git1a369e47-3
Severity: normal

Dear Maintainer,

        When building amule from source code, it may happen that building the
first time (that is, no file to generate has been generated yet) fails, for
unable to find a way to generate Scanner.h, but a second time make just after
the first one will succeed.

        This is because Scanner.h is generated by the same rule to generate
Scanner.cpp, and there is no explicit rule to generate Scanner.h. In fact, the
command used by the rule to generate Scanner.cpp (as the attached patch file
shows) actually generates two file: one is the target Scanner.cpp, the other is
Scanner.h. So if a command whose rule depending on Scanner.h is unfortunately
called before Scanner.cpp is generated, it will fail, and break the whole
making procedure.

        The problem can be fixed by add a rule to make Scanner.h depend on
Scanner.cpp, without any command, as the attached patch file shows. If an
absent Scanner.h is required by rule, according to the Rule of Make(1), the
command to generate Scanner.cpp will be called to generate Scanner.cpp and
Scanner.h simultaneously, and if so, when Scanner.cpp is needed, it is not
generated again, for now it already exists.



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'testing-proposed-updates'), (500,
'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages amule depends on:
ii  amule-common    2.3.1+git1a369e47-3
ii  libc6           2.19-19
ii  libcrypto++9    5.6.1-7
ii  libgcc1         1:5.1.1-14
ii  libgeoip1       1.6.6-1
ii  libstdc++6      5.1.1-14
ii  libupnp6        1:1.6.19+git20141001-1
ii  libwxbase2.8-0  2.8.12.1+dfsg2-2
ii  libwxgtk2.8-0   2.8.12.1+dfsg2-2
ii  zlib1g          1:1.2.8.dfsg-2+b1

Versions of packages amule recommends:
ii  amule-utils  2.3.1+git1a369e47-3
ii  unzip        6.0-17

Versions of packages amule suggests:
ii  amule-utils-gui  2.3.1+git1a369e47-3




*** /home/user/下载/book/git/amule-dlp/src-Makefile.am.diff
diff --git a/src/Makefile.am b/src/Makefile.am
index 9a9b11d..a9d1381 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -477,16 +477,17 @@ $(srcdir)/Parser.cpp: Parser.y
 if GENERATE_FLEX_HEADER
 $(srcdir)/Scanner.cpp: Scanner.l Parser.cpp
                $(LEX) --header-file=$(srcdir)/Scanner.h -o $@
$(srcdir)/Scanner.l
 else
 $(srcdir)/Scanner.cpp: Scanner.l Parser.cpp
                $(LEX) -o $@ $(srcdir)/Scanner.l; \
                echo "// Empty file generated by a flex version unable to
create headers" > $(srcdir)/Scanner.h
 endif
+$(srcdir)/Scanner.h: $(srcdir)/Scanner.cpp

 $(srcdir)/IPFilterScanner.cpp: IPFilterScanner.l
                $(LEX) -Pyyip -o $@ $(srcdir)/IPFilterScanner.l;

 # Resources



More information about the Pkg-amule-devel mailing list