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

When linking avifenc with the merged static lib libavif.a, we still link with libaom.a, libdav1d.a, etc. #1679

Open
wantehchang opened this issue Oct 12, 2023 · 1 comment · May be fixed by #2153

Comments

@wantehchang
Copy link
Collaborator

wantehchang commented Oct 12, 2023

@fdintino @vrabaud

When linking avifenc with the merged static lib libavif.a, we still link with libaom.a, libdav1d.a, etc. unnecessarily. I believe the linker won't use libaom.a, libdav1d.a, etc. because the object files in libavif.a satisfy all the symbol references.

Here is the command line on Linux:

$ ninja -v avifenc
[1/1] : && /usr/bin/c++ -g CMakeFiles/avifenc.dir/apps/avifenc.c.o -o avifenc libavif_apps.a libavif.a /home/wtc/libavif.1/libavif/ext/dav1d/build/src/libdav1d.a /home/wtc/libavif.1/libavif/ext/libgav1/build/libgav1.a /home/wtc/libavif.1/libavif/ext/SVT-AV1/Bin/Release/libSvtAv1Enc.a /home/wtc/libavif.1/libavif/ext/aom/build.libavif/libaom.a /home/wtc/libavif.1/libavif/ext/libyuv/build/libyuv.a /home/wtc/libavif.1/libavif/ext/libwebp/build/libsharpyuv.a -lm -ldl /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libjpeg.so && :

@vrabaud
Copy link
Collaborator

vrabaud commented Oct 13, 2023

Codec libraries are present twice: within the merged libavif.a and as their own codec libraries. They need to be removed from the dependencies. I propose #1680

fdintino added a commit to fdintino/libavif that referenced this issue Oct 19, 2023
@vrabaud vrabaud linked a pull request May 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants