Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure with ffmpeg 5.0 #306

Closed
scpeters opened this issue Feb 3, 2022 · 1 comment · Fixed by #325
Closed

Compilation failure with ffmpeg 5.0 #306

scpeters opened this issue Feb 3, 2022 · 1 comment · Fixed by #325
Assignees
Labels
bug Something isn't working

Comments

@scpeters
Copy link
Member

scpeters commented Feb 3, 2022

Environment

  • OS Version: macOS 10.15
  • Source or binary build? source build all major versions 1-5

Description

ffmpeg 5.0 has just been merged in Homebrew/homebrew-core#94423

  • Expected behavior: ignition-common compiles with ffmpeg
  • Actual behavior: it fails to compile

Steps to reproduce

  1. brew install ignition-common5
  2. observer build failure

Output

cd /tmp/ignition-common5-20220203-58814-14kxgm5/events/src && /usr/local/Cellar/cmake/3.22.2/bin/cmake -E cmake_link_script CMakeFiles/ignition-common5-events.dir/link.txt --verbose=1
/tmp/ignition-common5-20220203-58814-14kxgm5/av/src/VideoEncoder.cc:132:10: error: cannot initialize return object of type 'AVCodec *' with an rvalue of type 'const AVCodec *'
  return avcodec_find_encoder(_codecId);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++  -stdlib=libc++ -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -dynamiclib -Wl,-headerpad_max_install_names  -Wl,-undefined -Wl,dynamic_lookup -compatibility_version 5.0.0 -current_version 5.0.0 -o "../../lib/libignition-common5-events.5.0.0~pre1.dylib" -install_name @rpath/libignition-common5-events.5.dylib CMakeFiles/ignition-common5-events.dir/Event.cc.o CMakeFiles/ignition-common5-events.dir/KeyEvent.cc.o CMakeFiles/ignition-common5-events.dir/MouseEvent.cc.o  -Wl,-rpath,/tmp/ignition-common5-20220203-58814-14kxgm5/lib "../../lib/libignition-common5.5.0.0~pre1.dylib" "/usr/local/lib/libignition-math7.7.0.0~pre1.dylib" /usr/local/lib/libignition-utils1.1.2.0.dylib -lpthread 
/tmp/ignition-common5-20220203-58814-14kxgm5/av/src/VideoEncoder.cc:370:21: error: cannot initialize a variable of type 'AVOutputFormat *' with an rvalue of type 'const AVOutputFormat *'
    AVOutputFormat *outputFormat = av_guess_format(nullptr,
                    ^              ~~~~~~~~~~~~~~~~~~~~~~~~
[ 66%] Building CXX object graphics/src/CMakeFiles/ignition-common5-graphics.dir/Image.cc.o
cd /tmp/ignition-common5-20220203-58814-14kxgm5/graphics/src && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DMAC_OS_X_VERSION=1080 -DTINYXML2_MAJOR_VERSION_GE_6 -Dignition_common5_graphics_EXPORTS -I/tmp/ignition-common5-20220203-58814-14kxgm5/include -I/tmp/ignition-common5-20220203-58814-14kxgm5/graphics/include -I/tmp/ignition-common5-20220203-58814-14kxgm5/core/include -isystem /usr/local/include/ignition/utils1 -isystem /usr/local/include/ignition/math7 -isystem /usr/local/Cellar/pcre/8.45/include -isystem /usr/local/Cellar/glib/2.70.3/include -isystem /usr/local/Cellar/glib/2.70.3/include/glib-2.0 -isystem /usr/local/Cellar/glib/2.70.3/lib/glib-2.0/include -isystem /usr/local/opt/gettext/include -isystem /usr/local/Cellar/gts/0.7.6_2/include -isystem /usr/local/Cellar/tinyxml2/9.0.0/include -stdlib=libc++ -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -fPIC -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/glib/2.70.3/include -I/usr/local/Cellar/glib/2.70.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.70.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/gts/0.7.6_2/include -I/usr/local/Cellar/tinyxml2/9.0.0/include -std=c++17 -MD -MT graphics/src/CMakeFiles/ignition-common5-graphics.dir/Image.cc.o -MF CMakeFiles/ignition-common5-graphics.dir/Image.cc.o.d -o CMakeFiles/ignition-common5-graphics.dir/Image.cc.o -c /tmp/ignition-common5-20220203-58814-14kxgm5/graphics/src/Image.cc
cd /tmp/ignition-common5-20220203-58814-14kxgm5/events/src && /usr/local/Cellar/cmake/3.22.2/bin/cmake -E cmake_symlink_library "../../lib/libignition-common5-events.5.0.0~pre1.dylib" ../../lib/libignition-common5-events.5.dylib ../../lib/libignition-common5-events.dylib
2 errors generated.
[ 66%] Built target ignition-common5-events
make[2]: *** [av/src/CMakeFiles/ignition-common5-av.dir/VideoEncoder.cc.o] Error 1
@mjcarroll
Copy link
Contributor

Fixed by #325 , thanks @traversaro !

Core development automation moved this from To do to Done Apr 5, 2022
@j-rivero j-rivero removed this from Done in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants