from Jeff Crouse date Fri, Mar 11, 2011 at 3:54 PM subject BSE on Mac . . . Thanks very much for creating BSE. I was just compiling it and I noticed 3 simple changes that will get it to compile on my Mac running OS 10.6.6. I hope this info is helpful. 1) configure.cc and unitex.cc need to include "sys/types.h" for 'uint' 2) stack.cc, parse.c, and main.c all include malloc.h, which is obsolete on Mac (it is rolled into stdlib.h). You could do something like the following in these files: #if !defined(__APPLE__) #include #endif 3) Finally, a bunch of files (image.cc, kmeans.cc, segmentation.cc, texture.cc) include values.h, which also doesn't exist on a Mac. It seems like it is only needed for FLT_MAX, which is located in float.h on my Mac. --------------- --------------- Another addendum to the original README: relevant details to get it work on Mac OS X Leopard Vidit Jain Please read the original README before proceeding. While most of the details included in this document are specific to Mac OS X, they may also be helpful in resolving similar issues on other platforms. Required libraries/binaries: --------------------------- * libjpeg : fink distribution available * gfortran : no fink distribution available. Can use the version available at http://hpc.sourceforge.net/. Note: g95 fortran compiler fails to compile the source in trlan directory. * lapack, blas Modifications to source files ----------------------------- 1) values.h : This interface is obsolete and may not be present on all flavors of Unix (Mac OS X does not have it). This header file is mostly needed for obtaining the system-dependent max-, min-, and similar values for different data types such as float and int. Although some of the required constants are defined in util/types.hh, is needed for resolving macros such as FLT_MAX. Files affected : util/kmeans.cc, util/segmentation.cc, group/texture.cc 2) Some distributions of Unix may not have 'uint' data-type defined. Util::uint is type-defined as 'unsigned int' in this distribution. This name resolution need to be made explicit by using one of the two following ways depending on the required name resolution scope: - Using Util::uint - uint 'replace by' Util::unit Files affected: util/configure.cc, apps/unitex.cc 3) For reasons similar to (1) and (2), "malloc.h" need to be replaced by "stdlib.h" in bench/csa-1.2/csa/prec_costs/{main.c, parse.c} Modifications to Makefile ------------------------- 1) Makefile.gcc : need to include the appropriate directories for libjpeg in ${IFLAGS} and ${LFLAGS} 2) trlab/Makefile.gcc : need 'ranlib libtran.a' after creating the library archive libtrlan.a, i.e., after 'ar -cru libtrlan.a ...' Happy segmenting!!!