Bug #382
Audacious uses strnlen(), which it may not be available.
100%
Description
The latest sources from repository do not compile on Windows.
It breaks with these errors:
audstrings.lib.o: In function `str_decode_percent':
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/audstrings.c:222: undefined reference to `strnlen'
audstrings.lib.o: In function `str_encode_percent':
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/audstrings.c:259: undefined reference to `strnlen'
audstrings.lib.o: In function `str_to_double':
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/audstrings.c:663: undefined reference to `strnlen'
charset.lib.o: In function `str_convert':
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/charset.c:37: undefined reference to `libiconv_open'
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/charset.c:56: undefined reference to `libiconv'
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/charset.c:62: undefined reference to `libiconv_close'
strpool.lib.o: In function `str_nget':
C:\MinGW\msys\1.0\home\Claudio\audacious\src\libaudcore/strpool.c:248: undefined reference to `strnlen'
collect2.exe: error: ld returned 1 exit status
Failed to link libaudcore.dll!
The sources are using the "strnlen" function, but it is not available on all systems.
It also fails with errors on libiconv: I hacked the makefile by adding -liconv to $LIBS, but perhaps it should be handled by the configure script in the proper way.
History
#1 Updated by John Lindgren almost 11 years ago
- Subject changed from Audacious uses strnlen(), which it may ot be available. to Audacious uses strnlen(), which it may not be available.
- Affects version 3.5 added
- Affects version deleted (
3.4.3)
I'm aware that the master branch is currently broken on Windows (for various reasons), and I plan to fix it before the first alpha release.
#2 Updated by Carlo Bramini almost 11 years ago
Thank you very much.
For information, the build process on Windows is also affected by other issues, besides the absence of strnlen() into libaudcore and into libaudtag:
util.c: In function 'cut_beginning_tag': util.c:34:51: error: 'SEEK_SET' undeclared (first use in this function) if (vfs_fseek (handle, offset + tag_size, SEEK_SET)) ^ util.c:34:51: note: each undeclared identifier is reported only once for each function it appears in Failed to compile util.c (lib)!
adder.o: In function `add_folder': C:\MinGW\msys\1.0\home\Claudio\audacious\src\audacious/adder.c:291: undefined reference to `lstat' fft.o: In function `generate_tables': C:\MinGW\msys\1.0\home\Claudio\audacious\src\audacious/fft.c:57: undefined reference to `cexpf' fft.o: In function `calc_freq': C:\MinGW\msys\1.0\home\Claudio\audacious\src\audacious/fft.c:114: undefined reference to `cabsf' C:\MinGW\msys\1.0\home\Claudio\audacious\src\audacious/fft.c:117: undefined reference to `cabsf' collect2.exe: error: ld returned 1 exit status Failed to link audacious.exe!
I resolved the first one easily, by just adding:
#include <stdio.h>on top of util.c
The second one may require something else, I solved it by changing the used functions, for example, cabsf() to cabs(), but I'm not sure if it is the correct way to do it.
#3 Updated by John Lindgren almost 11 years ago
Fixed:
https://github.com/audacious-media-player/audacious/commit/f8fa236e620fa41120c821261d9bf571839c233e
https://github.com/audacious-media-player/audacious-plugins/commit/a8a47f2122e661ddce8c6258391791ea5ca9b770
I have never had trouble with cabsf or cexpf in MinGW, so I'm not sure what's going on there.
#4 Updated by John Lindgren almost 11 years ago
- Status changed from New to Closed
- Target version set to 3.5
- % Done changed from 0 to 100