smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

ffmpeg and troublesome link errors #212

Closed smanders closed 6 years ago

smanders commented 6 years ago

this issue may continue to pop up as long as we're building ffmpeg via configure/make instead of cmake/make...

very similiar to "ffmpeg and the troublesome lzma" https://github.com/smanders/externpro/issues/163 and all the other link errors noted and fixed when adding ffmpeg https://github.com/smanders/externpro/issues/17#issuecomment-353403156

From: Steven Woolsey Sent: Tuesday, August 21, 2018 1:59 PM To: Scott M Anderson Subject: Here is the error I have been getting

/usr/bin/x86_64-linux-gnu-ld: /home/swoolsey/src/externpro/_bld/externpro_18.08.3-gcc640-64/lib/libavdevice_2.6.2.a(xv.o): undefined reference to symbol 'XShmDetach' //usr/lib/x86_64-linux-gnu/libXext.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Server/DataSources/VideoCaptureIfc/CMakeFiles/VideoCaptureIfc.dir/build.make:232: recipe for target 'Server/DataSources/VideoCaptureIfc/VideoCaptureIfc' failed make[2]: [Server/DataSources/VideoCaptureIfc/VideoCaptureIfc] Error 1 CMakeFiles/Makefile2:9147: recipe for target 'Server/DataSources/VideoCaptureIfc/CMakeFiles/VideoCaptureIfc.dir/all' failed make[1]: [Server/DataSources/VideoCaptureIfc/CMakeFiles/VideoCaptureIfc.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 87%] Built target CdlIfc Makefile:162: recipe for target 'all' failed make: [all] Error 2

