Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 809314 - media-libs/openal-1.21.1-r1: x86_64-pc-linux-gnu/bin/ld: cannot find -lsndio
Summary: media-libs/openal-1.21.1-r1: x86_64-pc-linux-gnu/bin/ld: cannot find -lsndio
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 828674
  Show dependency tree
 
Reported: 2021-08-21 02:58 UTC by HougeLangley
Modified: 2022-08-21 03:07 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,114.76 KB, text/x-log)
2021-08-21 03:00 UTC, HougeLangley
Details
environment (environment,107.08 KB, text/plain)
2021-08-21 03:01 UTC, HougeLangley
Details
emerge --info (emerge__info,8.38 KB, text/plain)
2021-08-21 03:04 UTC, HougeLangley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HougeLangley 2021-08-21 02:58:14 UTC
emerge -av media-libs/openal

[ebuild  N     ] media-libs/openal-1.21.1-r1::gentoo  USE="alsa pulseaudio qt5 sdl (-coreaudio) -debug -jack -oss -portaudio -sndio" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse sse2 sse4_1"

maybe enable sndio will build successed? 

FAILED: libopenal.so.1.21.1 
: && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -m32 -fPIC -march=znver2 -O3 -pipe  -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,libopenal.so.1 -o libopenal.so.1.21.1 CMakeFiles/OpenAL.dir/al/auxeffectslot.cpp.o CMakeFiles/OpenAL.dir/al/buffer.cpp.o CMakeFiles/OpenAL.dir/al/effect.cpp.o CMakeFiles/OpenAL.dir/al/effects/autowah.cpp.o CMakeFiles/OpenAL.dir/al/effects/chorus.cpp.o CMakeFiles/OpenAL.dir/al/effects/compressor.cpp.o CMakeFiles/OpenAL.dir/al/effects/convolution.cpp.o CMakeFiles/OpenAL.dir/al/effects/dedicated.cpp.o CMakeFiles/OpenAL.dir/al/effects/distortion.cpp.o CMakeFiles/OpenAL.dir/al/effects/echo.cpp.o CMakeFiles/OpenAL.dir/al/effects/equalizer.cpp.o CMakeFiles/OpenAL.dir/al/effects/fshifter.cpp.o CMakeFiles/OpenAL.dir/al/effects/modulator.cpp.o CMakeFiles/OpenAL.dir/al/effects/null.cpp.o CMakeFiles/OpenAL.dir/al/effects/pshifter.cpp.o CMakeFiles/OpenAL.dir/al/effects/reverb.cpp.o CMakeFiles/OpenAL.dir/al/effects/vmorpher.cpp.o CMakeFiles/OpenAL.dir/al/error.cpp.o CMakeFiles/OpenAL.dir/al/event.cpp.o CMakeFiles/OpenAL.dir/al/extension.cpp.o CMakeFiles/OpenAL.dir/al/filter.cpp.o CMakeFiles/OpenAL.dir/al/listener.cpp.o CMakeFiles/OpenAL.dir/al/source.cpp.o CMakeFiles/OpenAL.dir/al/state.cpp.o CMakeFiles/OpenAL.dir/alc/alc.cpp.o CMakeFiles/OpenAL.dir/alc/alu.cpp.o CMakeFiles/OpenAL.dir/alc/alconfig.cpp.o CMakeFiles/OpenAL.dir/alc/bformatdec.cpp.o CMakeFiles/OpenAL.dir/alc/buffer_storage.cpp.o CMakeFiles/OpenAL.dir/alc/converter.cpp.o CMakeFiles/OpenAL.dir/alc/effectslot.cpp.o CMakeFiles/OpenAL.dir/alc/effects/autowah.cpp.o CMakeFiles/OpenAL.dir/alc/effects/chorus.cpp.o CMakeFiles/OpenAL.dir/alc/effects/compressor.cpp.o CMakeFiles/OpenAL.dir/alc/effects/convolution.cpp.o CMakeFiles/OpenAL.dir/alc/effects/dedicated.cpp.o CMakeFiles/OpenAL.dir/alc/effects/distortion.cpp.o CMakeFiles/OpenAL.dir/alc/effects/echo.cpp.o CMakeFiles/OpenAL.dir/alc/effects/equalizer.cpp.o CMakeFiles/OpenAL.dir/alc/effects/fshifter.cpp.o CMakeFiles/OpenAL.dir/alc/effects/modulator.cpp.o CMakeFiles/OpenAL.dir/alc/effects/null.cpp.o CMakeFiles/OpenAL.dir/alc/effects/pshifter.cpp.o CMakeFiles/OpenAL.dir/alc/effects/reverb.cpp.o CMakeFiles/OpenAL.dir/alc/effects/vmorpher.cpp.o CMakeFiles/OpenAL.dir/alc/helpers.cpp.o CMakeFiles/OpenAL.dir/alc/hrtf.cpp.o CMakeFiles/OpenAL.dir/alc/panning.cpp.o CMakeFiles/OpenAL.dir/alc/uiddefs.cpp.o CMakeFiles/OpenAL.dir/alc/voice.cpp.o CMakeFiles/OpenAL.dir/alc/backends/base.cpp.o CMakeFiles/OpenAL.dir/alc/backends/loopback.cpp.o CMakeFiles/OpenAL.dir/alc/backends/null.cpp.o CMakeFiles/OpenAL.dir/alc/backends/alsa.cpp.o CMakeFiles/OpenAL.dir/alc/backends/oss.cpp.o CMakeFiles/OpenAL.dir/alc/backends/sndio.cpp.o CMakeFiles/OpenAL.dir/alc/backends/pulseaudio.cpp.o CMakeFiles/OpenAL.dir/alc/backends/jack.cpp.o CMakeFiles/OpenAL.dir/alc/backends/wave.cpp.o CMakeFiles/OpenAL.dir/core/ambdec.cpp.o CMakeFiles/OpenAL.dir/core/bs2b.cpp.o CMakeFiles/OpenAL.dir/core/bsinc_tables.cpp.o CMakeFiles/OpenAL.dir/core/cpu_caps.cpp.o CMakeFiles/OpenAL.dir/core/devformat.cpp.o CMakeFiles/OpenAL.dir/core/except.cpp.o CMakeFiles/OpenAL.dir/core/filters/biquad.cpp.o CMakeFiles/OpenAL.dir/core/filters/nfc.cpp.o CMakeFiles/OpenAL.dir/core/filters/splitter.cpp.o CMakeFiles/OpenAL.dir/core/fmt_traits.cpp.o CMakeFiles/OpenAL.dir/core/fpu_ctrl.cpp.o CMakeFiles/OpenAL.dir/core/logging.cpp.o CMakeFiles/OpenAL.dir/core/mastering.cpp.o CMakeFiles/OpenAL.dir/core/uhjfilter.cpp.o CMakeFiles/OpenAL.dir/core/mixer/mixer_c.cpp.o CMakeFiles/OpenAL.dir/core/mixer/mixer_sse.cpp.o CMakeFiles/OpenAL.dir/core/mixer/mixer_sse2.cpp.o CMakeFiles/OpenAL.dir/core/mixer/mixer_sse3.cpp.o CMakeFiles/OpenAL.dir/core/mixer/mixer_sse41.cpp.o  libcommon.a  -pthread  -lsndio  -ldl  -latomic  -lm && :
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsndio
Comment 1 HougeLangley 2021-08-21 03:00:47 UTC
Created attachment 734686 [details]
build.log
Comment 2 HougeLangley 2021-08-21 03:01:45 UTC
Created attachment 734689 [details]
environment
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-21 03:01:59 UTC
Could you share emerge --info too please? Thanks!
Comment 4 HougeLangley 2021-08-21 03:04:27 UTC
Created attachment 734692 [details]
emerge --info
Comment 5 Ionen Wolkens gentoo-dev 2021-08-21 03:10:12 UTC
Haven't looked at the CMakeLists but seems openal is ignoring this cmake option and using automagic, so if sndio is available it links with it even if USE=-sndio

