MLC++: A Machine Learning Library in C++ 19 Nov 1997 By Ronny Kohavi Questions to mlc@postofc.corp.sgi.com How to compile the MLC++ Sources -------------------------------- These notes are designed so MLC++ can be compiled on Silicon Graphics using the SGI C++ compiler 7.X (Mongoose) on Irix 6.2 or higher. ** Please note that if you only want to work with MLC++, you can get the MLC++ utilities off our home page. These are precompiled for SGI and are much easier to install and run. 1. Our makefiles use smake (parallel make). smake comes in the dev image in the IDO package (Iris Development Option). You should have that if you have the compilers installed. 2. Be very careful that your .cshrc works correctly if there is no tty. Many mistakes such as "set term=xxx" or stty commands will cause errors. Make sure all these commands are executed only if you have a prompt, i.e, if ( $?prompt ) then.... Another common mistake is that people have tcsh commands inside their .cshrc (those should be in .tcshrc or only execute if you're running tcsh). If you have any questions, send mail to mlc@postofc.corp.sgi.com. -------------------------------------------------- *. Get the MLCX.Y-src.tar.gz file from the MLC++ home page, where X.Y is the version number. *. cd; mkdir mlc; cd mlc *. gzcat MLCX.Y-src.tar.gz | tar xf - *. setenv MLCDIR to the appropriate directory, for example setenv MLCDIR ~/mlc source $MLCDIR/setup.SGI Add this to your .login AFTER you set the path. Note that if you set the path in your .cshrc, it's a mistake! *. MLC++ now ships with LEDA, but please make sure you read the appropriate LEDA agreements: see http://www.mpi-sb.mpg.de/LEDA/leda.html *. Optional: Install dot/dotty in subdirectory graphviz Go to http://www.research.att.com/sw/tools/reuse/ click binary software license agreement and mark graphviz. Relevant links in MLC++ subtree are in bin/{dot,dotty,lefty} if you install graphviz in a different directory. *. Set your PATH to access: ar, ld, strip, as, gcc, g++, dot, dotty and all the external inducers that you will be using. The external inducers supplied with MLC++ (T2, cn2, ibl, oc1, pebls) can be built using the command: bin/buildexternal T2 cn2 ibl oc1 pebls The corresponding executables are stored in ${MLCDIR}/external/${MLC_EXTERNAL_TYPE} The following commands will modify your PATH allowing access to dot, dotty and lefty in the graphviz directory and the external inducer products stored in ${MLCDIR}/external/${MLC_EXTERNAL_TYPE}: set path = ($MLCDIR/graphviz/bin $path) set path = ($MLCDIR/external/${MLC_EXTERNAL_TYPE} $path) These should be added to your .login *after* the source $MLCDIR/setup.SGI These should be added to your .login *. Testers using external executables. These testers will fail if you do not have the products installed. If this is the case, simply do "touch t_XXXX" where t_XXXX is the name of the tester that failed (no suffix). The make will then ignore that tester. Specifically, if you're missing C4.5, do: touch $MLCDIR/src/MTree/tests/t_C45Inducer touch $MLCDIR/src/MTrans/tests/t_DiscDispatch touch $MLCDIR/src/MTrans/tests/t_C45Disc touch $MLCDIR/src/MFSS/tests/t_C45APInducer touch $MLCDIR/src/MWrapper/tests/t_PerfEstInducer touch $MLCDIR/src/MWrapper/tests/t_Bootstrap touch $MLCDIR/src/MWrapper/tests/t_StratifiedCV touch $MLCDIR/src/MWrapper/tests/t_CValidator If you're missing CART, do touch $MLCDIR/src/MTrans/tests/t_CARTInducer If you're missing C5.0, do touch $MLCDIR/src/MTree/tests/t_C50Inducer If you're missing dot, do: touch $MLCDIR/src/MTree/tests/t_CatGraph If you're missing ripper, do: touch $MLCDIR/src/MTrans/tests/t_RipperInducer Note that these will be removed by a "make clean" or "make scratch" The verifiers for utilities (mlc/util dir) will also warn you about diff failures. If these are related to C4.5 and the other tools, this is expected. *. cd $MLCDIR; make The make will attempt to compile leda and then start a make in the src dir. If something fails, you can type check the appropriate execution log in the tester name with a ".out" suffix. For example, the first file to fail if you don't have C4.5 is $MLCDIR/src/MTree/tests/t_C45Inducer. The t_C45Inducer.out file will contain the error "c4.5: not found." To continue after you fix a problem, type "smake" in $MLCDIR/src or in any subdirectory. The default is to compile all the library and run all the testers. This is a long process If you have to clean something, do it in a subdirectory. No need to do it at the src/ level. If the compilation failed in src/MGraph/tests, make clean in MGraph. *. If you develop code, we highly recommend working in DEBUGLEVEL 1 until the code works well. FAQ: *. What's this TOOLROOT and ROOT appearing everywhere, and why are compile lines giving the specific libraries and using -nostdlib -nostdinc? The reason for this is that at SGI we compile code for other (older) operating systems even if we run on a cool new machine with a new operating system. So, for example, by setting TOOLROOT and ROOT to point to directories containing IRIX 6.2, we can generate the appropriate code even if we run IRIX 6.5 on our machine. For all practical purposes, you can think of TOOLROOT and ROOT as equal to / Acknowledgments: We thank Kay Fricke for some comments about building MLC++ Ronny Kohavi and the MLC++ Team MLC++ Team mlc@postofc.corp.sgi.com