hivexml on OS X was failing with a symbol-not-found error while dynamically linking. Adding iconv to libhivex fixes the issue and lets OS X process 'images/large' with hivexml. It took careful iconv autotool additions to get compilation working in Fedora as well, but these two lines build and run on OS X 10.6 and 10.8, and Fedora 17 and 18. Unfortunately, a separate issue is revealed here in OS X, as some of the hivexml value data appears as Kanji. However, that is an issue distinct from getting the program to run. Signed-off-by: Alex Nelson <a.nelson at prometheuscomputing.com> --- configure.ac | 1 + lib/Makefile.am | 1 + 2 files changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 0dfb995..298e6a9 100644 --- a/configure.ac +++ b/configure.ac @@ -184,6 +184,7 @@ AS_IF([test "x$with_readline" != xno], dnl For i18n. AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.17]) +AM_ICONV dnl libxml2. PKG_CHECK_MODULES([LIBXML2], [libxml-2.0]) diff --git a/lib/Makefile.am b/lib/Makefile.am index a339a00..8d7ff69 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -36,6 +36,7 @@ libhivex_la_LIBADD = ../gnulib/lib/libgnu.la $(LTLIBOBJS) libhivex_la_LDFLAGS = \ -version-info 0:0:0 \ $(VERSION_SCRIPT_FLAGS)$(srcdir)/hivex.syms \ + $(LTLIBICONV) \ $(LTLIBINTL) \ $(LTLIBTHREAD) libhivex_la_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) -- 1.8.2 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20130405/c294c15c/attachment.htm>
Richard W.M. Jones
2013-Apr-05 21:20 UTC
[Libguestfs] [PATCH] Mac OS X: Link iconv in libhivex
On Fri, Apr 05, 2013 at 04:57:34PM -0400, Alex Nelson wrote:> hivexml on OS X was failing with a symbol-not-found error while > dynamically linking. Adding iconv to libhivex fixes the issue and lets > OS X process 'images/large' with hivexml. > > It took careful iconv autotool additions to get compilation working in > Fedora as well, but these two lines build and run on OS X 10.6 and > 10.8, and Fedora 17 and 18.Thanks Alex, I have committed and pushed this.> Unfortunately, a separate issue is revealed here in OS X, as some of > the hivexml value data appears as Kanji. However, that is an issue > distinct from getting the program to run.This could be because the Windows Registry doesn't handle encodings properly, so the contents of the Registry (in effectively some random encoding) are being displayed as UTF-8 (on the Mac OS X host). You might want to see if looking at the raw bytes in the Registry helps you to determine what the encoding should be. But note that I've been here before: there's no way that hivex can know the correct encoding for a random Registry key. We just don't have enough information. It's up to the hivex consumer to provide this knowledge from reverse-engineering hives. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Reasonably Related Threads
- [PATCH] hivex: Added gnulib includes from builddir, as suggested by the Gnulib documentation; link hivexml against libgnu.
- [hivex] OS X, Fedora 17: iconv autotool inconsistency
- [PATCH] hivex: A few tweaks to enable building in a separate directory
- [Hivex] [PATCH] lib: Promote byte_conversions.h #include to hivex-internal.h
- Re: [libhivex] Undefined behavior when accessing invalid (too small) registry hives