Normally doesn't lead to a build failure unless:
USE=-abi_x86_32 emerge -1 sndio
USE="abi_x86_32 -sndio" emerge -1 media-libs/openal

Then I get the same error.
Comment 6 Ionen Wolkens gentoo-dev 2021-08-21 03:22:29 UTC
(for your issues, you can just depclean sndio if you don't use it -- I assume it's installed)

Had a quick look and all these _REQUIRE seem wrong, only means "don't fail if not found" but links either way if it is.

Looks like it has two types of options:
    option(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF)
    option(ALSOFT_BACKEND_SNDIO "Enable SndIO backend" ON)
ebuild should be using the latter
Comment 7 Ionen Wolkens gentoo-dev 2021-08-21 03:25:18 UTC
(In reply to Ionen Wolkens from comment #6)
> Looks like it has two types of options:
>     option(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF)
>     option(ALSOFT_BACKEND_SNDIO "Enable SndIO backend" ON)
> ebuild should be using the latter

or annoyingly, more proper would be to set both
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-21 03:26:23 UTC
(In reply to Ionen Wolkens from comment #6)
> (for your issues, you can just depclean sndio if you don't use it -- I
> assume it's installed)
> 
> Had a quick look and all these _REQUIRE seem wrong, only means "don't fail
> if not found" but links either way if it is.
> 
> Looks like it has two types of options:
>     option(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF)
>     option(ALSOFT_BACKEND_SNDIO "Enable SndIO backend" ON)
> ebuild should be using the latter

Man, what a bozo that "fixed" automagic in the ebuild. Don't check the git log. I'll fix this tomorrow if nobody else does before me (you're welcome to but no obligation).
Comment 9 Ionen Wolkens gentoo-dev 2021-08-21 03:31:52 UTC
In case didn't come to mind, I suggest using this for all options:

    -DALSOFT_{BACKEND,REQUIRE}_SNDIO=$(usex sndio)

This should handle all cases without making argument list longer in the ebuild, not that I verified all the options.
Comment 10 Ionen Wolkens gentoo-dev 2021-08-21 03:33:17 UTC
And uh, note sndio is missing :=
Comment 11 Larry the Git Cow gentoo-dev 2021-08-27 02:48:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db46d9942a9171aeaba5ddb6968a7391d763d259

commit db46d9942a9171aeaba5ddb6968a7391d763d259
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-08-27 02:46:11 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-27 02:48:16 +0000

    media-libs/openal: fix automagic sndio dependency
    
    Closes: https://bugs.gentoo.org/809314
    Signed-off-by: Sam James <sam@gentoo.org>

 .../openal/{openal-1.21.1-r1.ebuild => openal-1.21.1-r2.ebuild}      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2022-08-21 03:07:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e50776f608e30a41a6a59d734d9a7d871d939ab4

commit e50776f608e30a41a6a59d734d9a7d871d939ab4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-08-21 03:00:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-21 03:06:47 +0000

    media-libs/openal: fix automagic PipeWire dependency (and others)
    
    Not sure why I didn't poke at these when I looked at sndio, but oh well.
    
    * Fix automagic issues for all backends, including newly-added PipeWire.
    
    * The PipeWire support is flaky with older versions, looks like an ifdef
    is subtly wrong, but given how fast PW is moving anyway & the changes
    in the ecosystem (see NEWS item for migration w/ USE=sound-server), we don't
    want people running an older PW anyway, so depend on a newer version.
    
    * Disable CMake unused argument warning as it's a false positive, as
    the backend options are conditionally defined based on if deps found.
    
    (Might in future want a regex / adopt the QA one for ./configure instead
    to allow conditionally ignoring specific ones instead of blanket disable.)
    
    Bug: https://bugs.gentoo.org/809314
    Closes: https://bugs.gentoo.org/828674
    Closes: https://bugs.gentoo.org/863200
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/openal/metadata.xml            |  1 +
 media-libs/openal/openal-1.22.2-r1.ebuild | 91 +++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)