Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670729 - app-antivirus/clamav-0.100.2[clamdtop] with sys-libs/ncurses[tinfo] - clamdtop.o:clamdtop.c:function resize: error: undefined reference to 'stdscr'
Summary: app-antivirus/clamav-0.100.2[clamdtop] with sys-libs/ncurses[tinfo] - clamdto...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords: InVCS, PATCH
: 691132 (view as bug list)
Depends on:
Blocks: tinfo
  Show dependency tree
 
Reported: 2018-11-09 07:00 UTC by Wolfram Schlich
Modified: 2020-01-16 11:24 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch extending LDFLAGS by ncurses flags (clamav-0.100.2.patch,454 bytes, patch)
2018-11-09 07:00 UTC, Wolfram Schlich
Details | Diff
clamav-0.101.2-tinfo.patch (clamav-0.101.2-tinfo.patch,822 bytes, patch)
2019-04-26 10:47 UTC, Jeroen Roovers
Details | Diff
clamav-0.101.2-r1.ebuild-tinfo.patch (clamav-0.101.2-r1.ebuild-tinfo.patch,1.01 KB, patch)
2019-04-26 10:51 UTC, Jeroen Roovers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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) 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 gentoo-dev 2019-04-26 10:47:54 UTC
Created attachment 574174 [details, diff]
clamav-0.101.2-tinfo.patch
Comment 3 Jeroen Roovers 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 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) 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) 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.