1 minute read

A while ago I briefly used CarvFS on a linux system for testing. It was nice. Zero-storage carving can come in handy, especially when you are dealing with live CD systems. But installing on Mac would make experimentation and testing a bit more handy than running a VM. If you are reading this you might have had the experience of trying to compile CarvFS on Mac, have failed, and are stuck. Fear not!
Error when compiling on Mac
CMake Error at CMakeLists.txt:21 (MESSAGE):
No compatible (>= 1.0.0) version of libcarvpath found

First, a blog I really enjoy int for(ensic) blog has notes and downloads to install via Darwin ports. These can be found here: http://computer.forensikblog.de/en/2010/08/carvfs_on_a_mac.html
*note - if you use the Darwin ports method he uses patches for libcarvpath, carvfs, and the ewf module that I do not use!

But me being stubborn, I don't like to use Darwin ports since I can compile what I want 95% of the time. Welcome to the 5%. So looking at forensikblog's port file you can see what you need to change. By the errors it looks like it is only a library file, but it is also a bit more. So here is my non-Darwin ports CarvFS tutorial:

In the carvfs directory there is a 'src' sub-folder. Inside that replace the CMakeLists.txt file with this one [broken link, sorry]

Edit 'carvfs.c' where it says
sprintf(imgtypelib,"libmod%s.so",imgtype);

to be
sprintf(imgtypelib,"libmod%s.dylib",imgtype);

Then in the main carvfs directory run the command:

cmake -DCMAKE_INCLUDE_PATH:PATH=/usr/local/include -DCMAKE_LIBRARY_PATH:PATH=/usr/local/lib -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON src


If everything is ok, you will get a make file. Then you just do the standard 'make && sudo make install'

Thanks again to int for(ensic) blog.