[sleuthkit-developers] fiwalk compilation error using --with-libewf parameter
Brought to you by:
carrier
From: Willi B. <wil...@gm...> - 2013-07-31 03:11:28
|
I've been building TSK with libewf support using the --with-libewf parameter, but I think there may be a bug in the makefile generated for fiwalk. On my Ubuntu/Debian system with both gcc and g++, g++ is chosen to compile fiwalk: me$ LIBEWF_HOME=$(pwd)/../libewf/build ./configure --with-libew$(pwd)/../libewf/build/ --prefix=$(pwd)/build/; me$ LIBEWF_HOME=$(pwd)/../libewf/build make ...snip... g++ -DHAVE_CONFIG_H -I. -I../../../tsk -I../../.. -Wall -g -O2 -MT fiwalk.o -MD -MP -MF .deps/fiwalk.Tpo -c -o fiwalk.o fiwalk.cpp In file included from fiwalk.cpp:39:0: fiwalk.h:94:20: fatal error: libewf.h: No such file or directory compilation terminated. We see from the build step that the libewf include directory is not provided. Taking a look at the generated makefile, I have: CFLAGS = -g -O2 -pthread -I/usr/local/include -I/home/me/Desktop/autopsy-dev/sleuthkit/../libewf/build//include ...snip... CXXFLAGS = -g -O2 I found that by copying the include directive over to the CXXFLAGS definition in the fiwalk makefile, the compilation completed successfully. Unfortunately, I haven't used Automake before, so I cannot give advice confidently. However, by looking at the source files, I conjecture adding a line to configure.ac around line 176 will fix the issue: AS_IF([test "x$with_libewf" != "xno"], # Test the dir if they specified something beyond yes/no [AS_IF([test "x$with_libewf" != "xyes"], [AS_IF([test -d ${with_libewf}/include], [CFLAGS="$CFLAGS -I${with_libewf}/include" CXXFLAGS="$CXXFLAGS -I${with_libewf}/include" # <<<<<<< ADD THIS HERE LDFLAGS="$LDFLAGS -L${with_libewf}/lib"], # Dir given was not correct [AC_MSG_FAILURE([libewf directory not found at ${with_libewf}])]) Is this, in fact, a bug, and is the proposed fix reasonable? Thanks, Willi |