Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 670729

Summary: app-antivirus/clamav-0.100.2[clamdtop] with sys-libs/ncurses[tinfo] - clamdtop.o:clamdtop.c:function resize: error: undefined reference to 'stdscr'
Product: Gentoo Linux Reporter: Wolfram Schlich <wolfram>
Component: Current packagesAssignee: Antivirus Team <antivirus>
Status: RESOLVED FIXED    
Severity: normal CC: conikost, esigra, jarausch, jer, kroemmelbein, mgorny, net-mail+disabled
Priority: Normal Keywords: InVCS, PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugzilla.clamav.net/show_bug.cgi?id=12465
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 457530    
Attachments: patch extending LDFLAGS by ncurses flags
clamav-0.101.2-tinfo.patch
clamav-0.101.2-r1.ebuild-tinfo.patch

Description Wolfram Schlich 2018-11-09 07:00:18 UTC
Created attachment 554583 [details, diff]
patch extending LDFLAGS by ncurses flags

With ncurses compiled with USE=tinfo, the linking of clamdtop fails als follows:

--8<--
Making all in clamdtop
make[2]: Entering directory '/var/tmp/portage/app-antivirus/clamav-0.100.2/work/clamav-0.100.2/clamdtop'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DCL_NOTHREADS -DCL_NOLIBCLAMAV -I. -I..  -I.. -I../shared -I../libclamav       -O2 -march=native -pipe -O0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o optparser.o `test -f '../shared/optparser.c' || echo './'`../shared/optparser.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DCL_NOTHREADS -DCL_NOLIBCLAMAV -I. -I..  -I.. -I../shared -I../libclamav       -O2 -march=native -pipe -O0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o getopt.o `test -f '../shared/getopt.c' || echo './'`../shared/getopt.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DCL_NOTHREADS -DCL_NOLIBCLAMAV -I. -I..  -I.. -I../shared -I../libclamav       -O2 -march=native -pipe -O0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o misc.o `test -f '../shared/misc.c' || echo './'`../shared/misc.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DCL_NOTHREADS -DCL_NOLIBCLAMAV -I. -I..  -I.. -I../shared -I../libclamav       -O2 -march=native -pipe -O0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o clamdtop.o clamdtop.c
/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O2 -march=native -pipe -O0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Wl,-O1 -Wl,--as-needed -o clamdtop optparser.o getopt.o misc.o clamdtop.o -lssl -lcrypto -lz -lncurses ../libclamav/libclamav_internal_utils_nothreads.la
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -O0 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wl,-O1 -Wl,--as-needed -o clamdtop optparser.o getopt.o misc.o clamdtop.o  -lncurses ../libclamav/.libs/libclamav_internal_utils_nothreads.a -lssl -lcrypto -lz -L/usr/lib64 -lpcre2-8
clamdtop.o:clamdtop.c:function resize: error: undefined reference to 'stdscr'
clamdtop.o:clamdtop.c:function resize: error: undefined reference to 'stdscr'
clamdtop.o:clamdtop.c:function resize: error: undefined reference to 'stdscr'
clamdtop.o:clamdtop.c:function resize: error: undefined reference to 'stdscr'
clamdtop.o:clamdtop.c:function init_ncurses: error: undefined reference to 'keypad'
clamdtop.o:clamdtop.c:function init_ncurses: error: undefined reference to 'halfdelay'
clamdtop.o:clamdtop.c:function init_ncurses: error: undefined reference to 'curs_set'
clamdtop.o:clamdtop.c:function header: error: undefined reference to 'acs_map'
clamdtop.o:clamdtop.c:function header: error: undefined reference to 'acs_map'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:613: clamdtop] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-antivirus/clamav-0.100.2/work/clamav-0.100.2/clamdtop'
make[1]: *** [Makefile:757: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-antivirus/clamav-0.100.2/work/clamav-0.100.2'
make: *** [Makefile:585: all] Error 2
 * ERROR: app-antivirus/clamav-0.100.2::gentoo failed (compile phase):
--8<--

The attached patch fixes that.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-03-24 01:03:20 UTC
This is not really a nice solution.

The real fix should happen in m4/reorganization/clamdtop.m4 but that one uses a self written autoconf macro "AC_LIB_FIND" from acinclude.m4 file which I do not fully understand.
IMHO that macro call should be replaced by a proper PKG_CHECK_MODULES call.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-04-26 10:47:54 UTC
Created attachment 574174 [details, diff]
clamav-0.101.2-tinfo.patch
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2019-04-26 10:51:36 UTC
Created attachment 574176 [details, diff]
clamav-0.101.2-r1.ebuild-tinfo.patch
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-06-20 08:13:59 UTC
Ping.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2019-06-20 09:42:15 UTC
I'd be happy to fix it but doing so tends to end in tears.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-07-31 12:40:48 UTC
*** Bug 691132 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2019-07-31 12:47:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca05c21a3ab3e69ff60da41cb10cba2de84ed614

commit ca05c21a3ab3e69ff60da41cb10cba2de84ed614
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-07-31 12:47:12 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-07-31 12:47:39 +0000

    app-antivirus/clamav: Fixed compilation with sys-libs/ncurses[tinfo]
    
    Fixed without excplicit permission due to maintainer timeout.
    
    Thanks-to: Jeroen Roovers <jer@gentoo.org>
    Bug: https://bugs.gentoo.org/670729
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-antivirus/clamav/clamav-0.101.2-r1.ebuild      |  3 ++-
 .../clamav/files/clamav-0.101.2-tinfo.patch        | 31 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-07-31 12:56:40 UTC
Keeping this bug open until the patch has finally been submitted to and accepted by upstream.
Comment 9 Michael Orlitzky gentoo-dev 2020-01-15 15:05:56 UTC
I can't tell if this has been reported upstream because the bug tracker is private, but I've just reported it (again?) at $URL.
Comment 10 Michael Orlitzky gentoo-dev 2020-09-10 13:22:31 UTC
*** Bug 653028 has been marked as a duplicate of this bug. ***
Comment 11 Larry the Git Cow gentoo-dev 2020-09-20 19:35:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8038d96958974432777d667fae883516eebad258

commit 8038d96958974432777d667fae883516eebad258
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2020-09-20 17:08:41 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2020-09-20 19:28:56 +0000

    app-antivirus/clamav: new version 0.103.0.
    
    New version with lots of good stuff. The main changes are that
    on-access scanning is now controlled by USE=clamonacc, and that we
    provide separate OpenRC services for the various daemons.
    
    Closes: https://bugs.gentoo.org/272963
    Closes: https://bugs.gentoo.org/670729
    Closes: https://bugs.gentoo.org/732926
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 app-antivirus/clamav/Manifest                      |   1 +
 app-antivirus/clamav/clamav-0.103.0.ebuild         | 219 ++++++++++
 .../files/clamav-0.103.0-system-tomsfastmath.patch | 115 ++++++
 .../files/clamav-0.103.0-upstream-openrc.patch     | 447 +++++++++++++++++++++
 app-antivirus/clamav/metadata.xml                  |   1 +
 5 files changed, 783 insertions(+)