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

Build fails because of missing ”av_register_all" function #49

Open
mundschenk-at opened this issue Feb 3, 2022 · 4 comments
Open

Comments

@mundschenk-at
Copy link

Apparently the previously deprecated symbol av_register_all has been removed upstream, so the build now fails:

/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -std=gnu++11 -D_GNU_SOURCE -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/loudgain.dir/src/loudgain.c.o CMakeFiles/loudgain.dir/src/printf.c.o CMakeFiles/loudgain.dir/src/scan.c.o CMakeFiles/loudgain.dir/src/tag.cc.o -o loudgain  /usr/local/lib/libebur128.dylib -lavcodec -lavformat -lswresample -lavutil -ltag -lz 
Undefined symbols for architecture x86_64:
  "_av_register_all", referenced from:
      _scan_init in scan.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [loudgain] Error 1
make[1]: *** [CMakeFiles/loudgain.dir/all] Error 2
make: *** [all] Error 2
@hughmcmaster
Copy link

hughmcmaster commented Feb 13, 2022

The libavformat function av_register_all was removed in ffmpeg 5.0.

The patch in PR #50 will help.

You can also just remove the following lines from src/scan.c since you're linking against libraries provided by ffmpeg 5.0.

   if (avformat_version() < AV_VERSION_INT(58,9,100))
     av_register_all();

@mundschenk-at
Copy link
Author

Thank you, I'll see if I can fit that into the Homebrew workflow.

@marvin-klein
Copy link

As a workaround, I forked the tap repo and changed the ffmpeg dependency to ffmpeg@4 (see here).
One can now install loudgain using brew install marvin-klein/tap/loudgain.

@gearhead
Copy link

Please add this to the repo. I can confirm that this builds a binary if these 2 lines in scan.c are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants