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

[bug] Pulseaudio installation fail #18951

Open
etiennebonnafoux opened this issue Jul 28, 2023 · 8 comments
Open

[bug] Pulseaudio installation fail #18951

etiennebonnafoux opened this issue Jul 28, 2023 · 8 comments
Assignees

Comments

@etiennebonnafoux
Copy link

etiennebonnafoux commented Jul 28, 2023

Environment details

  • Operating System+version: Ubuntu 22.04.2
  • Compiler+version: gcc 11
  • Conan version: 2.0.9
  • Python version: 3.10.6

Steps to reproduce

I try to install sdl 2 so my conanfile.txt is

[requires]
sdl/2.26.5

[generators]
CMakeDeps
CMakeToolchain

Then I do the command conan install . --output-folder=build --build=missing .

Sdl depends on Pulseaudio and when it comes to this library the installation bugs.

Logs

here is the end of the log where the bug seems to be. The full log is here

/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-libmpg123.o): in function `mpg123_eq_change':
libmpg123.c:(.text+0xe6d): undefined reference to `__exp_finite'
/usr/bin/ld: libmpg123.c:(.text+0x1045): undefined reference to `__exp_finite'
/usr/bin/ld: libmpg123.c:(.text+0x1220): undefined reference to `__exp_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-frame.o): in function `INT123_do_rva':
frame.c:(.text+0x18ee): undefined reference to `__exp_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-frame.o): in function `mpg123_volume_change_db':
frame.c:(.text+0x1a8a): undefined reference to `__exp_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-tabinit.o): in function `INT123_make_conv16to8_table':
tabinit.c:(.text+0xfab): undefined reference to `__log_finite'
/usr/bin/ld: tabinit.c:(.text+0x1009): undefined reference to `__log_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-layer3.o): in function `INT123_init_layer3_gainpow2_mmx':
layer3.c:(.text+0x3fdb): undefined reference to `__exp2_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-layer3.o): in function `INT123_init_layer3_gainpow2':
layer3.c:(.text+0x402b): undefined reference to `__exp2_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-libmpg123.o): in function `mpg123_eq_change':
libmpg123.c:(.text+0xe6d): undefined reference to `__exp_finite'
/usr/bin/ld: libmpg123.c:(.text+0x1045): undefined reference to `__exp_finite'
/usr/bin/ld: libmpg123.c:(.text+0x1220): undefined reference to `__exp_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-frame.o): in function `INT123_do_rva':
frame.c:(.text+0x18ee): undefined reference to `__exp_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-frame.o): in function `mpg123_volume_change_db':
frame.c:(.text+0x1a8a): undefined reference to `__exp_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-tabinit.o): in function `INT123_make_conv16to8_table':
tabinit.c:(.text+0xfab): undefined reference to `__log_finite'
/usr/bin/ld: tabinit.c:(.text+0x1009): undefined reference to `__log_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-layer3.o): in function `INT123_init_layer3_gainpow2_mmx':
layer3.c:(.text+0x3fdb): undefined reference to `__exp2_finite'
/usr/bin/ld: /home/etienne/.conan2/p/mpg120f2357dca7957/p/lib/libmpg123.a(libmpg123_la-layer3.o): in function `INT123_init_layer3_gainpow2':
layer3.c:(.text+0x402b): undefined reference to `__exp2_finite'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:7211 : pacat] Erreur 1
make[3]: *** Attente des tâches non terminées....
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:7229 : pactl] Erreur 1
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
make[3] : on quitte le répertoire « /home/etienne/.conan2/p/b/pulse672b857ab2150/b/build-release/src »
make[2]: *** [Makefile:5398 : all] Erreur 2
make[2] : on quitte le répertoire « /home/etienne/.conan2/p/b/pulse672b857ab2150/b/build-release/src »
make[1]: *** [Makefile:832 : all-recursive] Erreur 1
make[1] : on quitte le répertoire « /home/etienne/.conan2/p/b/pulse672b857ab2150/b/build-release »
make: *** [Makefile:647 : all] Erreur 2

