[CLAM] Compiling CLAM under Mac OS X

Maarten de Boer mdeboer at iua.upf.es
Thu Jul 24 12:19:04 PDT 2003

Okay, just a quick note about xerces-c-1.7.0 compilation on Mac OS X:

You should set the XERCERCROOT env. variable to the directory of
xerces-c-src1_7_0. In my case:

$ setenv XERCESCROOT /Users/admin/src/xerces-c-src1_7_0
(or export XERCESCROOT=/Users/admin/src/xerces-c-src1_7_0 in case you use 

Now, go to $XERCESCROOT/src/xercesc and run

$ ./runConfigure -p macosx

Apply, the patch below (remove std from the call to snprint), and run make. For
me this worked. I did not install the library in the system, but kept it next
to CLAM, as described in my previous mail.


--- xerces-c-src1_7_0.orig/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp Thu Mar  7 23:45:28 2002
+++ xerces-c-src1_7_0/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp Tue May 27 14:20:25 2003
@@ -393,7 +393,7 @@
         reasonStr = "Unknown error source";
     char text[256];
-    std::snprintf(text, sizeof(text), "Xerces Panic Error: %s", reasonStr);
+    ::snprintf(text, sizeof(text), "Xerces Panic Error: %s", reasonStr);
     //  The default handling of panics is not very friendly.

More information about the clam-users mailing list