libyal / libfwsi

Library to access the Windows Shell Item format
GNU Lesser General Public License v3.0
67 stars 12 forks source link

Build instructions incorrect/outdated #6

Closed ghost closed 7 years ago

ghost commented 8 years ago

The build-from-source instructions for this (and many other associated) modules appears to be incorrect/outdated.

On a vanilla Linux system the documented instructions boil down to:

% wget X.tar.gz
% tar xzvf X.tar.gz
% cd X
% ./synclibs.sh && ./autogen.sh
% ./configure --prefix=/path
% make
# make install
# ldconfig

However this does not result in the package being detected by plaso's check_dependencies.py.

There is a setuptools setup.py present, but this is not mentioned in the build instructions. Invoking this ...

# python setup.py install --prefix=/path

... results in further compilation and installation of the package such that it is now detected by plaso.

It appears that the correct build steps are something like:

% wget X.tar.gz
% tar xzvf X.tar.gz
% cd X
% ./synclibs.sh && ./autogen.sh
% ./configure --prefix=/path
% python setup.py build
# python setup.py install --prefix=/path
joachimmetz commented 8 years ago

The build-from-source instructions for this (and many other associated) modules appears to be incorrect/outdated.

Don't expect them to be a perfect guide that is able to guide you in every situation. Seeing they are auto-generated, I'll check if they are up to date.

However this does not result in the package being detected by plaso's check_dependencies.py.

That's because plaso expects a Python binding try:

./configure --prefix=/path --enable-python

There is a setuptools setup.py present, but this is not mentioned in the build instructions.

setup.py was added for convenience

Per Building stick with the distribution packaged version:

libfwsi-experimental-20160110.tar.gz

Not the github generated source .tar.gz and .zip files, which is functionality that cannot be disabled.

ghost commented 8 years ago

Obviously plaso expects a python binding, but using '--enable-python' was what I originally did and that leads me to the following compile error:

libcfile_support.c:742:2: error: #error Missing file remove function
 #error Missing file remove function
  ^
Makefile:603: recipe for target 'libcfile_support.lo' failed
make[1]: *** [libcfile_support.lo] Error 1
make[1]: Leaving directory '/data/forensic/src/plaso/libfwsi-20160110/libcfile'
Makefile:717: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

(That appears to arise because HAVE_UNLINK isn't defined, which seems a bit odd).

In a situation like this I don't want to report an issue until I am sure this isn't caused by a failure on my part to follow the build instructions.

So I go back to the instructions and follow them exactly, and that didn't work either.

I have been compiling from the distributed source archives. But, again, when something doesn't work I do a 'git clone' to try the latest code (or look at the diffs) just in case the issue has been resolved by a commit since the last release. For this problem, same result.

joachimmetz commented 8 years ago

Obviously plaso expects a python binding, but using '--enable-python' was what I originally did and that leads me to the following compile error:

This is because you are running HEAD, or the development version, and not the distribution package, the version intended for distribution. I strongly recommend downloading the latest distribution package

(That appears to arise because HAVE_UNLINK isn't defined, which seems a bit odd).

this is because the m4/libcfile.m4 file is not the latest.

So I go back to the instructions and follow them exactly, and that didn't work either.

Again, the instructions will not answer every possible scenario.

ghost commented 8 years ago

I have sent an email to your gmail.

joachimmetz commented 8 years ago

I've update the build instructions a bit.

joachimmetz commented 8 years ago

Try this:

tar xfv libfwsi-experimental-20160110.tar.gz
cd libfwsi-20160110
./configure --enable-python
make