[Clamav-devel] enabling DMG and XAR support

Brandon Perry bperry.volatile at gmail.com
Wed Mar 26 09:06:27 EDT 2014


"I don't use MacPorts or any other non-standard build environment..."

Your entire build system is non-standard if you maintain in the way you say
you do.

This is very likely an architecture issue and will require explicit casts
in order to work for you (which would cause performance decreases for every
other ClamAV user). Would you expect the ClamAV project to maintain this?
You say you have submitted code in the past, you will likely need to make
this work yourself by adding the explicit casts to the codebase.

This really isn't an issue with ClamAV or LLVM/Clang. You have a system
that is relatively unsupportable because of A) age and B) you have
*heavily* modified it at this point to attempt to maintain it. Even if one
of us had an old PPC with gcc 4.0 (which compiles ClamAV just fine on FC4
which makes me think your patching has not been as successful as you
think), we would still not have the same environment you do since you claim
to maintain your binaries by hand.

Unless you are willing to add the explicit casts yourself, I think you are
probably SOL.



On Wed, Mar 26, 2014 at 3:02 AM, Dale Walsh <dale at daleenterprise.com> wrote:

> You ask for details so here they are.
>
> I don't use MacPorts or any other non-standard build environment, I don't
> suffer compiler bugs so I don't need  'CCFLAGS="-O0" to correct a buggy
> compiler and I have applied every patch and bug-fix released and experience
> no build issues with any other software source.
>
>
> Here's what I start with:
>
> Using gcc-3.3 (it's old but it compiles for ppc)
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -g -Os -pipe
> -pipe -no-cpp-precomp -arch ppc" CCFLAGS="-arch ppc -g -Os -pipe "
> CXXFLAGS="-arch ppc -g -Os -pipe " LDFLAGS="-arch ppc            "
>  TEXI2HTML="/usr/bin/texi2html -subdir ." rm -rf /tmp/clamav/Release &&
> mkdir -p /tmp/clamav/Debug && ln -sf /CLAMAV_BUILD/Release
> /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048" ./configure
> --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc --enable-bigstack
> --with-user=clamav --with-group=clamav --with-dbdir=/var/clamav
> --disable-clamav
>
> make
> make install # no issues with the build or install but nothing seems to
> works and segfaults (expected behavior)
>
> Using gcc-3.3
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -arch i386
> -g -Os -pipe -pipe -no-cpp-precomp -arch ppc -arch i386" CCFLAGS="-arch ppc
> -arch i386 -g -Os -pipe " CXXFLAGS="-arch ppc -arch i386 -g -Os -pipe "
> LDFLAGS="-arch ppc -arch i386            "  TEXI2HTML="/usr/bin/texi2html
> -subdir ." rm -rf /tmp/clamav/Release && mkdir -p /tmp/clamav/Debug && ln
> -sf /CLAMAV_BUILD/Release /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048"
> ./configure --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc
> --enable-bigstack --with-user=clamav --with-group=clamav
> --with-dbdir=/var/clamav --disable-clamav
>
> make
>
> fails with:
>  ld: Undefined symbols:
> _lt_libltdlc_LTX_preloaded_symbols
> /usr/bin/libtool: internal link edit command failed
>
>
>
> Using gcc-3.5 (it's old but it compiles for ppc)
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -g -Os -pipe
> -pipe -no-cpp-precomp -arch ppc" CCFLAGS="-arch ppc -g -Os -pipe "
> CXXFLAGS="-arch ppc -g -Os -pipe " LDFLAGS="-arch ppc            "
>  TEXI2HTML="/usr/bin/texi2html -subdir ." rm -rf /tmp/clamav/Release &&
> mkdir -p /tmp/clamav/Debug && ln -sf /CLAMAV_BUILD/Release
> /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048" ./configure
> --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc --enable-bigstack
> --with-user=clamav --with-group=clamav --with-dbdir=/var/clamav
> --disable-clamav
>
> make
> make install # no issues with the build or install but nothing seems to
> works and segfaults (expected behavior)
>
> Using gcc-3.5
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -arch i386
> -g -Os -pipe -pipe -no-cpp-precomp -arch ppc -arch i386" CCFLAGS="-arch ppc
> -arch i386 -g -Os -pipe " CXXFLAGS="-arch ppc -arch i386 -g -Os -pipe "
> LDFLAGS="-arch ppc -arch i386            "  TEXI2HTML="/usr/bin/texi2html
> -subdir ." rm -rf /tmp/clamav/Release && mkdir -p /tmp/clamav/Debug && ln
> -sf /CLAMAV_BUILD/Release /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048"
> ./configure --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc
> --enable-bigstack --with-user=clamav --with-group=clamav
> --with-dbdir=/var/clamav --disable-clamav
>
> make
>
> fails with:
>  ld: Undefined symbols:
> _lt_libltdlc_LTX_preloaded_symbols
> /usr/bin/libtool: internal link edit command failed
>
>
> Using gcc-4.0.0
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -g -Os -pipe
> -pipe -no-cpp-precomp -arch ppc" CCFLAGS="-arch ppc -g -Os -pipe "
> CXXFLAGS="-arch ppc -g -Os -pipe " LDFLAGS="-arch ppc            "
>  TEXI2HTML="/usr/bin/texi2html -subdir ." rm -rf /tmp/clamav/Release &&
> mkdir -p /tmp/clamav/Debug && ln -sf /CLAMAV_BUILD/Release
> /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048" ./configure
> --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc --enable-bigstack
> --with-user=clamav --with-group=clamav --with-dbdir=/var/clamav
> --disable-clamav
>
> make
> fails with  ./llvm/lib/VMCore/TypesContext.h:311: error: invalid
> conversion from 'const llvm::Type*' to 'long int'
>
> Using gcc-4.0.1
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -g -Os -pipe
> -pipe -no-cpp-precomp -arch ppc" CCFLAGS="-arch ppc -g -Os -pipe "
> CXXFLAGS="-arch ppc -g -Os -pipe " LDFLAGS="-arch ppc            "
>  TEXI2HTML="/usr/bin/texi2html -subdir ." rm -rf /tmp/clamav/Release &&
> mkdir -p /tmp/clamav/Debug && ln -sf /CLAMAV_BUILD/Release
> /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048" ./configure
> --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc --enable-bigstack
> --with-user=clamav --with-group=clamav --with-dbdir=/var/clamav
> --disable-clamav
>
> make
> fails with  ./llvm/lib/VMCore/TypesContext.h:311: error: invalid
> conversion from 'const llvm::Type*' to 'long int'
>
> Using gcc-4.1.0
> cd /private/var/tmp/clamav/clamav-1.obj && CFLAGS="-arch ppc -g -Os -pipe
> -pipe -no-cpp-precomp -arch ppc" CCFLAGS="-arch ppc -g -Os -pipe "
> CXXFLAGS="-arch ppc -g -Os -pipe " LDFLAGS="-arch ppc            "
>  TEXI2HTML="/usr/bin/texi2html -subdir ." rm -rf /tmp/clamav/Release &&
> mkdir -p /tmp/clamav/Debug && ln -sf /CLAMAV_BUILD/Release
> /tmp/clamav/Release && CFLAGS="-DFD_SETSIZE=2048" ./configure
> --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc --enable-bigstack
> --with-user=clamav --with-group=clamav --with-dbdir=/var/clamav
> --disable-clamav
>
> make
> fails with  ./llvm/lib/VMCore/TypesContext.h:311: error: invalid
> conversion from 'const llvm::Type*' to 'long int'
>
>
>
> -- Dale
>
>
>
>
> On Mar 25, 2014, at 18:29 PM, Brandon Perry wrote:
>
>  Thanks, I don't have a PPC here, but I am going to install fedora core 4
>> x86 and x86_64 inside of virtual machines and will see if I run into any
>> issues.
>>
>> Legacy systems are unfortunate. However, I think you would be hard
>> pressed to find any open source project today supporting that, so I
>> don't think it is that ridiculous to not expend the effort to actively
>> support it. I wouldn't be surprised if the code required to make it
>> compile on your system *and* modern systems caused performance decreases
>> (or even not compile on modern gcc!).
>>
>> There might be a small chance that you would need to maintain a separate
>> patchset to maintain this compatibility since having it compile on both
>> your legacy and modern systems would be detrimental to other ClamAV users.
>>
>> _______________________________________________
>> http://lurker.clamav.net/list/clamav-devel.html
>> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>>
>>
>>
> _______________________________________________
> http://lurker.clamav.net/list/clamav-devel.html
> Please submit your patches to our Bugzilla: http://bugs.clamav.net
>



-- 
http://volatile-minds.blogspot.com -- blog
http://www.volatileminds.net -- website



More information about the clamav-devel mailing list