Compile stops while compiling libbluray

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
tps800
Posts: 12
Joined: Sat Dec 02, 2017 2:48 am

Compile stops while compiling libbluray

Post by tps800 »

Description of problem or question

Trying to compile HandBrake on FreeBSD 11.1. Compile stops while compiling libbluray:

Code: Select all

  CC       src/util/libbluray_la-mutex.lo
  CC       src/util/libbluray_la-refcnt.lo
  CC       src/util/libbluray_la-strutl.lo
  CC       src/util/libbluray_la-time.lo
src/util/time.c: In function '_bd_get_scr_impl':
src/util/time.c:58:5: error: implicit declaration of function 'gettimeofday' [-Werror=implicit-function-declaration]
     gettimeofday(&tv, 0);
     ^~~~~~~~~~~~
cc1: some warnings being treated as errors
gmake[2]: *** [Makefile:1808: src/util/libbluray_la-time.lo] Error 1
gmake[2]: Leaving directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'
gmake[1]: *** [Makefile:932: all] Error 2
gmake[1]: Leaving directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'
gmake: *** [../contrib/libbluray/module.rules:3: contrib/libbluray/.stamp.libbluray.build] Error 2

Steps to reproduce the problem (If Applicable)

Code: Select all

# git clone ...
# cd HandBrake
# ./configure
# cd build
# gmake
HandBrake version (e.g., 1.0.0)

trunk

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.3 High Sierra, Windows 10 Creators Update)

FreeBSD ebony 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

Error message text or screenshot (If Applicable)

Code: Select all

  CC       src/util/libbluray_la-time.lo
src/util/time.c: In function '_bd_get_scr_impl':
src/util/time.c:58:5: error: implicit declaration of function 'gettimeofday' [-Werror=implicit-function-declaration]
     gettimeofday(&tv, 0);
Since treating warnings as errors is set, compilation stops at implicit function declaration. Now I am not sure if this is an upstream problem to be reported to the maintainers of libbluray or one to be solved by HandBrake developers.

Switching -Werror=implicit-function-declaration to -Wimplicit-function-declaration does not realy help:

Code: Select all

  CCLD     libbluray.la          
gmake[2]: Leaving directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'                     
gmake[1]: Leaving directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'                     
touch contrib/libbluray/.stamp.libbluray.build                    
gmake -j 1 -C ./contrib/libbluray/libbluray-1.0.1/ install        
gmake[1]: Entering directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'                    
gmake[2]: Entering directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'                    
 build-aux/install-sh -c -d '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib'                                           
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libbluray.la '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib'
libtool: install: /usr/bin/install -c .libs/libbluray.lai /usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib/libbluray.la  
libtool: install: /usr/bin/install -c .libs/libbluray.a /usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib/libbluray.a     
libtool: install: chmod 644 /usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib/libbluray.a                                 
libtool: install: ranlib /usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib/libbluray.a                                    
 build-aux/install-sh -c -d '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib/pkgconfig'                                 
 /usr/bin/install -c -m 644 src/libbluray.pc '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/lib/pkgconfig'                
 build-aux/install-sh -c -d '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/include/libbluray'                             
 /usr/bin/install -c -m 644 src/file/filesystem.h src/libbluray/bluray.h src/libbluray/bluray-version.h src/libbluray/keys.h src/libbluray/player_settings.h src/libbluray/bdnav/clpi_data.h src/libbluray/bdnav/meta_data.h src/libbluray/decoders/overlay.h src/util/log_control.h '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/include/libbluray'
