Page 1 of 1

Crash on FreeBSD

Posted: Wed Mar 30, 2016 1:40 am
by CartoonKoala
Hi,
I compiled comskip on a FreeBSD 10.3RC3 VM. When I tried running it on a test video (mpg with some commercials) I got a crash saying "Bus error (core dumped)". gdb showed the error to be on line 9489 of comskip.c:

Code: Select all

own_histogram[0][hereBright]++;
As far as I can tell hereBright is 0 at this point.
I tried the same video under an ubuntu VM and comskip processed it fine. Is there a limitation with FreeBSD? I was hoping to put comski in a FreeNAS jail.

Thanks for your help.

Re: Crash on FreeBSD

Posted: Thu Oct 06, 2016 12:10 pm
by bollar
Did you resolve this problem.

I'm also curious to know how you got comskip to build on FreeBSD. When I build, I have a problem getting past argtable2.

Code: Select all

root@comskiptest:/Comskip # ./autogen.sh
Preparing the Comskip build system...please wait

Found GNU Autoconf version 2.69
Found GNU Automake version 1.15
Found GNU Libtool version 2.4.6

Automatically preparing build ... done

The Comskip build system is now prepared.  To build here, run:
  ./configure
  make
root@comskiptest:/Comskip #  ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking for fmax in -lm... yes
checking for sem_post in -lpthread... yes
checking build system type... amd64-unknown-freebsd10.3
checking host system type... amd64-unknown-freebsd10.3
checking whether host is win32... no
checking whether host is darwin... no
checking whether to enable donator features... yes
checking whether to build a statically linked binary... no
checking whether to build with debugging options enabled... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for argtable2... no
configure: error: Package requirements (argtable2 >= 2.12) were not met:

Package argtable2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `argtable2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'argtable2', required by 'world', not 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 argtable2_CFLAGS
and argtable2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
root@comskiptest:/Comskip # pkg-config --variable pc_path pkg-config
/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig
root@comskiptest:/Comskip # pkg-config --define-variable=pc_path=/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig:/argtable/argtable2-13 pkg-config
root@comskiptest:/Comskip # pkg-config --variable pc_path pkg-config
/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig
root@comskiptest:/Comskip # 

Re: Crash on FreeBSD

Posted: Thu Oct 06, 2016 12:29 pm
by erik
Could you check if own_histogram is initialized at the pint of crash?

Re: Crash on FreeBSD

Posted: Thu Oct 13, 2016 4:27 am
by buggystick
I've finally been able to get this to work inside my freebsd jail. I ran into both problems the posters above had

1) Can't find argtable2
This is due to a broken (pkg says it doesn't have a maintainer) argtable2 install on FreeBSD. It is missing argtable2.pc or pkg-config. Put the following in /usr/local/libdata/pkgconfig/argtable2.pc

Code: Select all

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: argtable2
Description: A library for parsing GNU style command line arguments
Version: 2.13

Libs: -L${libdir} -largtable2
Cflags: -I${includedir}
2) Bus Error when trying to run comskip.
I installed gcc and built with that instead of the standard clang compiler that FreeBSD uses.

Re: Crash on FreeBSD

Posted: Thu Oct 13, 2016 3:43 pm
by bollar
buggystick wrote:I've finally been able to get this to work inside my freebsd jail. I ran into both problems the posters above had

1) Can't find argtable2
This is due to a broken (pkg says it doesn't have a maintainer) argtable2 install on FreeBSD. It is missing argtable2.pc or pkg-config. Put the following in /usr/local/libdata/pkgconfig/argtable2.pc

Code: Select all

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: argtable2
Description: A library for parsing GNU style command line arguments
Version: 2.13

Libs: -L${libdir} -largtable2
Cflags: -I${includedir}
2) Bus Error when trying to run comskip.
I installed gcc and built with that instead of the standard clang compiler that FreeBSD uses.
Thank you!

Re: Crash on FreeBSD

Posted: Tue Oct 18, 2016 6:43 pm
by bollar
Thanks to your help @buggystick, I have written instructions for compiling Comskip on FreeNAS:

https://forums.freenas.org/index.php?th ... ost-321427