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 256 forks source link

opus cant find libraries #2718

Closed cantrell216 closed 1 week ago

cantrell216 commented 2 weeks ago

Likely error (tail of the failed operation logfile): Making all in . make[2]: Entering directory '/build/opus-tools-git/build-64bit' CCLD opusenc.exe C:/ffmpeg/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find @FLAC_STATIC_LIBS@: No such file or directory collect2.exe: error: ld returned 1 exit status make[2]: [Makefile:689: opusenc.exe] Error 1 make[2]: Leaving directory '/build/opus-tools-git/build-64bit' make[1]: [Makefile:1112: all-recursive] Error 1 make[1]: Leaving directory '/build/opus-tools-git/build-64bit' make: *** [Makefile:532: all] Error 2 make failed. Check C:/ffmpeg/build/opus-tools-git/build-64bit/ab-suite.make.log This is required for other packages, so this script will exit.

CPPFLAGS: CFLAGS: -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -DUSE_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 -DUSE_MINGW_ANSI_STDIO=1 -static-libgcc -static-libstdc++ make -j6 make all-recursive make[1]: Entering directory '/build/opus-tools-git/build-64bit' Making all in . make[2]: Entering directory '/build/opus-tools-git/build-64bit' CC src/opusenc-opus_header.o CC src/opusenc-opusenc.o CC src/opusenc-tagcompare.o CC src/opusenc-audio-in.o CC src/opusenc-diag_range.o CC src/opusenc-flac.o CC win32/opusenc-unicode_support.o CC src/opusdec-opus_header.o CC src/opusdec-wav_io.o CC src/opusdec-wave_out.o CC src/opusdec-opusdec.o CC src/opusdec-resample.o CC src/opusdec-diag_range.o CC win32/opusdec-unicode_support.o CC src/opusinfo-opus_header.o CC src/opusinfo-opusinfo.o CC src/opusinfo-info_opus.o ../src/opusdec.c: In function 'main': ../src/opusdec.c:1131:28: warning: unknown conversion type character 'I' in format [-Wformat=] 1131 fprintf(stderr,"\r[%c] %02" I64FORMAT ":%02d:%02d", ^~~~ ../src/opusdec.c:111:21: note: format string is defined here 111 # define I64FORMAT "I64d" ^ ../src/opusdec.c:1131:28: warning: format '%d' expects argument of type 'int', but argument 4 has type 'opus_int64' {aka 'long long int'} [-Wformat=] 1131 fprintf(stderr,"\r[%c] %02" I64FORMAT ":%02d:%02d", ^~~~ 1132 spinner[last_spin&3], coded_seconds/3600, ~~~~~~
opus_int64 {aka long long int}
../src/opusdec.c:1131:56: note: format string is defined here 1131 fprintf(stderr,"\r[%c] %02" I64FORMAT ":%02d:%02d", ~~~^
int
%02lld

../src/opusdec.c:1131:28: warning: too many arguments for format [-Wformat-extra-args] 1131 | fprintf(stderr,"\r[%c] %02" I64FORMAT ":%02d:%02d", | ^~~~ CC src/opusinfo-picture.o CC src/opusinfo-tagcompare.o CC win32/opusinfo-unicode_support.o CC src/opusrtp.o CCLD opusenc.exe CCLD opusdec.exe CCLD opusrtp.exe CCLD opusinfo.exe C:/ffmpeg/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find @FLAC_STATIC_LIBS@: No such file or directory collect2.exe: error: ld returned 1 exit status make[2]: [Makefile:689: opusenc.exe] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: Leaving directory '/build/opus-tools-git/build-64bit' make[1]: [Makefile:1112: all-recursive] Error 1 make[1]: Leaving directory '/build/opus-tools-git/build-64bit' make: [Makefile:532: all] Error 2 make all-recursive make[1]: Entering directory '/build/opus-tools-git/build-64bit' Making all in . make[2]: Entering directory '/build/opus-tools-git/build-64bit' CCLD opusenc.exe C:/ffmpeg/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find @FLAC_STATIC_LIBS@: No such file or directory collect2.exe: error: ld returned 1 exit status make[2]: [Makefile:689: opusenc.exe] Error 1 make[2]: Leaving directory '/build/opus-tools-git/build-64bit' make[1]: [Makefile:1112: all-recursive] Error 1 make[1]: Leaving directory '/build/opus-tools-git/build-64bit' make: *** [Makefile:532: all] Error 2

logs.zip

HypervisorX commented 2 weeks ago

I ran into the same issue.

Its seems to be due to this commit in flac.

I tested by creating a flac_extra.sh in the build directory that reverts the a0f6661 commit. I then forced a rebuild of flac, and opus-tools builds successfully.

gitoss commented 2 weeks ago

I ran into the same issue.

Its seems to be due to this commit in flac.

I tested by creating a flac_extra.sh in the build directory that reverts the a0f6661 commit. I then forced a rebuild of flac, and opus-tools builds successfully.

Could you please share the flac_extra.sh and the .patch for general convenience?

L4cache commented 2 weeks ago

Because m-ab-s didn't use cmake for flac, and the the FLAC_STATIC_LIBS is only set by cmake, so either m-ab-s switch to cmake or flac adds this to autoconf, or both.

L4cache commented 2 weeks ago

And as a sidenote, somehow the autoconf stops putting git hashes into flac version string and instead uses "1.4.3" Maybe due to the change to treeless clone

gitoss commented 2 weeks ago

Btw, because m-ab-s doesn't check for timestamps of the .pc files, unless there's a new git version of flac triggerig a rebuild it's sufficient just to remove @FLAC_STATIC_LIBS@ from flac.pc

ktmf01 commented 1 week ago

This should be fixed in flac's latest git now