m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.49k stars 257 forks source link

Sox returns building error #2664

Closed l-l-l-l-l-l closed 1 month ago

l-l-l-l-l-l commented 2 months ago

Custom 64-bit build. For some reason, sox cannot link to FLAC, ogg, vorbis and opus, saying that they are not shared (I'm compiling a full shared build). I've checked the config.log of the operation, and the issue seems to be somewhere here, but I may be wrong:

Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Rev6, Built by MSYS2 project) 
configure:4301: $? = 0
configure:4290: ccache gcc -V >&5
gcc.exe: error: unrecognized command-line option '-V'
gcc.exe: fatal error: no input files
compilation terminated.
configure:4301: $? = 1
configure:4290: ccache gcc -qversion >&5
gcc.exe: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc.exe: fatal error: no input files
compilation terminated.
configure:4301: $? = 1
configure:4290: ccache gcc -version >&5
gcc.exe: error: unrecognized command-line option '-version'
gcc.exe: fatal error: no input files
compilation terminated.
configure:4301: $? = 1
configure:4321: checking whether the C compiler works
configure:4343: ccache gcc -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -mthreads -DLIBTWOLAME_STATIC  -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -static-libgcc -static-libstdc++ conftest.c -L/local64/lib -lshlwapi -lz -lvo-amrwbenc >&5
C:/media-autobuild_suite-master/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lvo-amrwbenc: No such file or directory
collect2.exe: error: ld returned 1 exit status
configure:4347: $? = 1
configure:4388: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "SoX"
| #define PACKAGE_TARNAME "sox"
| #define PACKAGE_VERSION "14.4.3git"
| #define PACKAGE_STRING "SoX 14.4.3git"
| #define PACKAGE_BUGREPORT "sox-devel@lists.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "sox"
| #define VERSION "14.4.3git"
| /* end confdefs.h.  */
| 
| int
| main (void)
| {
| 
|   ;
|   return 0;

| }
configure:4393: error: in '/build/sox-git/build-64bit':
configure:4395: error: C compiler cannot create executables
See 'config.log' for more details

I've tried deleting the gits for those codecs, as well as the libraries so that they are recompiled, but still nothing. I believe that perhaps I would need to fix those codecs so that they build shared libraries, but I don't know what do I have to touch to do that. I attach both the relevant log and the logs.zip.

Deleted gits as a fix attempt: config.log logs.zip

Deleted libraries as a fix attempt: config.log logs.zip

l-l-l-l-l-l commented 1 month ago

Okay, the issue seems to be that I have enabled opencore-amrnb and opencore-amrwb in my ffmpeg options, but not vo-amrwbenc. When sox detects either opencore-amrnb or opencore-amrwb, it also enables vo-amrwbenc by default, but it doesn't download it, so when it tries to access it during compilation, it breaks. I managed to fix it by downloading the vo-amrwbenc tarball from the link given at the sox repository, building it separatedly and moving the vo-amrwbenc.a and vo-amrwbenc.la files to local64\lib.

It seems like the error with the other four codecs got fixed after deleting and recompiling them.

l-l-l-l-l-l commented 1 month ago

OK, it was just the antivirus doing weird things.