pulseaudio/14.2: ERROR: 
Package '8cbe13a46946620a9a894d9f1850dca80d619f0b' build failed
pulseaudio/14.2: WARN: Build folder /home/etienne/.conan2/p/b/pulse672b857ab2150/b/build-release
*********************************************************
Recipe 'pulseaudio/14.2' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: pulseaudio/14.2: Error in build() method, line 128
	autotools.make()
	ConanException: Error 2 while executing```
@franramirez688
Copy link
Contributor

Hi @etiennebonnafoux

Thanks for reporting this!
Let me transfer this issue to Conan-center-index repository because it sounds like a problem in the recipe and not in the Conan client per se.

@franramirez688 franramirez688 transferred this issue from conan-io/conan Jul 28, 2023
@memsharded
Copy link
Member

The first step would be to try to isolate the issue. Please try to reproduce with conan install --requires=pulseaudio/14.2 --build=missing, and report the results here.

@memsharded memsharded self-assigned this Jul 28, 2023
@etiennebonnafoux
Copy link
Author

etiennebonnafoux commented Jul 28, 2023

Hello,

Following your instruction I get the same kind of bug, it has something to do with undefined reference to __exp2_finite Here is the pastebin of the logs.

@valgur
Copy link
Contributor

valgur commented Aug 2, 2023

After doing some digging, it's clear this issue is caused by an ABI change introduced in glibc 2.31, which removed __*_finite math functions. The reason for the change can be found in the glibc mailing list:

For some of the functions in this file; pow, powf, log, logf, log2, log2f,
exp, expf, exp2, and exp2f; the default implementations have been improved
to handle the special cases and the *_finite names are just aliases of the
normal name and so the asm attribute isn't accomplishing anything.

This itself should not have been a problem due to the functions not actually being a part of the public glibc API. However, both GCC and Clang apparently incorrectly relied on the private functions (https://reviews.llvm.org/D74712). This bug has been fixed in Clang since v10.0.0, but is still present in GCC.

They were only ever an ABI (selected by use of -ffinite-math-only or
options implying it, which resulted in the headers using "asm" to redirect
calls to some libm functions), not an API. The change means that ABI has
turned into compat symbols (only available for existing binaries, not for
anything newly linked, not included in static libm at all, not included in
shared libm for future glibc ports such as RV32), so, yes, in any case
where tools generate direct calls to those functions (rather than just
following the "asm" annotations on function declarations in the headers),
they need to stop doing so.

This issue only affects libraries that have -ffast-math and in turn -ffinite-math-only set, so the fix should be very simple: add -fno-finite-math-only to the compiler flags (as done here and suggested in this helpful blog post).

Of course, the root cause of this problem is the timeless issue of handling libc compatibility correctly in distributed binaries: conan-io/docs#3960

@etiennebonnafoux
Copy link
Author

etiennebonnafoux commented Aug 7, 2023

Sorry for the late answer.
It seems to be a solution but as I am a beginner with Conan and more generally in C++, I am not sure to understand how to fix it. Should I had -fno-finite-math-only somewhere in my conanfile.txt ? Thanks again for your precious help.

@valgur
Copy link
Contributor

valgur commented Aug 7, 2023

Sorry for the late answer.
It seems to be a solution but as I am a beginner with Conan and more generally in C++, I am not sure to understand how to fix it. Should I had -fno-finite-math-only somewhere in my conanfile.txt ? Thanks again for your precious help.

The simplest workaround as a consumer should be to add --build=mpg123 to the conan install or conan create command. As long as you build the problematic packages locally, instead of relying on the binaries provided by the repo, you should be fine.

@etiennebonnafoux
Copy link
Author

Sorry to bother you again but with the same configuration as detail above and with the command conan install . --output-folder=build --build=mpg123 --build=missing I get the same error. What I am missing ? Thank you for your help.

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