media-autobuild_suite icon indicating copy to clipboard operation
media-autobuild_suite copied to clipboard

rubberband git head removed configure, now uses only meson

Open hydra3333 opened this issue 3 years ago • 10 comments

Hello. I noticed that rubberband git head has removed configure, and now uses only meson.

Perhaps the MABS build system could be updated to reflect it ?

hydra3333 avatar Mar 16 '21 23:03 hydra3333

Don't think we can as upstream does some stuff that isn't really compatible with mingw-w64's naming scheme and I don't want to have to worry about tracing issues that might arrive from that nor want to spend the time modifying their meson files just to get it to work atm nor do I want to try to figure out if how to contribute to their repository as they seem to use mercurial (I don't want to have to re-add merciural support back) with sourcehut that doesn't seem to have any obvious indication on how to contribute and have a github mirror but they take pull requests there?

https://hg.sr.ht/~breakfastquay/rubberband/browse/meson.build?rev=tip#L358 https://hg.sr.ht/~breakfastquay/rubberband https://github.com/breakfastquay/rubberband/pulls

1480c1 avatar Mar 17 '21 01:03 1480c1

Unless someone else is willing to do that, I personally don't really want to put forth that effort

1480c1 avatar Mar 17 '21 01:03 1480c1

as a current note, this is the output of ninja install

Running install in rubberband-git
[0/1] Installing files.
Installing rubberband-static.lib to D:/media-autobuild_suite/local64/lib
Installing librubberband-2.dll to D:/media-autobuild_suite/local64/bin
Installing librubberband.dll.a to D:/media-autobuild_suite/local64/lib
Installing rubberband-program.exe to D:/media-autobuild_suite/local64/bin
Installing D:/media-autobuild_suite/build/rubberband-git/rubberband/RubberBandStretcher.h to D:/media-autobuild_suite/local64/include/rubberband
Installing D:/media-autobuild_suite/build/rubberband-git/rubberband/rubberband-c.h to D:/media-autobuild_suite/local64/include/rubberband
Installing D:/media-autobuild_suite/build/rubberband-git/build-64bit/meson-private/rubberband.pc to D:/media-autobuild_suite/local64/lib/pkgconfig

1480c1 avatar Mar 17 '21 01:03 1480c1

You got it to build? I tried a variation of deadsiz27's mingw64 cross-compile build script with a few new options, and got errors which I ignored and gave up. Maybe I'll take another look.

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 --backend=ninja 
-Dfft=fftw -Dresampler=libsamplerate -Dno_shared=true 
--buildtype=release --cross-file=/home/u/Desktop/_working/workdir/meson_environment.txt ./ ..' 
in 
'/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'

The Meson build system
Version: 0.55.3
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
Using 'PKG_CONFIG_PATH' from environment with value: '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig'
Project name: Rubber Band Library
Project version: 1.9.1
C compiler for the build machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the build machine: cc ld.bfd 2.34
C++ compiler for the build machine: c++ (gcc 9.3.0 "c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C++ linker for the build machine: c++ ld.bfd 2.34
Using 'CFLAGS' from environment with value: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
Using 'LDFLAGS' from environment with value: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
Using 'CPPFLAGS' from environment with value: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 10.1.0 "x86_64-w64-mingw32-gcc (GCC) 10.1.0")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.35
Using 'CXXFLAGS' from environment with value: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
Using 'LDFLAGS' from environment with value: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
Using 'CPPFLAGS' from environment with value: '  -O3  -fstack-protector-all  -D_FORTIFY_SOURCE=2  '
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 10.1.0 "x86_64-w64-mingw32-g++ (GCC) 10.1.0")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.35
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)
Using 'PKG_CONFIG_PATH' from environment with value: '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig'
Run-time dependency fftw3 found: YES 3.3.9
Using 'PKG_CONFIG_PATH' from environment with value: '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig'
Run-time dependency samplerate found: YES 0.2.1
Using 'PKG_CONFIG_PATH' from environment with value: '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig'
Run-time dependency sndfile found: YES 1.0.31
Using 'PKG_CONFIG_PATH' from environment with value: '/home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/pkgconfig'
Run-time dependency vamp-sdk found: YES 2.9
Run-time dependency threads found: YES
Has header "ladspa.h" : 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: no_shared option set
Message: Not building Java Native Interface: jni.h header not found
Message: Will build LADSPA plugin
Message: Will build Vamp plugin
Message: Will build command-line utility
Build targets in project: 4

Rubber Band Library 1.9.1

  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
          Shared library: NO
             JNI library: NO
           LADSPA plugin: YES
                          Name: ladspa-rubberband
             Vamp plugin: YES
                          Name: vamp-rubberband
    Command-line utility: YES
                          Name: rubberband


