I followed the large thread posted in January re: building libvirt on OS X, but I seem to have run into a snag near the end of the compile:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../gnulib/lib -I../include -I../include -I../qemud -I/usr/include/libxml2 -DBINDIR=\"/usr/local/libexec\" -DSBINDIR=\"/usr/local/sbin\" -DSYSCONF_DIR=\"/usr/local/etc\" -DLOCALEBASEDIR=\"/usr/local/share/locale\" -DLOCAL_STATE_DIR=\"/usr/local/var\" -DGETTEXT_PACKAGE=\"libvirt\" -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -DWITH_TEST -DWITH_REMOTE -I /opt/local/include -L/opt/local/lib -DIN_LIBVIRT -I /opt/local/include -L/opt/local/lib -MT libvirt_la-storage_backend_fs.lo -MD -MP -MF .deps/libvirt_la-storage_backend_fs.Tpo -c storage_backend_fs.c -fno-common -DPIC -o .libs/libvirt_la-storage_backend_fs.o
storage_backend_fs.c:34:20: error: endian.h: No such file or directory
storage_backend_fs.c:35:22: error: byteswap.h: No such file or directory
storage_backend_fs.c:36:20: error: mntent.h: No such file or directory
storage_backend_fs.c:110: error: '__BIG_ENDIAN' undeclared here (not in a function)
storage_backend_fs.c:143: error: '__LITTLE_ENDIAN' undeclared here (not in a function)
storage_backend_fs.c: In function 'virStorageBackendProbeFile':
storage_backend_fs.c:377: warning: comparison between pointer and integer
storage_backend_fs.c:394: warning: comparison between pointer and integer
storage_backend_fs.c: In function 'virStorageBackendFileSystemIsMounted':
storage_backend_fs.c:458: error: '_PATH_MOUNTED' undeclared (first use in this function)
storage_backend_fs.c:458: error: (Each undeclared identifier is reported only once
storage_backend_fs.c:458: error: for each function it appears in.)
storage_backend_fs.c:458: warning: passing argument 1 of 'fopen' from incompatible pointer type
storage_backend_fs.c:461: warning: format '%s' expects type 'char *', but argument 4 has type 'struct <anonymous> *'
storage_backend_fs.c:465: warning: implicit declaration of function 'getmntent'
storage_backend_fs.c:465: warning: nested extern declaration of 'getmntent'
storage_backend_fs.c:465: warning: assignment makes pointer from integer without a cast
storage_backend_fs.c:466: error: dereferencing pointer to incomplete type
storage_backend_fs.c:466: error: request for member 'mnt_dir' in something not a structure or union
storage_backend_fs.c:466: warning: passing argument 1 of 'strcmp' from incompatible pointer type
make[2]: *** [libvirt_la-storage_backend_fs.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
endian.h does exist on OS X, but under a bits directory, but byteswap.h and mntent.h don't exist at all on the default X-Code install. Any ideas?
- Pat