configure --with-dyn-default loses mp3 format handlers #653

Open
opened 2025-10-20 14:35:46 +00:00 by martinwguy · 0 comments
martinwguy commented 2025-10-20 14:35:46 +00:00 (Migrated from codeberg.org)

configure --with-dyn-default loses mp3 format handlers

Description

./configure --with-dyn-default
[...]
mp2/mp3....................dyn
 id3tag....................yes
 lame......................yes
 lame id3tag...............yes
 dlopen lame...............no
 mad.......................yes
 dlopen mad................no
 twolame...................yes
 dlopen twolame............no

To make those three dynamically loaded you have to use

./configure --enable-dl-map --enable-dl-lame --enable-dl-twolame
mp2/mp3....................yes
 id3tag....................yes
 lame......................yes
 dlopen lame...............yes
 mad.......................yes
 dlopen mad................yes
 twolame...................yes
 dlopen twolame............yes

But it gets better. when --with-dyn-default is given, mp2 and mp3 are not included
in the list of AUDIO FILE FORMATS and reading or writing mp2 or mp3 files says

sox_ng FAIL formats: no handler for file extension `mp3'

whether you also give --enable-dl-map --enable-dl-lame --enable-dl-twolame or not.

Analysis

It's been like that since sox-14.4.2, indeed since sox-14.3.2.

It does compile mp3.c but doesn't include it in libsox[_ng].*

In configure.ac, --with-dyn-default sets opt_default to dyn instead of yes,
which is used in macro AC_OPTIONAL_FORMAT in m4/optional-fmt.m4.

The effect of --with-dyn-default on the MPEG libraries is the same as saying
--with-mp3=dyn.

Conclusion

There are two issues here:

  • --with-dyn-default not making mad, lame and twolame dynamically loaded. See #587
  • --with-dyn-default removing mp2 and mp3 formats completely, even though it does compile mp3.c
# configure --with-dyn-default loses mp3 format handlers ## Description ``` ./configure --with-dyn-default [...] mp2/mp3....................dyn id3tag....................yes lame......................yes lame id3tag...............yes dlopen lame...............no mad.......................yes dlopen mad................no twolame...................yes dlopen twolame............no ``` To make those three dynamically loaded you have to use ``` ./configure --enable-dl-map --enable-dl-lame --enable-dl-twolame mp2/mp3....................yes id3tag....................yes lame......................yes dlopen lame...............yes mad.......................yes dlopen mad................yes twolame...................yes dlopen twolame............yes ``` But it gets better. when `--with-dyn-default` is given, `mp2` and `mp3` are not included in the list of `AUDIO FILE FORMATS` and reading or writing `mp2` or `mp3` files says ``` sox_ng FAIL formats: no handler for file extension `mp3' ``` whether you also give `--enable-dl-map --enable-dl-lame --enable-dl-twolame` or not. ## Analysis It's been like that since `sox-14.4.2`, indeed since `sox-14.3.2`. It does compile `mp3.c` but doesn't include it in `libsox[_ng].*` In `configure.ac`, `--with-dyn-default` sets `opt_default` to `dyn` instead of `yes`, which is used in macro `AC_OPTIONAL_FORMAT` in `m4/optional-fmt.m4`. The effect of `--with-dyn-default` on the MPEG libraries is the same as saying `--with-mp3=dyn`. ## Conclusion There are two issues here: * `--with-dyn-default` not making `mad`, `lame` and `twolame` dynamically loaded. See #587 * `--with-dyn-default` removing `mp2` and `mp3` formats completely, even though it does compile `mp3.c`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
martinwguy/sox_ng#653
No description provided.