alsa-lib-1.0.18 doesn't build with option '--with-softfloat'
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi all,
I'm trying to build the latest release alsa-lib-1.0.18 on Blackfin with option '--with-softfloat',
but it failed with message:
libtool: install: warning: remember to run libtool --finish /usr/lib/alsa-lib/smixer' ../src/.libs/libasound.so: undefined reference to _sqrtf' ../src/.libs/libasound.so: undefined reference to _exp' ../src/.libs/libasound.so: undefined reference to _log' ../src/.libs/libasound.so: undefined reference to _sqrt' ../src/.libs/libasound.so: undefined reference to _fmod' ../src/.libs/libasound.so: undefined reference to `_floor'
Since I've selected --with-softfloat, '-lm' should be excluded from ALSA_DEPLIBS.
but some source files still depend on libm, such as .../pcm/pcm_ladspa.c;.../mixer/ simple_none.c .../alisp/alisp.c.These there files cause undefined reference as above.
Best Regards
Cliff
At Wed, 7 Jan 2009 17:02:40 +0800,
Quoted 16 lines · Cliff Cai
Hi all,
I'm trying to build the latest release alsa-lib-1.0.18 on Blackfin with option '--with-softfloat',
but it failed with message:libtool: install: warning: remember to run
libtool --finish /usr/lib/alsa-lib/smixer' ../src/.libs/libasound.so: undefined reference to_sqrtf' ../src/.libs/libasound.so: undefined reference to_exp' ../src/.libs/libasound.so: undefined reference to_log' ../src/.libs/libasound.so: undefined reference to_sqrt' ../src/.libs/libasound.so: undefined reference to_fmod' ../src/.libs/libasound.so: undefined reference to `_floor'
Quoted 5 lines
Since I've selected --with-softfloat, '-lm' should be excluded from
ALSA_DEPLIBS.
but some source files still depend on libm, such as .../pcm/pcm_ladspa.c;.../mixer/simple_none.c.../alisp/alisp.c.These there files cause undefined reference as above.
Bah, at least, simple_none.c should be without math stuff.
pcm_ladspa.c can't be build without libm, I guess. This should be excluded with the softfload option. Ditto for alisp.
How about the patch below?
thanks,
Takashi
---
configure.in +2 -0
@@ -367,6 +367,7 @@ AC_ARG_ENABLE(seq, AC_ARG_ENABLE(alisp, AS_HELP_STRING([--disable-alisp], [disable the alisp component]), [build_alisp="$enableval"], [build_alisp="yes"]) +test "$softfloat" = "yes" && build_alisp="no" AC_ARG_ENABLE(old-symbols, AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]), [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
@@ -474,6 +475,7 @@ fi if test "$softfloat" = "yes"; then build_pcm_lfloat="no" + build_pcm_ladspa="no" fi AM_CONDITIONAL(BUILD_PCM_PLUGIN, test x$build_pcm_plugin = xyes)
src/mixer/simple_none.c +7 -0
@@ -1450,7 +1450,14 @@ static int simple_add1(snd_mixer_class_t *class, const char *name, }if (ctype !=SND_CTL_ELEM_TYPE_BOOLEAN )return 0 ; +#ifdef HAVE_SOFT_FLOAT +/* up to 256 channels */ +for (n =1 ; n <256 ; n++) +if (n * n == values) +break ; +#else n =sqrt ((double )values); +#endif if (n * n != values)return 0 ; values = n;
Quoted 4 lines · Takashi Iwai
pcm_ladspa.ccan't be build without libm, I guess. This should be excluded with the softfload option. Ditto for alisp.How about the patch below?
OpenEmbedded has been carrying the following patch for a while, cooindcidentally I was actually looking at their ALSA packaging last night and thinking about pushing this to you - it forces liking with libm which is more important when using softfloat.
It was written by Henning Heinold <[email protected]>
configure.in +3 -3
@@ -191,9 +191,9 @@ AC_MSG_RESULT(no) fi -ALSA_DEPLIBS="" -if test "$softfloat" != "yes"; then - ALSA_DEPLIBS="-lm" +ALSA_DEPLIBS="-lm" +if test "$softfloat" = "yes"; then + AC_CHECK_LIB([m], [floor], , [ALSA_DEPLIBS=""]) fi dnl Check for libdl
At Wed, 7 Jan 2009 11:01:25 +0000,
Quoted 11 lines · Mark Brown
Quoted 4 lines · Takashi Iwai
pcm_ladspa.ccan't be build without libm, I guess. This should be excluded with the softfload option. Ditto for alisp.How about the patch below?
OpenEmbedded has been carrying the following patch for a while, cooindcidentally I was actually looking at their ALSA packaging last night and thinking about pushing this to you - it forces liking with libm which is more important when using softfloat.
Well, when softfloat option is chosen, basically alsa-lib should be built without floating operations, thus libm shouldn't be needed. (So in that sense, the option is named wrongly...)
Takashi
Quoted 24 lines
It was written by Henning Heinold <[email protected]>
Index: alsa-lib-1.0.15/configure.in
===================================================================configure.in +3
-3@@ -191,9 +191,9 @@ AC_MSG_RESULT(no) fi -ALSA_DEPLIBS="" -if test "$softfloat" != "yes"; then - ALSA_DEPLIBS="-lm" +ALSA_DEPLIBS="-lm" +if test "$softfloat" = "yes"; then + AC_CHECK_LIB([m], [floor], , [ALSA_DEPLIBS=""]) fi dnl Check for libdl_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Quoted 11 lines · Takashi Iwai
Quoted 6 lines · Mark Brown
On Wed, Jan 07, 2009 at 10:18:42AM +0100, Takashi Iwai wrote:
OpenEmbedded has been carrying the following patch for a while, cooindcidentally I was actually looking at their ALSA packaging last night and thinking about pushing this to you - it forces liking with libm which is more important when using softfloat.
Well, when softfloat option is chosen, basically alsa-lib should be built without floating operations, thus libm shouldn't be needed. (So in that sense, the option is named wrongly...)
Yeah, looking at the code I had kind of suspected that or I'd have pushed it last night. It's probably worth renaming the option to "float" or something to reduce confusion?
At Wed, 7 Jan 2009 11:34:27 +0000,
Quoted 10 lines · Mark Brown
Quoted 7 lines · Takashi Iwai
Quoted 6 lines · Mark Brown
On Wed, Jan 07, 2009 at 10:18:42AM +0100, Takashi Iwai wrote:
OpenEmbedded has been carrying the following patch for a while, cooindcidentally I was actually looking at their ALSA packaging last night and thinking about pushing this to you - it forces liking with libm which is more important when using softfloat.
Quoted 7 lines
Quoted 3 lines
Well, when softfloat option is chosen, basically alsa-lib should be built without floating operations, thus libm shouldn't be needed. (So in that sense, the option is named wrongly...)
Yeah, looking at the code I had kind of suspected that or I'd have pushed it last night. It's probably worth renaming the option to "float" or something to reduce confusion?
Yep, e.g. --disable-float would be more intuitive.
Takashi