Opened 6 years ago

Closed 6 years ago

#99 closed defect (fixed)

Build failure on OpenBSD (wrt sem_timedwait)

Reported by: vext01 Owned by: michael
Priority: normal Component: build system
Version: unspecified Keywords: openbsd
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

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/libjack.so.0.0: warning: sprintf() is often misused, please use snprintf()
/usr/local/lib/libjack.so.0.0: 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 Changed 6 years ago by cehoyos

  • Component changed from FFmpeg to build system
  • Status changed from new to open

Since it seems unclear to me if OpenBSD doesn't define sem_timedwait() - as indicated here: http://www.gnu.org/software/gnulib/manual/html_node/sem_005ftimedwait.html - 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 Changed 6 years ago by vext01

ire% git remote -v
origin git://git.videolan.org/ffmpeg.git (fetch)
origin git://git.videolan.org/ffmpeg.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 Changed 6 years ago by michael

  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from open to closed

Fixed by disabling jack when sem_timedwait() is unavailable

Note: See TracTickets for help on using tickets.