Skip to contentSkip to conversation

alsa-lib 1.0.27.2 and musl

DISCUSSION Waldemar Brodkorb 3 participants 3 messages Sep 17, 2013 – Oct 2, 2013

lore
Share & tools
lore
#0 lore raw

Hi Developers,

I am trying to cross-compile alsa-lib with a musl¹ libc based toolchain. Unfortunately src/compat/hsearch_r.c is failing to compile, because of some glibc specific macros (like _P) normally defined in sys/cdefs.h. After grepping through the code I can not find any consumer for any functions implemented in hsearch_r.c. When I just comment out the code, everything compiles fine.

Seems that that usage of hsearch functions was removed in the code long time ago.
commit 273d115de05574251bdd661747ecb68449a5cf1d

Author: Jaroslav Kysela <[email protected]>
Date:   Sat Jul 15 10:20:32 2000 +0000

Removed old mixer API functions.
Added simple control layer (experimental).

Can it just be removed?

thanks for any advice or comment.

best regards
Waldemar

¹ http://www.musl-libc.org/
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw
Quoted 12 lines · Waldemar Brodkorb

Hi Developers,

I am trying to cross-compile alsa-lib with a musl¹ libc based toolchain. Unfortunately src/compat/hsearch_r.c is failing to compile, because of some glibc specific macros (like _P) normally defined in sys/cdefs.h. After grepping through the code I can not find any consumer for any functions implemented in hsearch_r.c. When I just comment out the code, everything compiles fine.

Seems that that usage of hsearch functions was removed in the code long time ago.
commit 273d115de05574251bdd661747ecb68449a5cf1d

Quoted 7 lines
Author: Jaroslav Kysela<[email protected]>
Date:   Sat Jul 15 10:20:32 2000 +0000

Removed old mixer API functions.
Added simple control layer (experimental).

Can it just be removed?

Seems so, yes. can you come up with a patch that removes src/compat/hsearch_r.c plus any references from Makefile.*'s ? the configure check "checking for hsearch_r" should also be removed from configure.ac.

if so please send it here with a title like
"[PATCH]: remove unnecessary/obsolete compat/hsearch_r.c"
and a comment mentioning its removal with the above commit, plus that it highly increases portability for non-glibc systems.

thanks.

Quoted 8 lines

thanks for any advice or comment.

best regards
Waldemar

¹ http://www.musl-libc.org/

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw

At Wed, 02 Oct 2013 17:02:42 +0200,

Quoted 28 lines · John Spencer
Quoted 12 lines · Waldemar Brodkorb

Hi Developers,

I am trying to cross-compile alsa-lib with a musl¹ libc based toolchain. Unfortunately src/compat/hsearch_r.c is failing to compile, because of some glibc specific macros (like _P) normally defined in sys/cdefs.h. After grepping through the code I can not find any consumer for any functions implemented in hsearch_r.c. When I just comment out the code, everything compiles fine.

Seems that that usage of hsearch functions was removed in the code long time ago.
commit 273d115de05574251bdd661747ecb68449a5cf1d

Quoted 7 lines
Author: Jaroslav Kysela<[email protected]>
Date:   Sat Jul 15 10:20:32 2000 +0000

Removed old mixer API functions.
Added simple control layer (experimental).

Can it just be removed?

Seems so, yes. can you come up with a patch that removes src/compat/hsearch_r.c plus any references from Makefile.*'s ? the configure check "checking for hsearch_r" should also be removed from configure.ac.

Quoted 4 lines

if so please send it here with a title like
"[PATCH]: remove unnecessary/obsolete compat/hsearch_r.c" and a comment mentioning its removal with the above commit, plus that it highly increases portability for non-glibc systems.

We can get rid of the whole compat directory.
Also, don't forget to remove the corresponding part in configure.ac, too.

thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel