[libbluray-devel] libbluray master failing to build on OSX - Info & Logs
Nathan Hjelm
hjelmn at mac.com
Mon Apr 7 05:22:46 CEST 2014
The attached patch should fix the issue.
-Nathan
On Apr 6, 2014, at 9:17 PM, Nathan Hjelm <hjelmn at mac.com> wrote:
>
> On Apr 6, 2014, at 5:39 PM, Grayson Manley <gray.manley at gmail.com> wrote:
>
>> Apologies if I'm making any mailing list faux pas.
>>
>> The master version of libbluray has been failing to compile on my machine: OS X 10.9.2-x86_64.
>> The current stable version successfully compiles.
>>
>> Here is what appears to be the relevant part of the make output:
>>
>> libtool: compile: clang -DHAVE_CONFIG_H -I. -I.. -std=c99 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT -I.. -Ifile -Ilibbluray -Ilibbluray/bdnav -I/usr/include/libxml2 -I/usr/local/Cellar/freetype/2.5.3_1/include/freetype2 -g -O2 -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wshadow -Werror=implicit-function-declaration -Wextra -Winline -O3 -fomit-frame-pointer -c libbluray/register.c -fno-common -DPIC -o libbluray/.libs/register.o
>> In file included from libbluray/bluray.c:65:
>> /usr/include/sys/ucred.h:91:2: error: unknown type name 'u_long'; did you mean 'long'?
>> u_long cr_ref; /* reference count */
>> ^
>> /usr/include/sys/ucred.h:133:9: error: unknown type name 'u_int'
>> u_int cr_version; /* structure layout version */
>> ^
>> In file included from libbluray/bluray.c:66:
>> In file included from /usr/include/sys/mount.h:76:
>> /usr/include/sys/attr.h:78:2: error: unknown type name 'u_short'; did you mean 'short'?
>> u_short bitmapcount; /* number of attr. bit sets in list (should be 5) */
>> ^
>> /usr/include/sys/attr.h:442:2: error: unknown type name 'u_long'; did you mean 'long'?
>> u_long maxmatches;
>> ^
>> /usr/include/sys/attr.h:455:2: error: unknown type name 'u_char'; did you mean 'char'?
>> u_char ss_fsstate[548]; // fs private
>> ^
>>
>>
>> I also attached a full log file if needed.
>>
>>
>> After adding '-D_DARWIN_C_SOURCE' to CFLAGS I was able to successfully compile master.
>>
>>
>> I have limited knowledge of the subject but, if it is at all helpful, here is some info I found.
>>
>> It appears that a relevant part of the makefile may may be 'src/Makefile.am:1' and '-D_POSIX_C_SOURCE=200112L'.
>>
>> Here are some resources I found by googling:
>>
>> https://developer.apple.com/library/mac/documentation/Darwin/Reference/Manpages/man5/compat.5.html
>> https://gitorious.org/xorg/x11proto-core/commit/22878c30d21580146200c00070478f88d969bcaa
>>
>> Let me know if any other info would be helpful.
>
> Looking at /usr/include/sys/types.h it looks like the correct fix is to add the -D_DARWIN_C_SOURCE to the Makefile.am on OSX. Let me see if I can put together a patch.
>
> -Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20140406/5c411676/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-darwin-define-_DARWIN_C_SOURCE-to-avoid-undefined-ty.patch
Type: application/octet-stream
Size: 995 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20140406/5c411676/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20140406/5c411676/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20140406/5c411676/attachment-0001.sig>
More information about the libbluray-devel
mailing list