gmake[2]: Leaving directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'                     
gmake[1]: Leaving directory '/usr/portp/multimedia/handbreak/HandBrake/build/contrib/libbluray/libbluray-1.0.1'                     
touch contrib/libbluray/.stamp.libbluray.install                  
/usr/local/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/reader.c -o libhb/reader.o
/usr/local/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/lang.c -o libhb/lang.o
/usr/local/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/avfilter.c -o libhb/avfilter.o
/usr/local/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/unsharp.c -o libhb/unsharp.o
/usr/local/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/detelecine.c -o libhb/detelecine.o
/usr/local/bin/gcc -std=gnu99 -pipe -fmessage-length=0 -Wall -g0 -O3 -mfpmath=sse -msse2 -DUSE_LIBAV_AAC -D__LIBHB__ -DUSE_PTHREAD -DUSE_X265 -DHAS_STRERROR_R -DARCH_X86_64 -I./libhb/ -I./contrib/include -I/usr/include/libxml2 -c ../libhb/work.c -o libhb/work.o
../libhb/work.c: In function 'hb_work_init':                      
../libhb/work.c:56:53: error: 'HB_LOW_PRIORITY' undeclared (first use in this function)                                             
     return hb_thread_init( "work", work_func, work, HB_LOW_PRIORITY );                                                             
                                                     ^~~~~~~~~~~~~~~
../libhb/work.c:56:53: note: each undeclared identifier is reported only once for each function it appears in                       
../libhb/work.c: In function 'do_job':                            
../libhb/work.c:1717:62: error: 'HB_LOW_PRIORITY' undeclared (first use in this function)                                           
         w->thread = hb_thread_init(w->name, hb_work_loop, w, HB_LOW_PRIORITY);                                                     
                                                              ^~~~~~~~~~~~~~~
../libhb/work.c: In function 'hb_work_init':                      
../libhb/work.c:57:1: warning: control reaches end of non-void function [-Wreturn-type]                                             
 }
 ^
gmake: *** [../libhb/module.rules:12: libhb/work.o] Error 1       
compilation stops in this case a little bit later on with undeclared variables.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Compile stops while compiling libbluray

Post by BradleyS »

It looks like FreshPorts libbluray is out of date or unmaintained, stuck on 0.9.3.

Most likely, once this is fixed another issue will pop up in a different library. So what we really need is someone knowledgeable to troubleshoot and submit quality patches. I’m not opposed to adding fixes/patches for FreeBSD, but I also don’t have enough free time to play whack-a-mole with this, sorry.
tps800
Posts: 12
Joined: Sat Dec 02, 2017 2:48 am

Re: Compile stops while compiling libbluray

Post by tps800 »

> It looks like FreshPorts libbluray is out of date or unmaintained, stuck on 0.9.3.

That is right. But handbrake downloads libbluray-1.0.1 and tries to compile this version, regardles what is installed within the system. Checking out `http://git.videolan.org/git/libbluray.git` (version 1.0.2). AND disabling `-Werror=implicit-function-declaration` makes it compile and install.

-> You've got a bug within your build. The handbrake build sets `-Werror=implicit-function-declaration` (instead leaving the default `-Wimplicit-function-declaration` and fails compiling – regardles of platform.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Compile stops while compiling libbluray

Post by BradleyS »

Okay, so the solution is to update to libbluray-1.0.2 and use -Wimplicit-function-declaration?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Compile stops while compiling libbluray

Post by BradleyS »

What version of gmake?

HB_LOW_PRIORITY is defined here: https://github.com/HandBrake/HandBrake/ ... rts.h#L121

ports.h is included by common.h is included by hb.h is included by work.c.
tps800
Posts: 12
Joined: Sat Dec 02, 2017 2:48 am

Re: Compile stops while compiling libbluray

Post by tps800 »

BradleyS wrote: Wed Dec 06, 2017 7:28 pm Okay, so the solution is to update to libbluray-1.0.2 and use -Wimplicit-function-declaration?
Yes.
tps800
Posts: 12
Joined: Sat Dec 02, 2017 2:48 am

Re: Compile stops while compiling libbluray

Post by tps800 »

BradleyS wrote: Wed Dec 06, 2017 10:06 pm What version of gmake?

HB_LOW_PRIORITY is defined here: https://github.com/HandBrake/HandBrake/ ... rts.h#L121

ports.h is included by common.h is included by hb.h is included by work.c.

Code: Select all

