Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1716389

Summary: brltty fails to build on Fedora 31/rawhide: asoundlib.h: No such file or directory
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: brlttyAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: gwync, jkysela, jskarvad, kasal, olysonek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1854905 (view as bug list) Environment:
Last Closed: 2019-06-07 15:03:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1700317, 1686977, 1732841, 1854905    

Description Miro Hrončok 2019-06-03 12:01:51 UTC
brltty 6.0-2.fc31 faisl to build on Fedora 31/rawhide:

./pcm_alsa.c:22:10: fatal error: asoundlib.h: No such file or directory
   22 | #include <asoundlib.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

This blocks the Python 3.8 rebuild.

We think this is caused by https://src.fedoraproject.org/rpms/alsa-lib/c/8c75636abba982ee9ac77d3383af1f7098bf4514?branch=master

Full logs from the Python 3.8 can be obtained from: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/brltty/

Comment 1 Miro Hrončok 2019-06-03 12:25:48 UTC
Jaroslav, could you please provide some insight on why this header file was removed? Was it moved to another package?

Comment 2 Jaroslav Škarvada 2019-06-03 16:02:30 UTC
It seems like we don't have -I/usr/include/alsa, investigating why. My guess is that some function brltty used for alsa autodetection has been changed or removed, the asoundlib.h seems to be present.

Comment 3 Jaroslav Škarvada 2019-06-03 16:04:21 UTC
The configure output is now:
configure: pcm package: alsa
configure: pcm includes:
configure: pcm libs: -lasound.
configure: midi package: alsa
configure: midi includes:
configure: midi libs: -lasound.

It should be:
configure: pcm package: alsa
configure: pcm includes: -I/usr/include/alsa 
configure: pcm libs: -lasound 
configure: midi package: alsa
configure: midi includes: -I/usr/include/alsa 
configure: midi libs: -lasound

Comment 4 Jaroslav Škarvada 2019-06-03 16:18:00 UTC
It seems like alsa bug, it should work this way:
$ pkg-config --cflags-only-I alsa
-I/usr/include/alsa 

but it works this way:
$ pkg-config --cflags-only-I alsa
<nothing>

Comment 5 Jaroslav Škarvada 2019-06-03 16:33:31 UTC
It seems the problem is in the /usr/lib64/pkgconfig/alsa.pc, there should be:
Cflags: -I${includedir} -I${includedir}/alsa

but there is just:
Cflags: -I${includedir}

To be honest I don't know why there is -I${includedir}, it seems redundant for me, but the -I${includedir}/alsa definitely needs to be there, so reassigning to alsa.

Comment 6 Miro Hrončok 2019-06-07 10:51:04 UTC
This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. The fix should be pushed on the master branch and no release bump is required.

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

This issue needs to be resolved by next week, if other rebuilds of Python 3.8 beta 1 go well. If this is unrealistic for you, let us know how much time you need.

If you don't have free cycles to dedicate fixing your package, notify us and we'll try to provide some pointers. Let us know if we can push a fix directly without a pull request, in the case we happen to have one before you do.

Comment 7 Jaroslav Kysela 2019-06-07 12:17:05 UTC
The problem appears that the "link-only" header in the source file is used. The source should be changed to use <alsa/asoundlib.h> path. We are using it everywhere in the ALSA packages:

  alsa-utils/aplay/aplay.c:#include <alsa/asoundlib.h>
  etc...

I removed the "link" to keep things more consistent. The applications should be fixed.

Comment 8 Miro Hrončok 2019-06-07 12:29:34 UTC
Trying with:

sed -i 's|#include <asoundlib.h>|#include <alsa/asoundlib.h>|' Programs/*_alsa.c

Comment 10 Jaroslav Škarvada 2019-06-07 14:18:21 UTC
It seems it's documented:
https://alsa-project.org/wiki/Changes_v1.1.8_v1.1.9

So let's fix it in the brltty.