after fixing this link error (by adding libXext to the ffmpeg use script), other link errors were also encountered (SDL https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer, xv https://en.wikipedia.org/wiki/Xv_(software) - IIRC) but the developer was okay to just remove those development libraries so ffmpeg configure wouldn't detect and build against them...

smanders commented 6 years ago

when I run $ ./configure --help one of the sections is "External library support":

External library support:
  --enable-avisynth        enable reading of AviSynth script files [no]
  --disable-bzlib          disable bzlib [autodetect]
  --enable-fontconfig      enable fontconfig, useful for drawtext filter [no]
  --enable-frei0r          enable frei0r video filtering [no]
  --enable-gnutls          enable gnutls, needed for https support
                           if openssl is not used [no]
  --disable-iconv          disable iconv [autodetect]
  --enable-ladspa          enable LADSPA audio filtering [no]
  --enable-libaacplus      enable AAC+ encoding via libaacplus [no]
  --enable-libass          enable libass subtitles rendering,
                           needed for subtitles and ass filter [no]
  --enable-libbluray       enable BluRay reading using libbluray [no]
  --enable-libbs2b         enable bs2b DSP library [no]
  --enable-libcaca         enable textual display using libcaca [no]
  --enable-libcelt         enable CELT decoding via libcelt [no]
  --enable-libcdio         enable audio CD grabbing with libcdio [no]
  --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
                           and libraw1394 [no]
  --enable-libfaac         enable AAC encoding via libfaac [no]
  --enable-libfdk-aac      enable AAC de/encoding via libfdk-aac [no]
  --enable-libflite        enable flite (voice synthesis) support via libflite [no]
  --enable-libfreetype     enable libfreetype, needed for drawtext filter [no]
  --enable-libfribidi      enable libfribidi, improves drawtext filter [no]
  --enable-libgme          enable Game Music Emu via libgme [no]
  --enable-libgsm          enable GSM de/encoding via libgsm [no]
  --enable-libiec61883     enable iec61883 via libiec61883 [no]
  --enable-libilbc         enable iLBC de/encoding via libilbc [no]
  --enable-libmfx          enable HW acceleration through libmfx
  --enable-libmodplug      enable ModPlug via libmodplug [no]
  --enable-libmp3lame      enable MP3 encoding via libmp3lame [no]
  --enable-libnut          enable NUT (de)muxing via libnut,
                           native (de)muxer exists [no]
  --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
  --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
  --enable-libopencv       enable video filtering via libopencv [no]
  --enable-libopenh264     enable H.264 encoding via OpenH264 [no]
  --enable-libopenjpeg     enable JPEG 2000 de/encoding via OpenJPEG [no]
  --enable-libopus         enable Opus de/encoding via libopus [no]
  --enable-libpulse        enable Pulseaudio input via libpulse [no]
  --enable-libquvi         enable quvi input via libquvi [no]
  --enable-librtmp         enable RTMP[E] support via librtmp [no]
  --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
  --enable-libshine        enable fixed-point MP3 encoding via libshine [no]
  --enable-libsmbclient    enable Samba protocol via libsmbclient [no]
  --enable-libsoxr         enable Include libsoxr resampling [no]
  --enable-libspeex        enable Speex de/encoding via libspeex [no]
  --enable-libssh          enable SFTP protocol via libssh [no]
  --enable-libstagefright-h264  enable H.264 decoding via libstagefright [no]
  --enable-libtheora       enable Theora encoding via libtheora [no]
  --enable-libtwolame      enable MP2 encoding via libtwolame [no]
  --enable-libutvideo      enable Ut Video encoding and decoding via libutvideo [no]
  --enable-libv4l2         enable libv4l2/v4l-utils [no]
  --enable-libvidstab      enable video stabilization using vid.stab [no]
  --enable-libvo-aacenc    enable AAC encoding via libvo-aacenc [no]
  --enable-libvo-amrwbenc  enable AMR-WB encoding via libvo-amrwbenc [no]
  --enable-libvorbis       enable Vorbis en/decoding via libvorbis,
                           native implementation exists [no]
  --enable-libvpx          enable VP8 and VP9 de/encoding via libvpx [no]
  --enable-libwavpack      enable wavpack encoding via libwavpack [no]
  --enable-libwebp         enable WebP encoding via libwebp [no]
  --enable-libx264         enable H.264 encoding via x264 [no]
  --enable-libx265         enable HEVC encoding via x265 [no]
  --enable-libxavs         enable AVS encoding via xavs [no]
  --enable-libxcb          enable X11 grabbing using XCB [autodetect]
  --enable-libxcb-shm      enable X11 grabbing shm communication [autodetect]
  --enable-libxcb-xfixes   enable X11 grabbing mouse rendering [autodetect]
  --enable-libxcb-shape    enable X11 grabbing shape rendering [autodetect]
  --enable-libxvid         enable Xvid encoding via xvidcore,
                           native MPEG-4/Xvid encoder exists [no]
  --enable-libzmq          enable message passing via libzmq [no]
  --enable-libzvbi         enable teletext support via libzvbi [no]
  --disable-lzma           disable lzma [autodetect]
  --enable-decklink        enable Blackmagick DeckLink I/O support [no]
  --enable-nvenc           enable NVIDIA NVENC support [no]
  --enable-openal          enable OpenAL 1.1 capture support [no]
  --enable-opencl          enable OpenCL code
  --enable-opengl          enable OpenGL rendering [no]
  --enable-openssl         enable openssl, needed for https support
                           if gnutls is not used [no]
  --disable-sdl            disable sdl [autodetect]
  --enable-x11grab         enable X11 grabbing (legacy) [no]
  --disable-xlib           disable xlib [autodetect]
  --disable-zlib           disable zlib [autodetect]

I'm realizing I should disable all the [autodetect] libraries...

  --disable-bzlib          disable bzlib [autodetect]
  --disable-iconv          disable iconv [autodetect]
  --enable-libxcb          enable X11 grabbing using XCB [autodetect]
  --enable-libxcb-shm      enable X11 grabbing shm communication [autodetect]
  --enable-libxcb-xfixes   enable X11 grabbing mouse rendering [autodetect]
  --enable-libxcb-shape    enable X11 grabbing shape rendering [autodetect]
  --disable-lzma           disable lzma [autodetect]
  --disable-sdl            disable sdl [autodetect]
  --disable-xlib           disable xlib [autodetect]
  --disable-zlib           disable zlib [autodetect]

And for now I won't do anything with the libraries that don't specify [no] or [autodetect]

  --enable-libmfx          enable HW acceleration through libmfx
  --enable-opencl          enable OpenCL code
smanders commented 6 years ago

completed with commits to dev branch referenced above