[Solved] Problem while building 1st time in linux

while building synfig for the first time from the cloned repository https://github.com/synfig/synfig.git … ETL was build successfully but I faced these error in synfig-core stage … waiting for someone’s early reply

synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:196:6: error: reference to ‘AVPixelFormat’ is ambiguous
synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:199:6: error: reference to ‘AVPixelFormat’ is ambiguous
synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:209:53: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
if (avcodec_parameters_from_context(video_stream->codecpar, video_context) < 0) {
synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:209:76: error: ‘avcodec_parameters_from_context’ was not declared in this scope
if (avcodec_parameters_from_context(video_stream->codecpar, video_context) < 0) {
synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:267:28: error: ‘av_packet_alloc’ was not declared in this scope
packet = av_packet_alloc();
synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:348:52: error: ‘avcodec_send_frame’ was not declared in this scope
if (avcodec_send_frame(video_context, video_frame) < 0) {
synfig/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp:354:58: error: ‘avcodec_receive_packet’ was not declared in this scope
int res = avcodec_receive_packet(video_context, packet);

How are you building it? Did you used the scripts present in synfig’s github repo?

yes, I was using the bash scripts in the repo, ./1-setup-linux-native.sh to install the dependencies and ./2-build-debug.sh to build . I am following the steps as stated here https://synfig-docs-dev.readthedocs.io/en/latest/common/building.html#first-build

The problem happens because of incompatibility with old versions of FFmpeg. We have pushed a temporary fix to master branch - https://github.com/synfig/synfig/commit/66bf67b37830b0b0dfa8d436de0b74dd79c58fd3.

Please fetch latest changes into your repository and try re-building again.

@Saikat Can you please let me know what is your version of Linux?

@KonstantinDmitriev oh sure… I am using Ubuntu 16.04

1 Like

@KonstantinDmitriev yea, now the error is gone, though I’ve received many warnings but I think those are okay at this stage . Thank you, happy coding.

Thank you! The warnings are okay. :slight_smile:

1 Like