Re: enabling DMG and XAR support

Dale Walsh <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.