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

pulseaudio: Workaround if clang 15 #24468

Merged

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented Jun 28, 2024

Summary

Changes to recipe: pulseaudio/[<=14.2]
Closes: #24464

Motivation

Configure step fails with:

checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking host operating system... linux
checking whether C compiler accepts -std=gnu11... no
configure: error: *** Compiler does not support -std=gnu11

Applying this workaround:

....

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=clang
compiler.cppstd=gnu11
compiler.libcxx=libstdc++11
compiler.version=15
os=Linux
[conf]
tools.build:compiler_executables={'c': 'clang-15', 'cpp': 'clang++-15'}

....

checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking host operating system... linux
checking whether C compiler accepts -std=gnu11... (cached) yes

....

pulseaudio/14.2 (test package): Running CMake.build()
pulseaudio/14.2 (test package): RUN: cmake --build "/home/develop/conan-center-index/recipes/pulseaudio/all/test_package/build/clang-15-x86_64-gnu11-debug" -- -j2
gmake: Warning: File 'Makefile' has modification time 0.95 s in the future
gmake[1]: Warning: File 'CMakeFiles/Makefile2' has modification time 0.87 s in the future
gmake[2]: Warning: File 'CMakeFiles/test_package.dir/flags.make' has modification time 0.84 s in the future
gmake[2]: warning:  Clock skew detected.  Your build may be incomplete.
gmake[2]: Warning: File 'CMakeFiles/test_package.dir/flags.make' has modification time 0.79 s in the future
[ 50%] Building C object CMakeFiles/test_package.dir/test_package.c.o
[100%] Linking C executable test_package
gmake[2]: warning:  Clock skew detected.  Your build may be incomplete.
[100%] Built target test_package
gmake[1]: warning:  Clock skew detected.  Your build may be incomplete.
gmake: warning:  Clock skew detected.  Your build may be incomplete.


======== Testing the package: Executing test ========
pulseaudio/14.2 (test package): Running test()
pulseaudio/14.2 (test package): RUN: ./test_package
pulse audio verions 14.2.0

Details

Higher versions does not use Autotools and it does not fail

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@franramirez688
Copy link
Contributor Author

To clarify it a bit more. This workaround is bypassing this piece of code within the pulseaudio/configure script:

# ...

if ac_fn_c_try_compile "$LINENO"; then :
  ax_cv_check_cflags__pedantic__Werror__std_gnu11=yes
else
  ax_cv_check_cflags__pedantic__Werror__std_gnu11=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  CFLAGS=$ax_check_save_flags
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__pedantic__Werror__std_gnu11" >&5
$as_echo "$ax_cv_check_cflags__pedantic__Werror__std_gnu11" >&6; }
if test "x$ax_cv_check_cflags__pedantic__Werror__std_gnu11" = x"yes"; then :
  :
else
  as_fn_error $? "*** Compiler does not support -std=gnu11" "$LINENO" 5
fi
# ...

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 1 (f0db3280e701118beb02b7212586447ecb13b14c):

  • pulseaudio/14.2:
    All packages built successfully! (All logs)

  • pulseaudio/13.0:
    All packages built successfully! (All logs)

  • pulseaudio/14.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 1 (f0db3280e701118beb02b7212586447ecb13b14c):

  • pulseaudio/13.0:
    All packages built successfully! (All logs)

  • pulseaudio/14.2:
    All packages built successfully! (All logs)

  • pulseaudio/14.0:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 0438bb7 into conan-io:master Jun 28, 2024
21 checks passed
@AyoubCoding21
Copy link

AyoubCoding21 commented Jun 29, 2024

and clang 16 ?

@AyoubCoding21
Copy link

Wow, It works. Thanks.

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

Successfully merging this pull request may close these issues.

[bug] Pulseaudio and clang 15
5 participants