#if defined( SYS_BEOS )
#  define HB_LOW_PRIORITY    5
#  define HB_NORMAL_PRIORITY 10
#elif defined( SYS_DARWIN )
#  define HB_LOW_PRIORITY    0
#  define HB_NORMAL_PRIORITY 31
#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS ) || defined ( __FreeBSD_kernel__ )
#  define HB_LOW_PRIORITY    0
#  define HB_NORMAL_PRIORITY 0
#elif defined( SYS_CYGWIN )
#  define HB_LOW_PRIORITY    0
#  define HB_NORMAL_PRIORITY 1
#elif defined( SYS_MINGW )
#  define HB_LOW_PRIORITY    0
#  define HB_NORMAL_PRIORITY 0
#endif
The problem is: none of 'SYS_*' is defined at runtime. HB_LOW_PRIORITY and HB_NORMAL_PRIORITY are not defined then.

gcc is:

Code: Select all

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc6/gcc/x86_64-portbld-freebsd11.0/6.4.0/lto-wrapper
Target: x86_64-portbld-freebsd11.0
Configured with: /wrkdirs/usr/ports/lang/gcc6/work/gcc-6.4.0/configure --with-build-config=bootstrap-debug --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc6 --libexecdir=/usr/local/libexec/gcc6 --program-suffix=6 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc6/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --with-ecj-jar=/usr/local/share/java/ecj-4.5.jar --enable-languages=c,c++,objc,fortran,java --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/info/gcc6 --build=x86_64-portbld-freebsd11.0
Thread model: posix
gcc version 6.4.0 (FreeBSD Ports Collection) 
gmake is:

Code: Select all

GNU Make 4.2.1
Built for amd64-portbld-freebsd11.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
tps800
Posts: 12
Joined: Sat Dec 02, 2017 2:48 am

Re: Compile stops while compiling libbluray

Post by tps800 »

List of defined Macros at runtime:

Code: Select all

