Opened 13 years ago

Closed 13 years ago

#99 closed defect (fixed)

Build failure on OpenBSD (wrt sem_timedwait)

Reported by: Edd Barrett Owned by: Michael Niedermayer
Priority: normal Component: build system
Version: unspecified Keywords: openbsd
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


On today's git I get the following build failure:

% V=1 gmake
gcc -L"/home/edd/source/ffmpeg"/libavcodec -L"/home/edd/source/ffmpeg"/libavdevice -L"/home/edd/source/ffmpeg"/libavfilter -L"/home/edd/source/ffmpeg"/libavformat -L"/home/edd/source/ffmpeg"/libavutil -L"/home/edd/source/ffmpeg"/libpostproc -L"/home/edd/source/ffmpeg"/libswscale -L/usr/local/lib -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libpostproc -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libswscale -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libavfilter -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libavdevice -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libavformat -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libavcodec -Wl,-rpath-link,"/home/edd/source/ffmpeg"/libavutil -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavfilter -lavformat -lavcodec -lswscale -lavutil -lossaudio -lossaudio -lsndio -ljack -lmp3lame -lm -pthread -lbz2 -lz
/home/edd/source/ffmpeg/libavformat/libavformat.a(avio.o)(.text+0x695): In function `url_alloc_for_protocol':
libavformat/avio.c:100: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/ warning: sprintf() is often misused, please use snprintf()
/usr/local/lib/ warning: strcat() is almost always misused, please use strlcat()
/home/edd/source/ffmpeg/libavdevice/libavdevice.a(jack_audio.o)(.text+0x8a2): In function `audio_read_packet':
libavdevice/jack_audio.c:277: undefined reference to `sem_timedwait'
collect2: ld returned 1 exit status
gmake: * [ffmpeg_g] Error 1

It seems OpenBSD does not implement sem_timedwait(). I am running OpenBSD-current.

Change History (3)

comment:1 by Carl Eugen Hoyos, 13 years ago

Component: FFmpegbuild system
Status: newopen

Since it seems unclear to me if OpenBSD doesn't define sem_timedwait() - as indicated here: - or if a library is missing at linking stage, could you add the output of

$ rm libavdevice/jack_audio.o
$ make V=1 libavdevice/jack_audio.o

And please confirm that you are testing latest git HEAD.

comment:2 by Edd Barrett, 13 years ago

ire% git remote -v
origin git:// (fetch)
origin git:// (push)
ire% git pull
Already up-to-date.

ire% rm libavdevice/jack_audio.o
ire% gmake V=1 libavdevice/jack_audio.o
gcc -I. -I"/home/edd/source/ffmpeg" -I/usr/local/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H -g -std=c99 -fomit-frame-pointer -fPIC -pthread -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -O3 -fno-math-errno -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -MMD -MF libavdevice/jack_audio.d -MT libavdevice/jack_audio.o -c -o libavdevice/jack_audio.o libavdevice/jack_audio.c
libavdevice/jack_audio.c: In function 'audio_read_packet':
libavdevice/jack_audio.c:277: warning: implicit declaration of function 'sem_timedwait'

comment:3 by Michael Niedermayer, 13 years ago

Reproduced by developer: set
Resolution: fixed
Status: openclosed

Fixed by disabling jack when sem_timedwait() is unavailable

Note: See TracTickets for help on using tickets.