[19:29:02][DEBUG] Running 'ninja -j 6 ' in '/home/u/Desktop/_working/workdir/x86_64/rubberband_git/build'
[1/28] Compiling C++ object librubberband.a.p/src_RubberBandStretcher.cpp.obj
FAILED: librubberband.a.p/src_RubberBandStretcher.cpp.obj 
x86_64-w64-mingw32-g++ -Ilibrubberband.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 -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -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 -DUSE_PTHREADS -DHAVE_POSIX_MEMALIGN -MD -MQ librubberband.a.p/src_RubberBandStretcher.cpp.obj -MF librubberband.a.p/src_RubberBandStretcher.cpp.obj.d -o librubberband.a.p/src_RubberBandStretcher.cpp.obj -c ../src/RubberBandStretcher.cpp
In file included from ../src/dsp/Window.h:33,
                 from ../src/StretcherImpl.h:29,
                 from ../src/RubberBandStretcher.cpp:24:
../src/system/Allocators.h:59:10: fatal error: sys/mman.h: No such file or directory
   59 | #include <sys/mman.h>
      |          ^~~~~~~~~~~~
compilation terminated.
[2/28] Compiling C++ object librubberband.a.p/src_StretcherProcess.cpp.obj
FAILED: librubberband.a.p/src_StretcherProcess.cpp.obj 
x86_64-w64-mingw32-g++ -Ilibrubberband.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 -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++14 -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 -DUSE_PTHREADS -DHAVE_POSIX_MEMALIGN -MD -MQ librubberband.a.p/src_StretcherProcess.cpp.obj -MF librubberband.a.p/src_StretcherProcess.cpp.obj.d -o librubberband.a.p/src_StretcherProcess.cpp.obj -c ../src/StretcherProcess.cpp
In file included from ../src/dsp/Window.h:33,
                 from ../src/StretcherImpl.h:29,
                 from ../src/StretcherProcess.cpp:24:
../src/system/Allocators.h:59:10: fatal error: sys/mman.h: No such file or directory
   59 | #include <sys/mman.h>
      |          ^~~~~~~~~~~~
compilation terminated.
[3/28] Compiling C++ object librubberband.a.p/src_rubberband-c.cpp.obj
[4/28] Compiling C++ object librubberband.a.p/src_dsp_AudioCurveCalculator.cpp.obj
[5/28] Compiling C++ object librubberband.a.p/src_StretchCalculator.cpp.obj
[6/28] Compiling C++ object librubberband.a.p/src_base_Profiler.cpp.obj
ninja: build stopped: subcommand failed.

hydra3333 avatar Mar 17 '21 02:03 hydra3333

Hmm, I'm not entirely familiar with cross-compiling but the define guards for that header is HAVE_POSIX_MEMALIGN and that is defined if

#ifndef HAVE_POSIX_MEMALIGN
#ifndef _WIN32
#ifndef __APPLE__
#ifndef LACK_POSIX_MEMALIGN
#define HAVE_POSIX_MEMALIGN
#endif
#endif
#endif
#endif

so the ifndef _WIN32 should have caught it and not defined it

1480c1 avatar Mar 17 '21 02:03 1480c1

Thanks. sudo apt install -y libc6-dev with -Dextra_include_dirs=/usr/include,/usr/include/x86_64-linux-gnu got rid of that error, however the cascade of errors just continues from there, fix one and the next pops up ...

I guess MABS isn't the place to discuss it - I do not want to discontent-ize the inimitable 1480c1 so perhaps I'll leave it be affixed at working commit 57d680a8e3a6523a4151315f99dfa7fa60260c7e

hydra3333 avatar Mar 17 '21 03:03 hydra3333

Thanks. sudo apt install -y libc6-dev with -Dextra_include_dirs=/usr/include,/usr/include/x86_64-linux-gnu got rid of that error, however the cascade of errors just continues from there, fix one and the next pops up ...

This is probably not what you want since that mixes linux and glibc headers with mingw-w64 which does not use the others

you might want to report that upstream that cross-compilation isn't necessarily working clean, although I would first ask deadsix27 if his script does anything special that might make it miscompile, although based on https://github.com/DeadSix27/python_cross_compile_script#-----------work-stalled-for-now----------- it seems you might get a delayed response

1480c1 avatar Mar 17 '21 04:03 1480c1

Eek, thank you for that advice.

hydra3333 avatar Mar 17 '21 06:03 hydra3333

Fixed in breakfastquay/rubberband@109c321370e092a5659d03ee2d9f30669f794f2b ?

nanake avatar Apr 21 '21 23:04 nanake

I can try to relook at this after finals are over

1480c1 avatar May 03 '21 17:05 1480c1