[MacPorts] #40541: clamav-0.98 build fails with redefinition of typedef 'Byte'

MacPorts noreply at macports.org
Fri Sep 20 07:44:36 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
 Keywords:            |       Port:  clamav
----------------------+--------------------------------
 I have Snow Leopard.   The relevant section of the log is:

 {{{
 :info:build   CC     libclamav_la-htmlnorm.lo
 :info:build In file included from 7z/LzmaDec.h:7,
 :info:build                  from lzma_iface.h:26,
 :info:build                  from upx.c:59:
 :info:build 7z/Types.h:58: error: redefinition of typedef 'Byte'
 :info:build /opt/local/include/zconf.h:368: error: previous declaration of
 'Byte' was here
 }}}

 from `7z/Types.h:58`:

 {{{
 typedef unsigned char Byte;
 }}}

 from `/opt/local/include/zconf.h:367-369`:

 {{{
 #if !defined(__MACTYPES__)
 typedef unsigned char  Byte;  /* 8 bits */
 #endif
 }}}

 Workaround: replace {{{Byte}}} with {{{SZByte}}} in the 7z directory:

 {{{
 for f in $(port dir clamav)/work/clamav-0.98/libclamav/7z/*.[ch] ; do
   sudo sed -i -e 's/Byte/SZByte/g' $f
 done
 }}}

 With this change, the build completes and clamscan is able to process .7z
 archives.

-- 
Ticket URL: <https://trac.macports.org/ticket/40541>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list