Closed nanake closed 1 year ago
Similar, +1
Hello.
This commit fails to cross-compile the static library for linking into ffmpeg as a dependency: a5e2bfa444c88c83f5d3a1618df2b47751d93f49 The previous commit cross-compiles fine.
Cross-compiling environment: In Ubuntu using mingw64 for target win10 x64.
Log:
[18:06:49][DEBUG] Running 'meson --prefix=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --libdir=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib --default-library=static --strip --buildtype=release --backend=ninja -Dresampler=libsamplerate -Dfft=fftw --cross-file=/home/u/Desktop/_working/workdir/meson_environment.txt ./ ..' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
The Meson build system
Version: 0.63.2
Source dir: /home/u/Desktop/_working/workdir/x86_64/rubberband_git
Build dir: /home/u/Desktop/_working/workdir/x86_64/rubberband_git/build
Build type: cross build
Project name: Rubber Band Library
Project version: 3.1.0-pre
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 12.2.0 "x86_64-w64-mingw32-gcc (GCC) 12.2.0")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.37
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 12.2.0 "x86_64-w64-mingw32-g++ (GCC) 12.2.0")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.37
C compiler for the build machine: cc (gcc 12.1.0 "cc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0")
C linker for the build machine: cc ld.bfd 2.38
C++ compiler for the build machine: c++ (gcc 12.1.0 "c++ (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0")
C++ linker for the build machine: c++ ld.bfd 2.38
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Found pkg-config: /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/pkg-config (0.29.2)
Run-time dependency fftw3 found: YES 3.3.10
Found CMake: /usr/bin/cmake (3.23.2)
Run-time dependency sleef found: NO (tried pkgconfig and cmake)
Run-time dependency sleefdft found: NO (tried pkgconfig and cmake)
Run-time dependency samplerate found: YES 0.2.2
Run-time dependency speexdsp found: YES 1.2.1
Run-time dependency sndfile found: YES 1.1.0
Run-time dependency vamp-sdk found: YES 2.9
Run-time dependency Boost found: NO (tried system)
Run-time dependency threads found: YES
Has header "ladspa.h" : YES
Has header "lv2.h" : NO
Checking for function "sincos" : YES
Has header "jni.h" : NO
Program javac found: NO
Program jar found: NO
Message: For FFT: using FFTW
Message: For resampler: using libsamplerate
Message: Will build Rubber Band Library static library
Message: Not building Rubber Band Library dynamic library: default_library option is set to static
Message: Not building Java Native Interface: jni.h header not found
Message: Will build LADSPA plugin
Message: Not building LV2 plugin: lv2.h header not found
Message: Will build Vamp plugin
Message: Not building command-line utilities: libsndfile dependency not found
Message: Not building unit tests: boost_unit_test_framework dependency not found
Build targets in project: 4
Rubber Band Library 3.1.0-pre
Directories
prefix : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32
bindir : bin
libdir : lib
datadir : share
Configuration
FFT : FFTW
Resampler : libsamplerate
Build type : Release
Architecture : x86_64
Build targets
Static library : YES
Name: rubberband
Dynamic library : NO
JNI library : NO
LADSPA plugin : YES
Name: ladspa-rubberband
LV2 plugin : NO
Vamp plugin : YES
Name: vamp-rubberband
Command-line utility (R2): NO
Command-line utility (R3): NO
Unit tests : NO
User defined options
Cross files : /home/u/Desktop/_working/workdir/meson_environment.txt
backend : ninja
buildtype : release
default_library : static
libdir : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib
prefix : /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32
strip : True
fft : fftw
resampler : libsamplerate
Found ninja-1.10.1 at /usr/bin/ninja
##############################
[18:06:51][INFO][NINJA] Building 'rubberband' with 'build_options': '' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
[18:06:51][DEBUG] ninja -j 6
[18:06:51][DEBUG] Running 'ninja -j 6 ' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
[1/27] Compiling C++ object librubberband_objlib.a.p/src_faster_SilentAudioCurve.cpp.obj
[2/27] Compiling C++ object librubberband_objlib.a.p/src_faster_HighFrequencyAudioCurve.cpp.obj
[3/27] Compiling C++ object librubberband_objlib.a.p/src_faster_AudioCurveCalculator.cpp.obj
[4/27] Compiling C++ object librubberband_objlib.a.p/src_faster_PercussiveAudioCurve.cpp.obj
[5/27] Compiling C++ object librubberband_objlib.a.p/src_rubberband-c.cpp.obj
[6/27] Compiling C++ object librubberband_objlib.a.p/src_faster_CompoundAudioCurve.cpp.obj
[7/27] Compiling C++ object librubberband_objlib.a.p/src_common_Allocators.cpp.obj
[8/27] Compiling C++ object librubberband_objlib.a.p/src_common_Log.cpp.obj
[9/27] Compiling C++ object librubberband_objlib.a.p/src_faster_StretcherChannelData.cpp.obj
FAILED: librubberband_objlib.a.p/src_faster_StretcherChannelData.cpp.obj
x86_64-w64-mingw32-g++ -Ilibrubberband_objlib.a.p -I. -I.. -I../rubberband -I../src -I/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++11 -O3 -O3 -fstack-protector-all -O3 -fstack-protector-all -D_FORTIFY_SOURCE=2 -pthread -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DHAVE_LIBSAMPLERATE -DNO_THREAD_CHECKS -DNO_TIMING -DNDEBUG -D_WIN32 -DNOMINMAX -D_USE_MATH_DEFINES -DGETOPT_API= -MD -MQ librubberband_objlib.a.p/src_faster_StretcherChannelData.cpp.obj -MF librubberband_objlib.a.p/src_faster_StretcherChannelData.cpp.obj.d -o librubberband_objlib.a.p/src_faster_StretcherChannelData.cpp.obj -c ../src/faster/StretcherChannelData.cpp
In file included from ../src/faster/../common/Window.h:31,
from ../src/faster/R2Stretcher.h:29,
from ../src/faster/StretcherChannelData.h:27,
from ../src/faster/StretcherChannelData.cpp:24:
../src/faster/../common/RingBuffer.h: In member function 'bool RubberBand::RingBuffer<T>::mlock()':
../src/faster/../common/sysutils.h:111:22: error: could not convert '(void)(1)' from 'void' to 'bool'
111 | #define MLOCK(a,b) (void)1
| ^~~~~~~
| |
| void
../src/faster/../common/RingBuffer.h:270:9: note: in expansion of macro 'MLOCK'
270 | if (MLOCK((void *)m_buffer, m_size * sizeof(T))) return false;
| ^~~~~
[10/27] Compiling C++ object librubberband_objlib.a.p/src_common_Profiler.cpp.obj
[11/27] Compiling C++ object librubberband_objlib.a.p/src_faster_R2Stretcher.cpp.obj
FAILED: librubberband_objlib.a.p/src_faster_R2Stretcher.cpp.obj
x86_64-w64-mingw32-g++ -Ilibrubberband_objlib.a.p -I. -I.. -I../rubberband -I../src -I/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++11 -O3 -O3 -fstack-protector-all -O3 -fstack-protector-all -D_FORTIFY_SOURCE=2 -pthread -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DHAVE_LIBSAMPLERATE -DNO_THREAD_CHECKS -DNO_TIMING -DNDEBUG -D_WIN32 -DNOMINMAX -D_USE_MATH_DEFINES -DGETOPT_API= -MD -MQ librubberband_objlib.a.p/src_faster_R2Stretcher.cpp.obj -MF librubberband_objlib.a.p/src_faster_R2Stretcher.cpp.obj.d -o librubberband_objlib.a.p/src_faster_R2Stretcher.cpp.obj -c ../src/faster/R2Stretcher.cpp
In file included from ../src/faster/../common/Window.h:31,
from ../src/faster/R2Stretcher.h:29,
from ../src/faster/R2Stretcher.cpp:24:
../src/faster/../common/RingBuffer.h: In member function 'bool RubberBand::RingBuffer<T>::mlock()':
../src/faster/../common/sysutils.h:111:22: error: could not convert '(void)(1)' from 'void' to 'bool'
111 | #define MLOCK(a,b) (void)1
| ^~~~~~~
| |
| void
../src/faster/../common/RingBuffer.h:270:9: note: in expansion of macro 'MLOCK'
270 | if (MLOCK((void *)m_buffer, m_size * sizeof(T))) return false;
| ^~~~~
[12/27] Compiling C++ object librubberband_objlib.a.p/src_faster_StretcherProcess.cpp.obj
FAILED: librubberband_objlib.a.p/src_faster_StretcherProcess.cpp.obj
x86_64-w64-mingw32-g++ -Ilibrubberband_objlib.a.p -I. -I.. -I../rubberband -I../src -I/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++11 -O3 -O3 -fstack-protector-all -O3 -fstack-protector-all -D_FORTIFY_SOURCE=2 -pthread -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DHAVE_LIBSAMPLERATE -DNO_THREAD_CHECKS -DNO_TIMING -DNDEBUG -D_WIN32 -DNOMINMAX -D_USE_MATH_DEFINES -DGETOPT_API= -MD -MQ librubberband_objlib.a.p/src_faster_StretcherProcess.cpp.obj -MF librubberband_objlib.a.p/src_faster_StretcherProcess.cpp.obj.d -o librubberband_objlib.a.p/src_faster_StretcherProcess.cpp.obj -c ../src/faster/StretcherProcess.cpp
In file included from ../src/faster/../common/Window.h:31,
from ../src/faster/R2Stretcher.h:29,
from ../src/faster/StretcherProcess.cpp:24:
../src/faster/../common/RingBuffer.h: In member function 'bool RubberBand::RingBuffer<T>::mlock()':
../src/faster/../common/sysutils.h:111:22: error: could not convert '(void)(1)' from 'void' to 'bool'
111 | #define MLOCK(a,b) (void)1
| ^~~~~~~
| |
| void
../src/faster/../common/RingBuffer.h:270:9: note: in expansion of macro 'MLOCK'
270 | if (MLOCK((void *)m_buffer, m_size * sizeof(T))) return false;
| ^~~~~
[13/27] Compiling C++ object librubberband_objlib.a.p/src_RubberBandStretcher.cpp.obj
FAILED: librubberband_objlib.a.p/src_RubberBandStretcher.cpp.obj
x86_64-w64-mingw32-g++ -Ilibrubberband_objlib.a.p -I. -I.. -I../rubberband -I../src -I/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -std=c++11 -O3 -O3 -fstack-protector-all -O3 -fstack-protector-all -D_FORTIFY_SOURCE=2 -pthread -DHAVE_FFTW3 -DFFTW_DOUBLE_ONLY -DHAVE_LIBSAMPLERATE -DNO_THREAD_CHECKS -DNO_TIMING -DNDEBUG -D_WIN32 -DNOMINMAX -D_USE_MATH_DEFINES -DGETOPT_API= -MD -MQ librubberband_objlib.a.p/src_RubberBandStretcher.cpp.obj -MF librubberband_objlib.a.p/src_RubberBandStretcher.cpp.obj.d -o librubberband_objlib.a.p/src_RubberBandStretcher.cpp.obj -c ../src/RubberBandStretcher.cpp
In file included from ../src/faster/../common/Window.h:31,
from ../src/faster/R2Stretcher.h:29,
from ../src/RubberBandStretcher.cpp:24:
../src/faster/../common/RingBuffer.h: In member function 'bool RubberBand::RingBuffer<T>::mlock()':
../src/faster/../common/sysutils.h:111:22: error: could not convert '(void)(1)' from 'void' to 'bool'
111 | #define MLOCK(a,b) (void)1
| ^~~~~~~
| |
| void
../src/faster/../common/RingBuffer.h:270:9: note: in expansion of macro 'MLOCK'
270 | if (MLOCK((void *)m_buffer, m_size * sizeof(T))) return false;
| ^~~~~
[14/27] Compiling C++ object librubberband_objlib.a.p/src_common_FFT.cpp.obj
ninja: build stopped: subcommand failed.
[18:06:54][ERROR] Error [1] running process: 'ninja -j 6 ' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
[18:06:54][ERROR] You can try deleting the product/dependency folder: '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build' and re-run the script
Fixed in repo now. Thanks
:) Oh dear.
Unfortunately a different issue appears to have arisen from the fix.
As before, the commit prior to a5e2bfa444c88c83f5d3a1618df2b47751d93f49 worked with identical build parameters,
however as can be seen from the log below an unexpected issue now arises:
../meson.build:131:0: ERROR: Could not execute Java compiler: javac
Is it me, should I be doing something differently ? ( I rather do prefer not to have to research and find and build a cross-compiling java compiler :) )
Log:
[20:57:44][INFO] Meson'ing 'rubberband' with: --prefix=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --libdir=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib --default-library=static --strip --buildtype=release --backend=ninja -Dresampler=libsamplerate -Dfft=fftw --cross-file=/home/u/Desktop/_working/workdir/meson_environment.txt ./ ..
[20:57:44][DEBUG] meson --prefix=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --libdir=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib --default-library=static --strip --buildtype=release --backend=ninja -Dresampler=libsamplerate -Dfft=fftw --cross-file=/home/u/Desktop/_working/workdir/meson_environment.txt ./ ..
[20:57:44][DEBUG] Running 'meson --prefix=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --libdir=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib --default-library=static --strip --buildtype=release --backend=ninja -Dresampler=libsamplerate -Dfft=fftw --cross-file=/home/u/Desktop/_working/workdir/meson_environment.txt ./ ..' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
The Meson build system
Version: 0.63.2
Source dir: /home/u/Desktop/_working/workdir/x86_64/rubberband_git
Build dir: /home/u/Desktop/_working/workdir/x86_64/rubberband_git/build
Build type: cross build
Project name: Rubber Band Library
Project version: 3.1.0-pre
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 12.2.0 "x86_64-w64-mingw32-gcc (GCC) 12.2.0")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.37
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 12.2.0 "x86_64-w64-mingw32-g++ (GCC) 12.2.0")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.37
C compiler for the build machine: cc (gcc 12.1.0 "cc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0")
C linker for the build machine: cc ld.bfd 2.38
C++ compiler for the build machine: c++ (gcc 12.1.0 "c++ (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0")
C++ linker for the build machine: c++ ld.bfd 2.38
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Found pkg-config: /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/pkg-config (0.29.2)
Run-time dependency fftw3 found: YES 3.3.10
Found CMake: /usr/bin/cmake (3.23.2)
Run-time dependency sleef found: NO (tried pkgconfig and cmake)
Run-time dependency sleefdft found: NO (tried pkgconfig and cmake)
Run-time dependency samplerate found: YES 0.2.2
Run-time dependency speexdsp found: YES 1.2.1
Run-time dependency sndfile found: YES 1.1.0
Run-time dependency vamp-sdk found: YES 2.9
Run-time dependency Boost found: NO (tried system)
Run-time dependency threads found: YES
Has header "ladspa.h" : YES
Has header "lv2.h" : NO
Checking for function "sincos" : YES
../meson.build:131:0: ERROR: Could not execute Java compiler: javac
A full log can be found at /home/u/Desktop/_working/workdir/x86_64/rubberband_git/build/meson-logs/meson-log.txt
[20:57:45][ERROR] Error [1] running process: 'meson --prefix=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32 --libdir=/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib --default-library=static --strip --buildtype=release --backend=ninja -Dresampler=libsamplerate -Dfft=fftw --cross-file=/home/u/Desktop/_working/workdir/meson_environment.txt ./ ..' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
[20:57:45][ERROR] You can try deleting the product/dependency folder: '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build' and re-run the script
Oh that's disappointing. It looks as if the jni
dependency lookup is bailing out if javac
can't be found, even though the dependency is explicitly marked as not required. This may take some thought.
PS, on an unrelated matter, while you're at it, I'm not sure if this in the log may possibly have some other consequence:
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
_edit: oops, sorry, please ignore this, it is my issue in mesonenvironment.txt
[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ld = 'bfd'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
ranlib = 'x86_64-w64-mingw32-ranlib'
pkgconfig = 'pkg-config'
dlltool = 'x86_64-w64-mingw32-dlltool'
gendef = '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/bin/gendef'
cmake = 'cmake'
#needs_exe_wrapper = false
#exe_wrapper = 'wine' # A command used to run generated executables.
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[target_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[properties]
c_link_args = ['-static', '-static-libgcc']
# sys_root = Directory that contains 'bin', 'lib', etc for the toolchain and system libraries
sys_root = '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32'
I've added a nasty workaround in f586fe60 - only run the jni
dependency check if javac
and jar
(which we were separately checking for anyway) are found first. Let me know if it works out!
I can confirm it works with commit f586fe6.
Thanks, closing again!
cross compile on ubuntu 22.10 mingw-w64.
https://0x0.st/oWH0.log