Bug 195182 - security/clamav 0.98.5 and ports/openssl, fails to compile
Summary: security/clamav 0.98.5 and ports/openssl, fails to compile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
: 191250 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-19 20:28 UTC by Larry Rosenman
Modified: 2014-11-21 16:50 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer freebsd_triage 2014-11-19 20:28:59 UTC
clamav 0.98.5 doesn't work with the Ports OPENSSL...

gmake[4]: Entering directory '/usr/ports/security/clamav/work/clamav-0.98.5/freshclam'
  CC       output.o
  CC       optparser.o
  CC       getopt.o
  CC       misc.o
  CC       cdiff.o
  CC       tar.o
  CC       clamdcom.o
  CC       freshclam.o
In file included from ../shared/cdiff.c:41:
In file included from ../libclamav/others.h:22:
In file included from ../libclamav/matcher.h:In file included from freshclam.c:53:
In file included from ../libclamav/others.h:22:
In file included from ../libclamav/matcher.h:28:
In file included from ../libclamav/others.h:52:
../libclamav/crtmgr.h:33:21: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t subject[SHA1_HASH_SIZE];
                    ^
28:
In file included from ../libclamav/others.h:52:
../libclamav/crtmgr.h:33:21: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t subject[SHA1_HASH_SIZE];
                    ^
../libclamav/crtmgr.h:34:20: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t issuer[SHA1_HASH_SIZE];
                   ^
../libclamav/crtmgr.h:34:20: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t issuer[SHA1_HASH_SIZE];
                   ^
../libclamav/crtmgr.h:35:21: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t tbshash[SHA1_HASH_SIZE];
                    ^
../libclamav/crtmgr.h:35:21: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
../libclamav/crtmgr.h:36:20:     uint8_t tbshash[SHA1_HASH_SIZE];error
:                     ^
use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t serial[SHA1_HASH_SIZE];
                   ^
../libclamav/crtmgr.h:36:20: error: use of undeclared identifier
      'SHA1_HASH_SIZE'
    uint8_t serial[SHA1_HASH_SIZE];
                   ^
In file included from freshclam.c:53:
In file included from ../libclamav/others.h:22:
In file included from ../libclamav/matcher.h:28:
../libclamav/others.h:317:5: error: unknown type name 'clcb_file_props'
    clcb_file_props cb_file_props;
    ^
../libclamav/others.h:388:5: error: unknown type name 'clcb_file_props'
    clcb_file_props cb_file_props;
    ^
In file included from ../shared/cdiff.c:41:
In file included from ../libclamav/others.h:22:
In file included from ../libclamav/matcher.h:28:
../libclamav/others.h:317:5: error: unknown type name 'clcb_file_props'
    clcb_file_props cb_file_props;
    ^
../libclamav/others.h:388:5: error: unknown type name 'clcb_file_props'
    clcb_file_props cb_file_props;
    ^
../shared/cdiff.c:181:5: warning: implicit declaration of function 'UNUSEDPARAM'
      is invalid in C99 [-Wimplicit-function-declaration]
    UNUSEDPARAM(lbuf);
    ^
freshclam.c:266:5: warning: implicit declaration of function 'UNUSEDPARAM' is
      invalid in C99 [-Wimplicit-function-declaration]
    UNUSEDPARAM(fullmsg);
    ^
freshclam.c:742:5: warning: implicit declaration of function 'cl_cleanup_crypto'
      is invalid in C99 [-Wimplicit-function-declaration]
    cl_cleanup_crypto();
    ^
2 warnings and 6 errors generated.
../shared/cdiff.c:781:2: error: use of undeclared identifier 'EVP_MD_CTX'
        EVP_MD_CTX *sha256ctx;
        ^
../shared/cdiff.c:781:14: error: use of undeclared identifier 'sha256ctx'
        EVP_MD_CTX *sha256ctx;
                    ^
