When compiling on Mac OS X 10.4.10 (Tiger) with GCC 4 I get: common_interface.c:62:24: error: sys/endian.h: No such file or directory common_interface.c: In function 'pci_device_cfg_read_u16': common_interface.c:473: warning: implicit declaration of function 'le16toh' common_interface.c:473: warning: nested extern declaration of 'le16toh' common_interface.c: In function 'pci_device_cfg_read_u32': common_interface.c:489: warning: implicit declaration of function 'le32toh' common_interface.c:489: warning: nested extern declaration of 'le32toh' common_interface.c: In function 'pci_device_cfg_write_u16': common_interface.c:555: warning: implicit declaration of function 'htole16' common_interface.c:555: warning: nested extern declaration of 'htole16' common_interface.c: In function 'pci_device_cfg_write_u32': common_interface.c:572: warning: implicit declaration of function 'htole32' common_interface.c:572: warning: nested extern declaration of 'htole32' make[2]: *** [common_interface.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ***** make failed on lib/libpciaccess There are two reasons: 1. wrong C header file included 2. missing macros to convert between host and little or big endian integer formats A little patch can correct (although I cannot test whether the library actually works: no PCI on board). --- lib/libpciaccess/src/common_interface.c-orig 2007-09-22 10:35:52.000000000 +0200 +++ lib/libpciaccess/src/common_interface.c 2007-09-23 20:28:13.000000000 +0200 @@ -57,8 +57,14 @@ #define LETOH_32(x) (x) #define HTOLE_32(x) (x) -#else +#elif defined(__APPLE__) /* Mac OS X */ +#include <machine/endian.h> +#define LETOH_16(x) OSSwapLittleToHostInt16(x) +#define HTOLE_16(x) OSSwapHostToLittleInt16(x) +#define LETOH_32(x) OSSwapLittleToHostInt32(x) +#define HTOLE_32(x) OSSwapHostToLittleInt32(x) +#else #include <sys/endian.h> #define LETOH_16(x) le16toh(x)
Created attachment 11703 [details] [review] Patch to endianness and bit swapping failure in Mac OS X Done with diff (version 2.8.1) -au orig new – is this correct?
Why, exactly, do you want libpciaccess on Mac OSX?
*** Bug 14631 has been marked as a duplicate of this bug. ***
It's not me who wants it, the X server seems to need it: checking for PCIACCESS... configure: error: Package requirements (pciaccess >= 0.8.0) were not met: No package 'pciaccess' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.
What are you configuring and what are your command line arguments?
I'm using the build.sh script which configures this way: ./configure --enable-maintainer-mode --prefix=/usr/X11R7.1 --libdir=/usr/X11R7.1/lib --enable-builddocs --enable-quartz --enable-xorg --with-xcb=yes --enable-xprint --enable-xgl --enable-xglx --enable-xegl --enable-xorgcfg
Yeah, that's why. Your configure options are trying to build the xorg ddx which isn't for OSX.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.