Hi there,

I'm sending this to clamav-devel rather than clamav-users as I suspect I may have missed something during the configure/compile phase rather than at runtime. If I'm wrong, I'll happily repost to the -users list.

I maintain a distribution of ClamAV for Mac OS X and have to generate a build which runs on both PPC and Intel architectures for the three most recent major releases of OS X. I achieve this by using the following settings for the configure phase (after applying the appropriate patch for 0.96 clamd on PPC):

bash$ CC="/usr/bin/gcc-4.2" CXX="/usr/bin/g++-4.2" CFLAGS="-O2 -g - D_FILE_OFFSET_BITS=64 -mmacosx-version-min=10.4 -isysroot /Developer/ SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" CXXFLAGS="-O2 -g - D_FILE_OFFSET_BITS=64 -mmacosx-version-min=10.4 -isysroot /Developer/ SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" ./configure --disable- dependency-tracking --enable-llvm --enable-clamdtop --with- user=_clamav --with-group=_clamav

When I run clamscan on the same PPC machine I use for building it, everything runs fine, however, when I copy the build over to a machine with an Intel processor, I get the following warning about there not being any available targets.

libclamav JIT: error creating execution engine: No available targets are compatible with this triple, see -version for the available targets


When I run clambc to see which targets are available, I get the following:

bash$ ./clambc --version
Clam AntiVirus Bytecode Testing Tool 0.96
Low Level Virtual Machine (http://llvm.org/):
 llvm version 2.7
 Optimized build with assertions.
 Built May  9 2010 (01:15:14).
 Host: i386-apple-darwin10
 Host CPU: penryn

 Registered Targets:
   ppc32 - PowerPC 32
   ppc64 - PowerPC 64

If I do the configure and compile on the Intel machine, it gives the following targets
Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64

Predictably it then gives the same error message as earlier when I copy it over to the PowerPC machine.

Could someone tell me how to register both PPC and x86 targets please?

On a related note, I'm intrigued to know how it managed to register 64 bit targets when I only specified 32bit architectures in the configure script. I'm guessing that means there's some assumptions being made during the compile phase. If so, how can I override them?

Many thanks
Mark

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

Reply via email to