Control: tags -1 patch

Hi,

The build of mdocml has 2 issues:

>       ./configure --build=x86_64-linux-gnu --prefix=/usr 
> --includedir=\${prefix}/include --mandir=\${prefix}/share/man 
> --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
> --disable-option-checking --disable-silent-rules 
> --libdir=\${prefix}/lib/x86_64-linux-gnu 
> --libexecdir=\${prefix}/lib/x86_64-linux-gnu --runstatedir=/run 
> --disable-maintainer-mode --disable-dependency-tracking
> file config.log: writing...
> make: echo: No such file or directory
> make: *** [/tmp/GmjayNyT:2: all] Error 127

Caused by this line in configure:

CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`

This doesn't work anymore with the new make. Just replacing it with 'CC=gcc'
fixes this.


On Fri, Apr 17, 2020 at 11:05:52AM +0000, Matthias Klose wrote:
[...]
> cc -o soelim -Wl,-z,relro -Wl,-z,now soelim.o compat_err.o compat_getline.o 
> compat_progname.o compat_reallocarray.o compat_stringlist.o
> /usr/bin/ld: compat_getline.o:./compat_getline.c:5: multiple definition of 
> `dummy'; compat_err.o:./compat_err.c:5: first defined here
> /usr/bin/ld: compat_reallocarray.o:./compat_reallocarray.c:5: multiple 
> definition of `dummy'; compat_err.o:./compat_err.c:5: first defined here
> collect2: error: ld returned 1 exit status

Many files seem to define the (unused) int dummy. These multiple definitions
aren't allowed anymore with gcc 10. Just removing them fixes this.

The attached patch does both and fixes the FTBFS.

Thanks,

Ivo

--- mdocml-1.14.4.orig/compat_err.c
+++ mdocml-1.14.4/compat_err.c
@@ -2,7 +2,7 @@
 
 #if HAVE_ERR
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_fts.c
+++ mdocml-1.14.4/compat_fts.c
@@ -2,7 +2,7 @@
 
 #if HAVE_FTS
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_getline.c
+++ mdocml-1.14.4/compat_getline.c
@@ -2,7 +2,7 @@
 
 #if HAVE_GETLINE
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_getsubopt.c
+++ mdocml-1.14.4/compat_getsubopt.c
@@ -2,7 +2,7 @@
 
 #if HAVE_GETSUBOPT
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_isblank.c
+++ mdocml-1.14.4/compat_isblank.c
@@ -2,7 +2,7 @@
 
 #if HAVE_ISBLANK
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_mkdtemp.c
+++ mdocml-1.14.4/compat_mkdtemp.c
@@ -2,7 +2,7 @@
 
 #if HAVE_MKDTEMP
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_ohash.c
+++ mdocml-1.14.4/compat_ohash.c
@@ -2,7 +2,7 @@
 
 #if HAVE_OHASH
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_progname.c
+++ mdocml-1.14.4/compat_progname.c
@@ -2,7 +2,7 @@
 
 #if HAVE_PROGNAME
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_reallocarray.c
+++ mdocml-1.14.4/compat_reallocarray.c
@@ -2,7 +2,7 @@
 
 #if HAVE_REALLOCARRAY
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_recallocarray.c
+++ mdocml-1.14.4/compat_recallocarray.c
@@ -2,7 +2,7 @@
 
 #if HAVE_RECALLOCARRAY
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_strcasestr.c
+++ mdocml-1.14.4/compat_strcasestr.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRCASESTR
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_stringlist.c
+++ mdocml-1.14.4/compat_stringlist.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRINGLIST
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_strlcat.c
+++ mdocml-1.14.4/compat_strlcat.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRLCAT
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_strlcpy.c
+++ mdocml-1.14.4/compat_strlcpy.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRLCPY
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_strndup.c
+++ mdocml-1.14.4/compat_strndup.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRNDUP
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_strsep.c
+++ mdocml-1.14.4/compat_strsep.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRSEP
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_strtonum.c
+++ mdocml-1.14.4/compat_strtonum.c
@@ -2,7 +2,7 @@
 
 #if HAVE_STRTONUM
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/compat_vasprintf.c
+++ mdocml-1.14.4/compat_vasprintf.c
@@ -2,7 +2,7 @@
 
 #if HAVE_VASPRINTF
 
-int dummy;
+//int dummy;
 
 #else
 
--- mdocml-1.14.4.orig/configure
+++ mdocml-1.14.4/configure
@@ -40,7 +40,7 @@ MANPATH_DEFAULT="/usr/share/man:/usr/X11
 OSNAME=
 UTF8_LOCALE=
 
-CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
+CC=gcc
 CFLAGS=
 LDADD=
 LDFLAGS=

Reply via email to