Motion - Bug Report 2006x 07x 08x 071646

BUG: configure fails testing -pthread on FreeBSD

The linuxthreads package is not usually installed on FreeBSD.
There is no reason why it should be. FreeBSD-6.1 has two native implementations of POSIX
threads installed by default. Nobody in their right mind should be expected to install a third
one.

The current configure seems to test only for linuxthreads which definitely is not the way to
test for POSIX threads anywhere else but Linux. Even for linux that is far less generic than
it needs to be.

Use $CC -pthread for FreeBSD.

(mjolnir) 10:20 lavrsen/motion-3.2.6> ./configure
checking for Darwin... no
checking for *BSD... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for linuxthreads... no

You do not have linuxthread installed

checking for libjpeg-mmx... skipping
checking for jpeg_set_defaults in -ljpeg... yes
checking for ffmpeg autodetecting... not found

**********************************************
* libavcodec.a or libavcodec.so or           *
* libavformat.a or libavformat.so not found: *
*    ALL FFMPEG FEATURES DISABLED            *
*                                            *
* Please read the Motion Guide for help:     *
* http://motion.sourceforge.net              *
**********************************************

checking for MySQL... no
Invalid MySQL directory - unable to find libmysqlclient.a or libmysqlclient.so.
checking for PostgreSQL... yes
checking for PQcmdTuples in -lpq... yes
checking for PQoidValue in -lpq... yes
checking for PQclientEncoding in -lpq... yes
checking for pg_encoding_to_char in -lpq... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking linux/videodev.h usability... no
checking linux/videodev.h presence... no
checking for linux/videodev.h... no
checking for short int... yes
checking size of short int... 2
checking for int... yes
checking size of int... 4
checking for an ANSI C-conforming const... yes
checking for bswap instruction... yes
configure: creating ./config.status
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.init-RH
config.status: creating motion.spec
config.status: creating Makefile

   ************************
   *   Configure status   *
   ************************

OS             :     *BSD
pthread Support:     No
**********************************************
** Fatal Error YOU MUST HAVE pthread Support *
**********************************************
jpeg Support:        Yes
BKTR included:       Yes
FFmpeg Support:      No
MYSQL Support:       No
PostgreSQL Support:  Yes

CFLAGS:  -D__freebsd__ -I/usr/local/include -g -O2 -DHAVE_PGSQL -I/usr/local/include -DTYPE_32BIT="int" -DHAVE_BSWAP   
LIBS: -lm -L/usr/local/lib -ljpeg -L/usr/local/lib -lpq
LDFLAGS:  -L/usr/local/lib 

Install prefix:       /usr/local


Environment

Motion version: 3.2.6
ffmpeg version:  
Shared libraries: postgresql
Server OS: FreeBSD 6.1-STABLE

-- JukkaUkkonen - 08 Jul 2006

Follow up

motion search the "standard" location of linuxthreads in freebsd AFIAK is always the same, maybe i'm wrong but nobody complained about it. Moreover if linuxthread libs / headers are installed outside the common path the compile won't find them ... so what will be a nice solution then ?

-- AngelCarpintero - 09 Jul 2006


Argh... Maybe I was not expressing myself properly. What I tried to say is that FreeBSD thread library is not necessarily the linuxthreads library.

At least all FreeBSD 6.x versions have a couple of different perfectly OK thread libraries which have nothing to do with linuxthreads. There is no sane reason though why Motion should not work just fine with native threads on FreeBSD. (I guess this should apply to FreeBSD 5.x as well, but I cannot really tell for sure, because I upgraded directly from 4.11 to 6.1.

-- JukkaUkkonen - 21 Aug 2006

Jukka , I made the port to FreeBSD making as simple as possible , so i used pthread ... i know that is a bit annoying to install linuxthread but at the moment i have no time to make a better port.

-- AngelCarpintero - 27 Aug 2006


I've tested motion-3.2.7 svn 111 with native pthread on FreeBSD and seems pretty stable so i gonna change it in configure.in to use by default native pthread and allow use linuxthreads as a option. That will allow people to use native pthread on FreeBSD > 5.4 or linuxthreads for olders versions. I'll post the information about the svn version that contains that fix.

-- AngelCarpintero - 08 Oct 2006

Fix record

Fixed in svn 112.

-- AngelCarpintero - 08 Oct 2006

In 3.2.7

-- KennethLavrsen - 20 Oct 2006
Topic revision: r8 - 20 Oct 2006, KennethLavrsen
Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.