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

alsa-utils 1.2.10 fails to build with old gcc #233

Closed
tiwai opened this issue Sep 4, 2023 · 7 comments
Closed

alsa-utils 1.2.10 fails to build with old gcc #233

tiwai opened this issue Sep 4, 2023 · 7 comments

Comments

@tiwai
Copy link
Contributor

tiwai commented Sep 4, 2023

The recent change for fixes builds on the latest gcc broke the builds on the older gcc version instead.
The truncated parameters can't be handled well by the older gcc.

I guess we should rather add the option to ignore the unused parameters instead of truncating unused parameters. Not all compilers support those new syntax.

@perexg
Copy link
Member

perexg commented Sep 4, 2023

Ok, thanks. It seems that GCC 11+ only supports this feature:

https://en.cppreference.com/w/c/compiler_support
N2480 Allowing unnamed parameters in a function definition (pdf)

I think that we should probably go back to ATTRIBUTE_UNUSED - __attribute__ ((__unused__)) marks.

@tiwai
Copy link
Contributor Author

tiwai commented Sep 4, 2023

Yes, or add -Wno-unused-parameter option for newer gcc.

perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: ad5a1c0 ("axfer: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: 1843540 ("amidi: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: d609a58 ("alsaloop: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: b366875 ("bat: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: 181e190 ("aplaymidi: fix the verbose compilation warnings for latest gcc")
Fixes: a03377a ("aseqnet: fix the verbose compilation warnings for latest gcc")
Fixes: 429c32a ("aseqdump: fix the verbose compilation warnings for latest gcc")
Fixes: 0b48dd6 ("aconnect: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: d7bbc26 ("alsaucm: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg added a commit that referenced this issue Sep 4, 2023
We need to support older compilers than GCC 11.

Link: #233
Fixes: 153d185 ("topology: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Sep 4, 2023

Ok, above commits should fix this issue. Tested with gcc 4.8.5.

@tiwai
Copy link
Contributor Author

tiwai commented Sep 4, 2023

Thanks! I confirmed those fixes working in my side, too.

@tiwai
Copy link
Contributor Author

tiwai commented Sep 4, 2023

FWIW, I checked gcc7 and gcc12.

@duhow
Copy link

duhow commented Jan 13, 2024

Just facing this issue in 1.2.10 with gcc-7.4.0 for linaro ARM, was working in previous 1.2.4, I am currently patching about 12 files....

EDIT: After applying above commits seems this is solved.

@perexg
Copy link
Member

perexg commented Jan 24, 2024

I will release 1.2.11 soon.

@perexg perexg closed this as completed Jan 24, 2024
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

3 participants