Closed TurtleWilly closed 2 months ago
De culprit is in this line: https://github.com/xiph/flac/blob/5f6a352921cd58360a6ace049ee26068fd5b888c/configure.ac#L82
-AC_ARG_ENABLE(asm-optimizations, AS_HELP_STRING([--disable-asm-optimizations],[Do not use any CPU specific optimization routines]), asm_opt=no, asm_opt=yes)
+AC_ARG_ENABLE(asm-optimizations, AS_HELP_STRING([--disable-asm-optimizations],[Do not use any CPU specific optimization routines]), asm_opt=${enableval}, asm_opt=yes)
should do the trick. The --enable-avx option does not have a similar problem. You can check this by looking whether #define FLAC__USE_AVX 1
is in the file config.h after running configure.
@ktmf01 Yes, verifying the config.h is in my documentation for now. 😎
Could you check whether PR #693 fixes the iconv issue?
@ktmf01 --enable-asm-optimizations
seems to work (needed an autoreconf after applying the patch).
--with-libiconv-prefix=/some/path
by itself still seems to be a NOP. I only see "-liconv" in a verbose build output. Not -I/some/path/include
nor -L/some/path/lib
. Result is that it still grabs an old/ outdated /usr/lib/libiconv.2.dylib
from OS X, not the wanted up-to-date one from /some/path/lib/libiconv.2.dylib
. It's a common problem with libiconv in many packages. It's notoriously fickle.
The workaround is always to specify it all manually like this instead:
./configure \
--prefix=/usr/local/silo/flac/1.4.3 \
…
CFLAGS='-I/usr/local/silo/libiconv/latest/include' \
LDFLAGS='-L/usr/local/silo/libiconv/latest/lib' \
LIBS='-liconv'
(I believe this is an GNU iconv upstream problem.)
(I believe this is an GNU iconv upstream problem.)
Yes, I think it is. The only iconv thing in the configuration is the macro, which is copied directly from gnulib. Maybe you can try to get people there to fix, as they are probably way better qualified to do so.
I like to be explicit with my configure options for reproducible and documented builds down the line. So usually I use an
--enable-xxx
option, if theconfigure --help
lists a--disable-xxx
option and "enabled" is the default anyway and I want to make sure the feature is enabled.flac's
configure --help
lists a--disable-asm-optimizations
option, so to make it explicit and I use--enable-asm-optimizations
, something like this:To my surprise this doesn't work and actually does the opposite and disables the feature:
If AVX is enabled/disabled is not reported by the summary (missing feature!), so maybe it's the case there too?
As workaround I skipped both
--enable-asm-optimizations
(afterwards it reports "Asm optimizations : ..... yes"), and--enable-avx
and have to hope for the best. But it leaves a uncertainty if flac is properly optimized or not and if things randomly may change with the next build/ version.An unrelated note:
--with-libiconv-prefix=
does not work (it still grabs an old libiconv from somewhere else)