#define __amd64 1
#define __amd64__ 1
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_CONSUME 1
#define __ATOMIC_HLE_ACQUIRE 65536
#define __ATOMIC_HLE_RELEASE 131072
#define __ATOMIC_RELAXED 0
#define __ATOMIC_RELEASE 3
#define __ATOMIC_SEQ_CST 5
#define __BIGGEST_ALIGNMENT__ 16
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __CHAR_BIT__ 8
#define __CHAR16_TYPE__ short unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __code_model_small__ 1
#define __DBL_DECIMAL_DIG__ 17
#define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L)
#define __DBL_DIG__ 15
#define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L)
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_MAX__ ((double)1.79769313486231570815e+308L)
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX_EXP__ 1024
#define __DBL_MIN__ ((double)2.22507385850720138309e-308L)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MIN_EXP__ (-1021)
#define __DEC_EVAL_METHOD__ 2
#define __DEC128_EPSILON__ 1E-33DL
#define __DEC128_MANT_DIG__ 34
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC128_MAX_EXP__ 6145
#define __DEC128_MIN__ 1E-6143DL
#define __DEC128_MIN_EXP__ (-6142)
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __DEC32_EPSILON__ 1E-6DF
#define __DEC32_MANT_DIG__ 7
#define __DEC32_MAX__ 9.999999E96DF
#define __DEC32_MAX_EXP__ 97
#define __DEC32_MIN__ 1E-95DF
#define __DEC32_MIN_EXP__ (-94)
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC64_MANT_DIG__ 16
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_MAX_EXP__ 385
#define __DEC64_MIN__ 1E-383DD
#define __DEC64_MIN_EXP__ (-382)
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DECIMAL_DIG__ 21
#define __ELF__ 1
#define __FINITE_MATH_ONLY__ 0
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT_DECIMAL_DIG__ 9
#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F
#define __FLT_DIG__ 6
#define __FLT_EPSILON__ 1.19209289550781250000e-7F
#define __FLT_EVAL_METHOD__ 0
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MANT_DIG__ 24
#define __FLT_MAX__ 3.40282346638528859812e+38F
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX_EXP__ 128
#define __FLT_MIN__ 1.17549435082228750797e-38F
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __FLT_RADIX__ 2
#define __FreeBSD__ 11
#define __FXSR__ 1
#define __GCC_ASM_FLAG_OUTPUTS__ 1
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_IEC_559 2
#define __GCC_IEC_559_COMPLEX 2
#define __GNUC__ 6
#define __GNUC_MINOR__ 4
#define __GNUC_PATCHLEVEL__ 0
#define __GNUC_STDC_INLINE__ 1
#define __GXX_ABI_VERSION 1010
#define __has_include_next(STR) __has_include_next__(STR)
#define __has_include(STR) __has_include__(STR)
#define __INT_FAST16_MAX__ 0x7fffffff
#define __INT_FAST16_TYPE__ int
#define __INT_FAST32_MAX__ 0x7fffffff
#define __INT_FAST32_TYPE__ int
#define __INT_FAST64_MAX__ 0x7fffffffffffffffL
#define __INT_FAST64_TYPE__ long int
#define __INT_FAST8_MAX__ 0x7fffffff
#define __INT_FAST8_TYPE__ int
#define __INT_LEAST16_MAX__ 0x7fff
#define __INT_LEAST16_TYPE__ short int
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __INT_LEAST32_TYPE__ int
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL
#define __INT_LEAST64_TYPE__ long int
#define __INT_LEAST8_MAX__ 0x7f
#define __INT_LEAST8_TYPE__ signed char
#define __INT_MAX__ 0x7fffffff
#define __INT16_C(c) c
#define __INT16_MAX__ 0x7fff
#define __INT16_TYPE__ short int
#define __INT32_C(c) c
#define __INT32_MAX__ 0x7fffffff
#define __INT32_TYPE__ int
#define __INT64_C(c) c ## L
#define __INT64_MAX__ 0x7fffffffffffffffL
#define __INT64_TYPE__ long int
#define __INT8_C(c) c
#define __INT8_MAX__ 0x7f
#define __INT8_TYPE__ signed char
#define __INTMAX_C(c) c ## L
#define __INTMAX_MAX__ 0x7fffffffffffffffL
#define __INTMAX_TYPE__ long int
#define __INTPTR_MAX__ 0x7fffffffffffffffL
#define __INTPTR_TYPE__ long int
#define __k8 1
#define __k8__ 1
#define __KPRINTF_ATTRIBUTE__ 1
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __LDBL_DIG__ 18
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 64
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __LDBL_MAX_10_EXP__ 4932
#define __LDBL_MAX_EXP__ 16384
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __LDBL_MIN_10_EXP__ (-4931)
#define __LDBL_MIN_EXP__ (-16381)
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __LONG_MAX__ 0x7fffffffffffffffL
#define __LP64__ 1
#define __MMX__ 1
#define __NO_INLINE__ 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __PTRDIFF_MAX__ 0x7fffffffffffffffL
#define __PTRDIFF_TYPE__ long int
#define __REGISTER_PREFIX__ 
#define __SCHAR_MAX__ 0x7f
#define __SEG_FS 1
#define __SEG_GS 1
#define __SHRT_MAX__ 0x7fff
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __SIG_ATOMIC_TYPE__ int
#define __SIZE_MAX__ 0xffffffffffffffffUL
#define __SIZE_TYPE__ long unsigned int
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_FLOAT128__ 16
#define __SIZEOF_FLOAT80__ 16
#define __SIZEOF_INT__ 4
#define __SIZEOF_INT128__ 16
#define __SIZEOF_LONG__ 8
#define __SIZEOF_LONG_DOUBLE__ 16
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_POINTER__ 8
#define __SIZEOF_PTRDIFF_T__ 8
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_SIZE_T__ 8
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SSE__ 1
#define __SSE_MATH__ 1
#define __SSE2__ 1
#define __SSE2_MATH__ 1
#define __STDC__ 1
#define __STDC_HOSTED__ 1
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1
#define __STDC_VERSION__ 201112L
#define __UINT_FAST16_MAX__ 0xffffffffU
#define __UINT_FAST16_TYPE__ unsigned int
#define __UINT_FAST32_MAX__ 0xffffffffU
#define __UINT_FAST32_TYPE__ unsigned int
#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL
#define __UINT_FAST64_TYPE__ long unsigned int
#define __UINT_FAST8_MAX__ 0xffffffffU
#define __UINT_FAST8_TYPE__ unsigned int
#define __UINT_LEAST16_MAX__ 0xffff
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __UINT_LEAST32_TYPE__ unsigned int
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL
#define __UINT_LEAST64_TYPE__ long unsigned int
#define __UINT_LEAST8_MAX__ 0xff
#define __UINT_LEAST8_TYPE__ unsigned char
#define __UINT16_C(c) c
#define __UINT16_MAX__ 0xffff
#define __UINT16_TYPE__ short unsigned int
#define __UINT32_C(c) c ## U
#define __UINT32_MAX__ 0xffffffffU
#define __UINT32_TYPE__ unsigned int
#define __UINT64_C(c) c ## UL
#define __UINT64_MAX__ 0xffffffffffffffffUL
#define __UINT64_TYPE__ long unsigned int
#define __UINT8_C(c) c
#define __UINT8_MAX__ 0xff
#define __UINT8_TYPE__ unsigned char
#define __UINTMAX_C(c) c ## UL
#define __UINTMAX_MAX__ 0xffffffffffffffffUL
#define __UINTMAX_TYPE__ long unsigned int
#define __UINTPTR_MAX__ 0xffffffffffffffffUL
#define __UINTPTR_TYPE__ long unsigned int
#define __unix 1
#define __unix__ 1
#define __USER_LABEL_PREFIX__ 
#define __VERSION__ "6.4.0"
#define __WCHAR_MAX__ 0x7fffffff
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __WCHAR_TYPE__ int
#define __WINT_MAX__ 0x7fffffff
#define __WINT_MIN__ (-__WINT_MAX__ - 1)
#define __WINT_TYPE__ int
#define __x86_64 1
#define __x86_64__ 1
#define _LP64 1
#define unix 1
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Compile stops while compiling libbluray

