ITADN

libass build error "implicit declaration of function 'strndup'"

#3101Openhydra3333 创建于 2026-04-13
H
hydra3333commented
Hello. Is anyone else seeing this build error from libass ? I'm a tad confused about why this error is appearing, since libass appears not to have been changed in github since 3 Jan 2026 per https://github.com/libass/libass/commits/master/ and the last time I successfully built it was 2026.02.10. Fresh Windows 11 Sandbox VM, x64 static. Build display: ``` 17:54:35 fribidi git ...................................... [Up-to-date] 17:54:35 Running git clone for libass ... 17:54:43 Running git update for libass ... 17:54:44 ┌ libass git ............................... [Recently updated] 17:54:44 ├ Running autoreconf... 17:55:03 ├ Running configure... 17:55:45 ├ Running make... Likely error (tail of the failed operation logfile): make[1]: Entering directory '/build/libass-git/build-64bit' CC libass/ass.lo ../libass/ass.c: In function 'process_info_line': ../libass/ass.c:910:27: error: implicit declaration of function 'strndup' [-Wimplicit-function-declaration] 910 | track->Language = strndup(p, 2); | ^~~~~~~ ../libass/ass.c:910:27: warning: incompatible implicit declaration of built-in function 'strndup' [-Wbuiltin-declaration-mismatch] make[1]: *** [Makefile:1281: libass/ass.lo] Error 1 make[1]: Leaving directory '/build/libass-git/build-64bit' make: *** [Makefile:859: all] Error 2 make failed. Check C:/MABS/build/libass-git/build-64bit/ab-suite.make.log This is required for other packages, so this script will exit. 17:55:49 Creating diagnostics file... Attach C:\MABS\build\logs.zip to the GitHub issue. Make sure the suite is up-to-date before reporting an issue. It might've been fixed already. Try running the build again at a later time. ``` C:/MABS/build/libass-git/build-64bit/ab-suite.make.log: ``` CPPFLAGS: CFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -mthreads CXXFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 LDFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -static-libgcc -static-libstdc++ make -j8 make all-am make[1]: Entering directory '/build/libass-git/build-64bit' CC libass/ass_fontconfig.lo CC libass/ass_directwrite.lo CC libass/ass_utils.lo CC libass/ass_string.lo CC libass/ass_strtod.lo CC libass/ass_filesystem.lo CC libass/ass.lo CC libass/ass_library.lo CC libass/ass_cache.lo ../libass/ass.c: In function 'process_info_line': ../libass/ass.c:910:27: error: implicit declaration of function 'strndup' [-Wimplicit-function-declaration] 910 | track->Language = strndup(p, 2); | ^~~~~~~ ../libass/ass.c:910:27: warning: incompatible implicit declaration of built-in function 'strndup' [-Wbuiltin-declaration-mismatch] CC libass/ass_font.lo CC libass/ass_fontselect.lo CC libass/ass_parse.lo make[1]: *** [Makefile:1281: libass/ass.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... CC libass/ass_shaper.lo make[1]: Leaving directory '/build/libass-git/build-64bit' make: *** [Makefile:859: all] Error 2 make all-am make[1]: Entering directory '/build/libass-git/build-64bit' CC libass/ass.lo ../libass/ass.c: In function 'process_info_line': ../libass/ass.c:910:27: error: implicit declaration of function 'strndup' [-Wimplicit-function-declaration] 910 | track->Language = strndup(p, 2); | ^~~~~~~ ../libass/ass.c:910:27: warning: incompatible implicit declaration of built-in function 'strndup' [-Wbuiltin-declaration-mismatch] make[1]: *** [Makefile:1281: libass/ass.lo] Error 1 make[1]: Leaving directory '/build/libass-git/build-64bit' make: *** [Makefile:859: all] Error 2 ``` PS I tried `--disable-libass` however MABS seemed to ignore it so I had to comment out the build code in the `.sh` to get it to build without libass. Files attached: [logs.zip](https://github.com/user-attachments/files/26669801/logs.zip) [ffmpeg_options.txt](https://github.com/user-attachments/files/26669815/ffmpeg_options.txt) [media-autobuild_suite.ini.txt](https://github.com/user-attachments/files/26669824/media-autobuild_suite.ini.txt)
3 条评论