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

Examples links vorbis, flac and opus but they're not used #146

Closed
diizzyy opened this issue Jan 28, 2021 · 10 comments · Fixed by #156
Closed

Examples links vorbis, flac and opus but they're not used #146

diizzyy opened this issue Jan 28, 2021 · 10 comments · Fixed by #156
Assignees
Labels
Milestone

Comments

@diizzyy
Copy link

diizzyy commented Jan 28, 2021

From what I can tell these libraries aren't used at all but gets linked and are required via cmake/FindSndFile.cmake.

@evpobr evpobr self-assigned this Feb 8, 2021
@evpobr evpobr added the question label Feb 8, 2021
@evpobr
Copy link
Member

evpobr commented Feb 8, 2021

Hi @diizzyy

Do use use latest version of libsndfile? It was fixed in latest release, all these external libraries are not required if shared (DLL) libsndfile library was found.

@diizzyy
Copy link
Author

diizzyy commented Feb 10, 2021

Hi @evpobr

When using 0.2.1 (release)

....
-- Found SndFile: /usr/local/lib/libsndfile.so (found version "1.0.30")
....
readelf -d work/.build/examples/timewarp-file

Dynamic section at offset 0x1900 contains 32 entries:
  Tag                Type                  Name/Value
 0x000000000000001d RUNPATH              Library runpath: [/usr/ports/audio/libsamplerate/work/.build/src:/usr/local/lib]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]
 0x0000000000000001 NEEDED               Shared library: [libsamplerate.so.0]
 0x0000000000000001 NEEDED               Shared library: [libsndfile.so.1]
 0x0000000000000001 NEEDED               Shared library: [libvorbisenc.so.2]
 0x0000000000000001 NEEDED               Shared library: [libvorbis.so.0]
 0x0000000000000001 NEEDED               Shared library: [libopus.so.0]
 0x0000000000000001 NEEDED               Shared library: [libFLAC.so.8]
 0x0000000000000001 NEEDED               Shared library: [libogg.so.0]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]

Perhaps I'm missing something?

Edit: Also occurs using libsndfile 1.0.31

@evpobr
Copy link
Member

evpobr commented Feb 10, 2021

Yes, overlinking does take place. So far I can't figure out if it's possible to avoid this when using the find module or if it's CMake's fee for cross-platform.

@evpobr
Copy link
Member

evpobr commented Feb 10, 2021

The problem is here:

INTERFACE_LINK_LIBRARIES "Vorbis::vorbisenc;Opus::opus;FLAC::FLAC")

@diizzyy
Copy link
Author

diizzyy commented May 20, 2021

@evpobr
Copy link
Member

evpobr commented May 21, 2021

Static libsndfile linking will fail. This is common scenario on Windows.

@evpobr evpobr added bug and removed question labels May 21, 2021
@evpobr evpobr linked a pull request May 21, 2021 that will close this issue
@evpobr
Copy link
Member

evpobr commented May 21, 2021

@diizzyy , please test pull request.

@diizzyy
Copy link
Author

diizzyy commented May 23, 2021

@evpobr
Hi, that seems to work on my end at least! Thanks!

@evpobr evpobr added this to the v0.2.2 milestone May 23, 2021
@evpobr
Copy link
Member

evpobr commented May 23, 2021

Thanks @diizzyy !

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

Successfully merging a pull request may close this issue.

2 participants