Bug 1716389 - brltty fails to build on Fedora 31/rawhide: asoundlib.h: No such file or directory
Summary: brltty fails to build on Fedora 31/rawhide: asoundlib.h: No such file or dire...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: brltty
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F31FTBFS PYTHON38 1732841 1854905
TreeView+ depends on / blocked
 
Reported: 2019-06-03 12:01 UTC by Miro Hrončok
Modified: 2020-07-08 12:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1854905 (view as bug list)
Environment:
Last Closed: 2019-06-07 15:03:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.