dubhater / D2VWitch

Cross-platform D2V creator
36 stars 6 forks source link

build problem on Ubuntu 20.04 #9

Closed Selur closed 2 years ago

Selur commented 2 years ago

Hi, I'm using:

### d2vwitch
if echo "$args" | grep -q -i -w -E 'all|d2vwitch'
then
  mkdir build
  cd build

  top="$PWD"
  export PATH="$top:$PATH"
  export PKG_CONFIG_PATH="$top/libs/lib/pkgconfig"

  git clone --depth 1 https://github.com/dubhater/D2VWitch
  git clone --depth 1 https://github.com/FFmpeg/FFmpeg
  git clone --depth 1 https://github.com/vapoursynth/vapoursynth

  build_nasm

  cd FFmpeg
  ./configure --prefix="$top/libs" \
    --enable-gpl \
    --enable-version3 \
    --disable-encoders \
    --disable-muxers \
    --disable-outdevs \
    --disable-programs \
    --disable-doc \
    --disable-debug \
    --disable-xlib \
    --disable-sdl2 \
    --extra-cflags="-ffunction-sections -fdata-sections"
  make $MAKEFLAGS
  make install

  cd ../D2VWitch
  export vapoursynth_CFLAGS="-I../vapoursynth/include" 
  export vapoursynth_LIBS=" " 
  autoreconf -if
  LDFLAGS="-Wl,--gc-sections" \

  ./configure
  make $MAKEFLAGS
  strip d2vwitch
  cp -f d2vwitch ../..
  cd ..

  cat <<EOL >../d2vwitch-sources.txt
https://github.com/dubhater/D2VWitch
$(git -C D2VWitch rev-parse HEAD)
https://github.com/FFmpeg/FFmpeg
$(git -C FFmpeg rev-parse HEAD)
https://github.com/vapoursynth/vapoursynth
$(git -C vapoursynth rev-parse HEAD)
EOL

  cd ..
  rm -rf build
fi

which did work a while ago, but fails. First error is:

src/Audio.cpp: In function ‘AVFormatContext* openWave64(const string&, const AVCodecContext*, std::string&)’:
src/Audio.cpp:57:46: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
   57 |     AVCodec *pcm_codec = avcodec_find_encoder(codec_id);

attached full build log: build.txt

Selur commented 2 years ago

Okay, I figured it. The problem is the FFmpeg version using: git clone --depth 1 https://github.com/FFmpeg/FFmpeg fails git clone --depth 1 --branch release/4.4 https://github.com/FFmpeg/FFmpeg works fine.