Makefile:608: recipe for target 'freshclam.o' failed
gmake[4]: *** [freshclam.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....
../shared/cdiff.c:865:5: error: use of undeclared identifier 'sha256ctx'
    sha256ctx = EVP_MD_CTX_create();
    ^
../shared/cdiff.c:865:17: warning: implicit declaration of function
      'EVP_MD_CTX_create' is invalid in C99 [-Wimplicit-function-declaration]
    sha256ctx = EVP_MD_CTX_create();
                ^
../shared/cdiff.c:866:11: error: use of undeclared identifier 'sha256ctx'
    if (!(sha256ctx)) {
          ^
../shared/cdiff.c:873:2: warning: implicit declaration of function
      'EVP_DigestInit_ex' is invalid in C99 [-Wimplicit-function-declaration]
        EVP_DigestInit_ex(sha256ctx, EVP_sha256(), NULL);
        ^
  CC       manager.o
../shared/cdiff.c:873:20: error: use of undeclared identifier 'sha256ctx'
        EVP_DigestInit_ex(sha256ctx, EVP_sha256(), NULL);
                          ^
../shared/cdiff.c:877:3: warning: implicit declaration of function
      'EVP_DigestUpdate' is invalid in C99 [-Wimplicit-function-declaration]
                EVP_DigestUpdate(sha256ctx, (unsigned char *) buff, end - sum);
                ^
../shared/cdiff.c:877:20: error: use of undeclared identifier 'sha256ctx'
                EVP_DigestUpdate(sha256ctx, (unsigned char *) buff, end - sum);
                                 ^
../shared/cdiff.c:880:20: error: use of undeclared identifier 'sha256ctx'
                EVP_DigestUpdate(sha256ctx, (unsigned char *) buff, bread);
                                 ^
../shared/cdiff.c:884:2: warning: implicit declaration of function
      'EVP_DigestFinal_ex' is invalid in C99 [-Wimplicit-function-declaration]
        EVP_DigestFinal_ex(sha256ctx, digest, NULL);
        ^
../shared/cdiff.c:884:21: error: use of undeclared identifier 'sha256ctx'
        EVP_DigestFinal_ex(sha256ctx, digest, NULL);
                           ^
../shared/cdiff.c:885:5: warning: implicit declaration of function
      'EVP_MD_CTX_destroy' is invalid in C99 [-Wimplicit-function-declaration]
    EVP_MD_CTX_destroy(sha256ctx);
    ^
../shared/cdiff.c:885:24: error: use of undeclared identifier 'sha256ctx'
    EVP_MD_CTX_destroy(sha256ctx);
                       ^
6 warnings and 15 errors generated.
Makefile:685: recipe for target 'cdiff.o' failed
gmake[4]: *** [cdiff.o] Error 1
gmake[4]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.98.5/freshclam'
Makefile:717: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.98.5'
Makefile:545: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.98.5'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/clamav
*** Error code 1

Stop.
make: stopped in /usr/ports/security/clamav
thebighonker.lerctr.org /usr/ports/security/clamav #
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-19 20:28:59 UTC
Maintainers CC'd
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2014-11-19 21:03:02 UTC
See discussion 
https://lists.freebsd.org/pipermail/freebsd-ports/2014-November/096608.html

Possible solution: deinstall ClamAV before building the new version.

See similar issues with other ports as described in:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193371
Comment 3 Larry Rosenman freebsd_committer freebsd_triage 2014-11-19 21:09:38 UTC
deinstall of the old clamav works.

HOWEVER, this is SUB-OPTIMAL.
Comment 4 Renato Botelho freebsd_committer freebsd_triage 2014-11-20 15:38:36 UTC
*** Bug 191250 has been marked as a duplicate of this bug. ***
Comment 5 Shawn Webb 2014-11-20 21:15:34 UTC
Hey All,

Shawn Webb from the ClamAV development team here. We're working on a fix for this on our end.

You can track the status of our fix at https://bugzilla.clamav.net/show_bug.cgi?id=11194

Thanks,

Shawn
Comment 6 Larry Rosenman freebsd_committer freebsd_triage 2014-11-20 21:19:53 UTC
Thanks, Shawn!
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-11-21 16:43:15 UTC
A commit references this bug:

Author: garga
Date: Fri Nov 21 16:42:52 UTC 2014
New revision: 373003
URL: https://svnweb.freebsd.org/changeset/ports/373003

Log:
  - Fix error building clamav when old version is installed and openssl from base
    is also installed [1]
  - Fix library version decrease that happened when moved to 0.98.5 [2]
  - Bump PORTREVISION

  PR:		195182
  Obtained from:	https://bugzilla.clamav.net/show_bug.cgi?id=11194 [1] (based on)
  		https://bugzilla.clamav.net/show_bug.cgi?id=11193 [2]

Changes:
  head/security/clamav/Makefile
  head/security/clamav/files/patch-fix-11194
  head/security/clamav/pkg-plist