Re: enabling DMG and XAR support

Brandon Perry <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <CAOJKFBCdR117zW9SuZ0ez6wyS47=QPnrjETU_qgV-NL_nwf2Nw@mail.gmail.com>
Dale,

Unless you are willing to get me a copy of your gcc, I am going to be
unable to reproduce this. As it stands, this PPC has gcc 4.0 completely
unpatched and I am not able to even get close to compilation as configure
simply won't continue with the bugs I have in this compiler. I also do not
have the time to guess as to what version of gcc corresponds to what you
have based on the way you have maintained it.

I also doubt any of the real developers would go to this kind of trouble as
well to attempt to reproduce the problem. This is an open source project, I
am sure any patches you come up with to resolve the issue will be
considered for inclusion upstream.


On Thu, Mar 27, 2014 at 9:39 AM, Brandon Perry <[email protected]>wrote:

> I  have found a friend with an old G5 PPC that he is willing to lend for a
> couple days. When I get it probably this weekend I will be able to attempt
> to repro the issues you are having. Let me know if the --enable-llvm=no
> flag does/doesnt work for you.
>
> However, if I can repro and I can fix the code up to compile correctly, I
> do no expect that patch to be merged into mainline codebase. I dont expect
> sourcefire to officially support your system in its current state since the
> current codebase works fine for 99.9% of people.
>
> Sent from a computer
>
> > On Mar 26, 2014, at 2:22 PM, Brandon Perry <[email protected]>
> wrote:
> >
> > This also might be worth trying.
> >
> > Dale, could you try appending this to your configure line and see if it
> resolves the issue with your 4.x compiler?
> >
> > Sent from a computer
> >
> >> On Mar 26, 2014, at 2:19 PM, Steven Morgan <[email protected]>
> wrote:
> >>
> >> FYI, This just in (from clamdoc.pdf):
> >>
> >> <quote>
> >> The following packages are optional, but required for bytecode JIT
> support:
> >>
> >>   GCC C and C++ compilers (minimum 4.1.3, recommended 4.3.4 or newer)
> >> the package for these compilers are usually called: gcc, g++, or
> gcc-c++.
> >> </quote>
> >>
> >>  Mileage may be better in those cases by using ./configure
> --enable-llvm=no
> >>
> >>
> >> On Wed, Mar 26, 2014 at 3:06 PM, Brandon Perry <
> [email protected]>wrote:
> >>
> >>> FWIW i am currently asking friends if they have a PPC that i can try
> this
> >>> one.
> >>>
> >>> Sent from a computer
> >>>
> >>>>> On Mar 26, 2014, at 1:37 PM, Brandon Perry <
> [email protected]>
> >>>> wrote:
> >>>>
> >>>> You must not have read my email. I was not saying it is your build
> tool.
> >>> I said it was your architecture causing the LLVM type to not be
> implicitly
> >>> casted to a long int, likely due to register sizes on the PPC platform.
> >>>>
> >>>> You will need to modify the code to explicitly cast the LLVM type to a
> >>> long int so that it compiles on your architecture.
> >>>>
> >>>>
> >>>>
> >>>> Sent from a computer
> >>>>
> >>>>> On Mar 26, 2014, at 12:58 PM, Dale Walsh <[email protected]>
> >>> wrote:
> >>>>>
> >>>>> Why do people have to be so stupid and immediately implicate the
> build
> >>> tools or environment?
> >>>>>
> >>>>> Because updates and bug-fixes were applied, your assuming that these
> >>> are not done correctly or in compliance with the OS and build
> environment
> >>> or that they are faulty.
> >>>>>
> >>>>> First, you need to stop this bull-crap about non-standard and heavily
> >>> modified and listen to the details regarding the issue you are told and
> >>> stop focusing on the build tools which you have no clue about.
> >>>>>
> >>>>> It is best that you accept my word that it is standard and in
> >>> compliance with the OS, build environment and ADE.
> >>>>>
> >>>>> I have confirmed the issue still exists under gcc-4.4 so it's not a
> >>> build tool issue.
> >>>>>
> >>>>> I now have generated a fully working  ClamAV 0.98.1 under gcc-3.3,
> >>> gcc-4.0.0 and gcc 4.0.1 by cleanly autoreconf-ing the source tree.
> >>>>>
> >>>>> Here's my configure for the working builds under the mentioned
> >>> compilers:
> >>>>> CFLAGS="-arch ppc -arch i386 -g -Os -pipe -DFD_SETSIZE=2048 -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   "
> >>> ./configure --prefix="/usr" --mandir=/usr/share/man --sysconfdir=/etc
> >>> --enable-bigstack --with-user=clamav --with-group=clamav
> >>> --with-dbdir=/var/clamav --disable-clamav
> >>>>>
> >>>>>
> >>>>>
> >>>>> Is using ltmain.sh from Debian-Ubuntu called portability amongst
> >>> different environments??
> >>>>>
> >>>>>
> >>>>> -- Dale
> >>>>>
> >>>>>
> >>>>>
> >>>>>> On Mar 26, 2014, at 09:06 AM, Brandon Perry wrote:
> >>>>>>
> >>>>>> "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 <
> [email protected]>
> >>> 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
> >>>>>> _______________________________________________
> >>>>>> 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://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
_______________________________________________
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.