libyal / libvmdk

Library and tools to access the VMware Virtual Disk (VMDK) format
GNU Lesser General Public License v3.0
163 stars 66 forks source link

can't build release because of undefined constants; can't build git because of missing deps #16

Closed themaddoctor closed 5 years ago

themaddoctor commented 6 years ago

For the release version:

gcc -DHAVE_CONFIG_H -I. -I../common  -I../include -I../common -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse    -g -O2 -MT vmdkmount.o -MD -MP -MF .deps/vmdkmount.Tpo -c -o vmdkmount.o vmdkmount.c
vmdkmount.c: In function ‘vmdkmount_fuse_open’:
vmdkmount.c:183:13: error: ‘EINVAL’ undeclared (first use in this function)
   result = -EINVAL;
             ^~~~~~
vmdkmount.c:183:13: note: each undeclared identifier is reported only once for each function it appears in
vmdkmount.c:216:13: error: ‘ENOENT’ undeclared (first use in this function)
   result = -ENOENT;
             ^~~~~~
vmdkmount.c:229:13: error: ‘EACCES’ undeclared (first use in this function); did you mean ‘AT_EACCESS’?
   result = -EACCES;
             ^~~~~~
             AT_EACCESS
vmdkmount.c: In function ‘vmdkmount_fuse_read’:
vmdkmount.c:273:13: error: ‘EINVAL’ undeclared (first use in this function)
   result = -EINVAL;
             ^~~~~~
vmdkmount.c:320:13: error: ‘ENOENT’ undeclared (first use in this function)
   result = -ENOENT;
             ^~~~~~
vmdkmount.c:354:13: error: ‘EIO’ undeclared (first use in this function)
   result = -EIO;
             ^~~
vmdkmount.c: In function ‘vmdkmount_fuse_readdir’:
vmdkmount.c:600:13: error: ‘EINVAL’ undeclared (first use in this function)
   result = -EINVAL;
             ^~~~~~
vmdkmount.c:617:13: error: ‘ENOENT’ undeclared (first use in this function)
   result = -ENOENT;
             ^~~~~~
vmdkmount.c:633:13: error: ‘errno’ undeclared (first use in this function); did you mean ‘error’?
   result = -errno;
             ^~~~~
             error
vmdkmount.c:649:13: error: ‘EIO’ undeclared (first use in this function)
   result = -EIO;
             ^~~
vmdkmount.c: In function ‘vmdkmount_fuse_getattr’:
vmdkmount.c:801:30: error: ‘ENOENT’ undeclared (first use in this function)
  int result               = -ENOENT;
                              ^~~~~~
vmdkmount.c:814:13: error: ‘EINVAL’ undeclared (first use in this function)
   result = -EINVAL;
             ^~~~~~
vmdkmount.c:843:12: error: ‘errno’ undeclared (first use in this function); did you mean ‘error’?
   result = errno;
            ^~~~~
            error
vmdkmount.c:896:15: error: ‘EIO’ undeclared (first use in this function)
     result = -EIO;
               ^~~
make[1]: *** [Makefile:712: vmdkmount.o] Error 1
make[1]: Leaving directory '/building/forensics/libvmdk-20170226/vmdktools'
make: *** [Makefile:749: all-recursive] Error 1

For the GIT version, all the dependencies are on my system, but automake and configure both insist on dying unless they are also inside the source tree. (This is common for the libraries on libyal, not just for this one.)

themaddoctor commented 6 years ago

I'm sure the error in the release version is just a missing header, but I'm too tired right now to hunt it down.

themaddoctor commented 6 years ago

Found it: configure is not finding errno.h, even though it is on the system.

themaddoctor commented 6 years ago

But now tests fail:

gcc -DHAVE_CONFIG_H -I. -I../common  -I../include -I../common    -g -O2 -MT vmdk_test_getopt.o -MD -MP -MF .deps/vmdk_test_getopt.Tpo -c -o vmdk_test_getopt.o vmdk_test_getopt.c
vmdk_test_getopt.c:33:10: fatal error: vmdk_test_libcnotify.h: No such file or directory
 #include "vmdk_test_libcnotify.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1105: vmdk_test_getopt.o] Error 1
make[2]: Leaving directory '/building/forensics/libvmdk-20170226/tests'
make[1]: *** [Makefile:1391: check-am] Error 2
make[1]: Leaving directory '/building/forensics/libvmdk-20170226/tests'
make: *** [Makefile:749: check-recursive] Error 1
themaddoctor commented 6 years ago

After fixing that, get

# TOTAL: 2
# PASS:  1
# SKIP:  1
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

SKIP: test_vmdkinfo.sh
======================

Test input directory: input not found.
SKIP test_vmdkinfo.sh (exit status: 77)
joachimmetz commented 6 years ago

thx for the report I'll have a look as soon as time permits

joachimmetz commented 6 years ago

Could you attach config.log to determine why errno.h was not detected.

themaddoctor commented 6 years ago

config.log

There is actually no mention of errno.h in the config.log file, nor in config.status

joachimmetz commented 5 years ago

check for errno.h is here: https://github.com/libyal/libvmdk/blob/b9013319ec8376bd81b7bd6348296de9edc6418c/acinclude.m4#L47

which is invoked from here: https://github.com/libyal/libvmdk/blob/b9013319ec8376bd81b7bd6348296de9edc6418c/configure.ac#L130

but no mention of errno in config.log

Where config.log from other system:

configure:42155: checking for errno.h
configure:42155: result: yes
configure:42166: checking whether time.h and sys/time.h may both be included
configure:42193: result: yes
configure:42206: checking for getegid
joachimmetz commented 5 years ago

Does not appears to be an issue with shared versions of dependencies:

Building:
   libcerror support:                         yes
   libcthreads support:                       yes
   libcdata support:                          yes
   libclocale support:                        yes
   libcnotify support:                        yes
   libcsplit support:                         yes
   libuna support:                            yes
   libcfile support:                          yes
   libcpath support:                          yes
   libbfio support:                           yes
   libfcache support:                         yes
   libfdata support:                          yes
   libfvalue support:                         yes
   DEFLATE compression support:               zlib
   FUSE support:                              libfuse

Features:
   Multi-threading support:                   libcthreads
   Wide character type support:               no
   vmdktools are build as static executables: no
   Python (pyvmdk) support:                   no
   Python version 2 (pyvmdk) support:         no
   Python version 3 (pyvmdk) support:         no
   Verbose output:                            no
   Debug output:                              no
joachimmetz commented 5 years ago

@themaddoctor could you indicate if this issue persist with the recent version of libvmdk

I'll release a 20181118 version later today

joachimmetz commented 5 years ago

Closing issue, please reopen if this is still an issue

themaddoctor commented 5 years ago

You closed that pretty fast without waiting for me to try again. Even faster when you consider that the bug report is over 9 months old. But that's cool. I'll figure it out when I update.

joachimmetz commented 5 years ago

It looks like at the date it was reported the issue had already been addressed in HEAD.

joachimmetz commented 5 years ago

You closed that pretty fast without waiting for me to try again.

Not sure if I follow you, on the 18th I indicated that I would release a new version and that the issue can be reopened if the issue persists.