[PATCH] drop unused filterPath
Dominik 'Rathann' Mierzejewski
dominik at greysector.net
Fri Sep 11 12:37:24 UTC 2020
Dear list,
while building INN-2.6.3 on Fedora rawhide (with GCC-10.2.1 and LTO
enabled), I encountered a linking error:
$ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --enable-largefiles --enable-shared --enable-uucp-rnews --bindir=/usr/libexec/news --exec-prefix=/usr/libexec/news --sysconfdir=/etc/news --with-db-dir=/var/lib/news --with-http-dir=/var/lib/news/http --with-libperl-dir=/usr/share/perl5/vendor_perl --with-log-dir=/var/log/news --with-openssl --with-perl --with-pic --with-python --with-run-dir=/run/news --with-sasl --with-sendmail=/usr/sbin/sendmail --with-spool-dir=/var/spool/news --with-tmp-dir=/var/lib/news/tmp --with-news-group=news --with-news-master=news --with-news-user=news
...
../libtool --mode=link gcc -pie -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o innd art.o cc.o chan.o icd.o innd.o keywords.o lc.o nc.o newsfeeds.o ng.o perl.o proc.o python.o rc.o site.o status.o util.o wip.o /builddir/build/BUILD/inn-2.6.3/storage/libstorage.la /builddir/build/BUILD/inn-2.6.3/history/libinnhist.la /builddir/build/BUILD/inn-2.6.3/lib/libinn.la -ldb /builddir/build/BUILD/inn-2.6.3/lib/perl.o -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -L/usr/lib64 -lpython3.9 -lcrypt -lpthread -ldl -lutil -lm -lm -Xlinker -export-dynamic -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g
libtool: link: gcc -pie -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o .libs/innd art.o cc.o chan.o icd.o innd.o keywords.o lc.o nc.o newsfeeds.o ng.o perl.o proc.o python.o rc.o site.o status.o util.o wip.o /builddir/build/BUILD/inn-2.6.3/lib/perl.o -Wl,--enable-new-dtags -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -Wl,-export-dynamic -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -g -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -g /builddir/build/BUILD/inn-2.6.3/storage/.libs/libstorage.so /builddir/build/BUILD/inn-2.6.3/history/.libs/libinnhist.so /builddir/build/BUILD/inn-2.6.3/lib/.libs/libinn.so -ldb -L/usr/local/lib -L/usr/lib64/perl5/CORE -lperl -lresolv -L/usr/lib64 -lpython3.9 -lcrypt -lpthread -ldl -lutil -lm
/usr/bin/ld: python.o (symbol from plugin): in function `PYFilterObject':
(.text+0x0): multiple definition of `filterPath'; art.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
...
Upon further inspection, it seems that filterPath is declared in both
innd/art.c:81 and innd/python.c:63 (without const), set in
innd/art.c:2076, but never used. Shall we drop it, then? Patch attached.
Regards,
Dominik
--
Fedora https://getfedora.org | RPM Fusion http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
diff -up inn-2.6.3/innd/art.c.fp inn-2.6.3/innd/art.c
--- inn-2.6.3/innd/art.c.fp 2019-02-07 16:02:22.000000000 +0100
+++ inn-2.6.3/innd/art.c 2020-09-11 14:24:21.055208612 +0200
@@ -77,10 +77,6 @@ static char ARTjnk[] = "junk";
static char hostcclass[256];
#define ARThostchar(c) ((hostcclass[(unsigned char)(c)]) != 0)
-#if defined(DO_PERL) || defined(DO_PYTHON)
-const char *filterPath;
-#endif /* DO_PERL || DO_PYTHON */
-
/* Prototypes. */
static void ARTerror(CHANNEL *cp, const char *format, ...)
__attribute__((__format__(printf, 2, 3)));
@@ -2072,10 +2068,6 @@ ARTpost(CHANNEL *cp)
}
}
-#if defined(DO_PERL) || defined(DO_PYTHON)
- filterPath = HDR(HDR__PATH);
-#endif /* DO_PERL || DO_PYHTON */
-
#if defined(DO_PYTHON)
TMRstart(TMR_PYTHON);
filterrc = PYartfilter(data, article->data + data->Body,
diff -up inn-2.6.3/innd/python.c.fp inn-2.6.3/innd/python.c
--- inn-2.6.3/innd/python.c.fp 2019-02-07 16:02:22.000000000 +0100
+++ inn-2.6.3/innd/python.c 2020-09-11 14:23:46.143958961 +0200
@@ -60,7 +60,6 @@
#include "innd.h"
bool PythonFilterActive;
-char *filterPath; /* This gets set in art.c. */
PyObject *PYFilterObject = NULL;
PyObject *PYFilterModule = NULL;
More information about the inn-workers
mailing list