[MacPorts] #40541: clamav-0.98 build fails with redefinition of typedef 'Byte'
MacPorts
noreply at macports.org
Wed Sep 25 07:07:12 PDT 2013
#40541: clamav-0.98 build fails with redefinition of typedef 'Byte'
-----------------------+--------------------------------
Reporter: gnwiii@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.0
Resolution: | Keywords:
Port: clamav |
-----------------------+--------------------------------
Comment (by gnwiii@…):
I gather that the zlib typedef for Byte isn't causing problems for other
ports.
C11 allows multiple (consistent!) typedefs, so this issue is really with
Apple's old gcc version. Unless clamav builds on other platforms
encounter the problem, macports should try to use clamav-0.98 "as is".
I tried building clamav-0.98 in a "stand-alone" configuration.
1) using Apple gcc and zlib: the build did not encounter the problem, so
it is macports' zlib that conflicts with clamav's libclamav/7z. I didn't
run the check for this build and some further investigation is needed to
determine why the multiple typedef doesn't occur (, and run checks to make
sure the build actually works!).
2) using macports' clang and zlib:
The clamav-0.98 configure script uses {{{-Wl,-rpath=...}}} so needs
editing to support zlib in /opt/local. With this configuration the build
succeeds with a warning:
{{{
$ CC=/opt/local/bin/clang CXX=/opt/local/bin/clang++ \
CPPFLAGS='-I/opt/local/include' \
LDFLAGS='-L/opt/local/lib' \
./configure --prefix=/opt/clamav.net --with-zlib=/opt/local --enable-
check
[...]
configure: Summary of detected features follows
OS : darwin10.8.0
pthreads : yes ()
configure: Summary of miscellaneous features
check : -L/opt/local/lib -lcheck -R/opt/local/lib
fanotify : yes
fdpassing : 1
IPv6 : yes
configure: Summary of optional tools
clamdtop : -L/opt/local/lib -lncurses -R/opt/local/lib
(auto)
milter : yes (disabled)
configure: Summary of engine performance features)
release mode: yes
jit : yes (auto)
mempool : yes
configure: Summary of engine detection features
autoit_ea06 : yes
bzip2 : ok
zlib : /opt/local
unrar : yes
}}}
This build fails some checks:
{{{
3 of 12 tests failed
(1 test was not run)
See unit_tests/test-suite.log
Please report to http://bugs.clamav.net/
}}}
The log has:
{{{
CC libclamav_la-upx.lo
In file included from upx.c:59:
In file included from ./lzma_iface.h:26:
In file included from ./7z/LzmaDec.h:7:
./7z/Types.h:58:23: warning: redefinition of typedef 'Byte' is a C11
feature [-Wtype
def-redefinition]
typedef unsigned char Byte;
^
/opt/local/include/zconf.h:368:24: note: previous definition is here
typedef unsigned char Byte; /* 8 bits */
^
1 warning generated.
}}}
The checks that fail:
{{{
=============================================
ClamAV devel: unit_tests/test-suite.log
=============================================
3 of 12 tests failed. (1 test was not run).
.. contents:: :depth: 2
FAIL: check5_clamd_vg.sh (exit: 109)
====================================
Killing stuck clamd!
FAIL: check6_clamd_vg.sh (exit: 109)
====================================
Running suite(s): clamd
100%: Checks: 77, Failures: 0, Errors: 0
Killing stuck clamd!
SKIP: check7_clamd_hg.sh (exit: 77)
===================================
FAIL: check8_clamd_hg.sh (exit: 42)
===================================
}}}
--
Ticket URL: <https://trac.macports.org/ticket/40541#comment:4>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list