Post by BradleyS »

Fixed in https://github.com/HandBrake/HandBrake/ ... 9d84240126 and https://github.com/HandBrake/HandBrake/ ... 9f434a2d4b.

I will add FreeBSD dependencies notes to the documentation. This is what I used:

Code: Select all

pkg install autoconf automake bash bzip2 cmake flac fontconfig freetype2 fribidi git gcc gm4 gmake gpatch gtar harfbuzz jansson libass libiconv libogg libsamplerate libtheora libtool libvorbis libx264 libxml2 opus pkgconf python yasm

portsnap fetch
bash -c 'if [[ ! -e /usr/ports ]]; then portsnap extract; fi'
portsnap update
LASTDIR="`pwd`"
cd /usr/ports/audio/lame
make install
cd "LASTDIR"

git clone https://github.com/HandBrake/HandBrake.git
cd HandBrake
./configure --launch-jobs`sysctl -n hw.ncpu` --launch
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Compile stops while compiling libbluray

Post by BradleyS »

FreeBSD build documentation is now available at: https://handbrake.fr/docs/en/latest/dev ... d-bsd.html
tps800
Posts: 12
Joined: Sat Dec 02, 2017 2:48 am

Re: Compile stops while compiling libbluray

Post by tps800 »

BradleyS wrote: Thu Dec 07, 2017 1:38 pm

Code: Select all

pkg install autoconf automake bash bzip2 cmake flac fontconfig freetype2 fribidi git gcc gm4 gmake gpatch gtar harfbuzz jansson libass libiconv libogg libsamplerate libtheora libtool libvorbis libx264 libxml2 opus pkgconf python yasm
Fails on gm4 and gpatch. Both are not available as packages.
m4 and patch are available.

BradleyS wrote: Thu Dec 07, 2017 1:38 pm

Code: Select all

portsnap fetch
bash -c 'if [[ ! -e /usr/ports ]]; then portsnap extract; fi'
portsnap update
LASTDIR="`pwd`"
cd /usr/ports/audio/lame
make install
cd "LASTDIR"

git clone https://github.com/HandBrake/HandBrake.git
cd HandBrake
./configure --launch-jobs`sysctl -n hw.ncpu` --launch
Compiles without errors. Some warnings. But OK.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Compile stops while compiling libbluray

Post by BradleyS »

Ah, yes. m4 and patch, I must have wrote down what I installed incorrectly. Thanks for the correction. Hopefully this helps you. ;)
Post Reply