fmang / opustags

Ogg Opus tags editor
BSD 3-Clause "New" or "Revised" License
81 stars 11 forks source link

Support the various stat structures across systems #45

Closed fmang closed 3 years ago

fmang commented 3 years ago

Close #44.

@SuperSandro2000 Here! Could you please try to build this and possibly run make check to run the test suite? Thanks!

SuperSandro2000 commented 3 years ago

Now building but make check fails:

these derivations will be built:
  /nix/store/4p18g8jzawjqrblf7ndnvsjswd974akj-opustags-1.5.1.drv
building '/nix/store/4p18g8jzawjqrblf7ndnvsjswd974akj-opustags-1.5.1.drv'...
unpacking sources
unpacking source archive /nix/store/gbbiyd793s21iimmgdgzjr3s8ahfsfpl-source
source root is source
patching sources
applying patch /nix/store/hx2fx2kdvmrk8hrlq7yh1jr0ysdfw3pq-64fc6f8f6d20e034892e89abff0236c85cae98dc.patch
patching file src/cli.cc
patching file src/opustags.h
applying patch /nix/store/zmjssn3lhqbpk438jkl6rac36d250rgr-f98208c1a1d10c15f98b127bbfdf88a7b15b08dc.patch
patching file CMakeLists.txt
patching file src/config.h.in
patching file src/system.cc
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_LOCALEDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/share/doc/opustags -DCMAKE_INSTALL_INFODIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/include -DCMAKE_INSTALL_SBINDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/pb6034qcdyaql95wxgq1v8g0cda7wsd4-cctools-binutils-darwin-949.0.1/bin/strip -DCMAKE_RANLIB=/nix/store/pb6034qcdyaql95wxgq1v8g0cda7wsd4-cctools-binutils-darwin-949.0.1/bin/ranlib -DCMAKE_AR=/nix/store/pb6034qcdyaql95wxgq1v8g0cda7wsd4-cctools-binutils-darwin-949.0.1/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/sll9y88hd02xlv21b3vm6z5v68ki86li-opustags-1.5.1  
-- The CXX compiler identification is Clang 7.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/92cn0gwy4zxzsbhq23rwsr36y6wbd1k8-clang-wrapper-7.1.0/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: pkg-config (found version "0.29.2") 
-- Checking for module 'ogg'
--   Found ogg, version 1.3.4
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Failed
-- Found Iconv: /nix/store/lm769l54d9nnwadg5714gzfi57wfnvpr-libiconv-osx-10.12.6/lib/libiconv.dylib  
-- Looking for C++ include endian.h
-- Looking for C++ include endian.h - not found
-- Looking for C++ include sys/endian.h
-- Looking for C++ include sys/endian.h - not found
-- Performing Test HAVE_STAT_ST_MTIM
-- Performing Test HAVE_STAT_ST_MTIM - Failed
-- Performing Test HAVE_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STAT_ST_MTIMESPEC - Success
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_POLICY_DEFAULT_CMP0025

-- Build files have been written to: /private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/build
cmake: enabled parallel building
building
build flags: -j4 -l4 SHELL=/nix/store/58vsldc9lzkrr0lwiinn84rfz7i5rnik-bash-4.4-p23/bin/bash
Scanning dependencies of target ot
[ 14%] Building CXX object CMakeFiles/ot.dir/src/ogg.cc.o
[ 42%] Building CXX object CMakeFiles/ot.dir/src/opus.cc.o
[ 57%] Building CXX object CMakeFiles/ot.dir/src/system.cc.o
[ 57%] Building CXX object CMakeFiles/ot.dir/src/cli.cc.o
[ 71%] Linking CXX static library libot.a
[ 71%] Built target ot
Scanning dependencies of target opustags
[ 85%] Building CXX object CMakeFiles/opustags.dir/src/opustags.cc.o
[100%] Linking CXX executable opustags
ld: warning: passed two min versions (10.12.0, 10.12) for platform macOS. Using 10.12.
[100%] Built target opustags
running tests
[ 33%] Built target ot
Scanning dependencies of target system.t
[ 40%] Building CXX object t/CMakeFiles/system.t.dir/system.cc.o
[ 46%] Linking CXX executable system.t
ld: warning: passed two min versions (10.12.0, 10.12) for platform macOS. Using 10.12.
[ 46%] Built target system.t
[ 60%] Built target opustags
Scanning dependencies of target ogg.t
[ 66%] Building CXX object t/CMakeFiles/ogg.t.dir/ogg.cc.o
/private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/t/ogg.cc:73:21: error: use of undeclared identifier 'fmemopen'; did you mean 'freopen'?
                ot::file output = fmemopen(my_ogg.data(), my_ogg.size(), "w");
                                  ^~~~~~~~
                                  freopen
/nix/store/q38d9gxss5nl2annjf3dpyn15dvzad2r-Libsystem-osx-10.12.6/include/stdio.h:248:7: note: 'freopen' declared here
FILE    *freopen(const char * __restrict, const char * __restrict,
         ^
/private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/t/ogg.cc:73:30: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::value_type *' (aka 'unsigned char *')
                ot::file output = fmemopen(my_ogg.data(), my_ogg.size(), "w");
                                           ^~~~~~~~~~~~~
/nix/store/q38d9gxss5nl2annjf3dpyn15dvzad2r-Libsystem-osx-10.12.6/include/stdio.h:248:38: note: passing argument to parameter here
FILE    *freopen(const char * __restrict, const char * __restrict,
                                        ^
/private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/t/ogg.cc:89:20: error: use of undeclared identifier 'fmemopen'; did you mean 'freopen'?
                ot::file input = fmemopen(my_ogg.data(), my_ogg_size, "r");
                                 ^~~~~~~~
                                 freopen
/nix/store/q38d9gxss5nl2annjf3dpyn15dvzad2r-Libsystem-osx-10.12.6/include/stdio.h:248:7: note: 'freopen' declared here
FILE    *freopen(const char * __restrict, const char * __restrict,
         ^
/private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/t/ogg.cc:89:29: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::value_type *' (aka 'unsigned char *')
                ot::file input = fmemopen(my_ogg.data(), my_ogg_size, "r");
                                          ^~~~~~~~~~~~~
/nix/store/q38d9gxss5nl2annjf3dpyn15dvzad2r-Libsystem-osx-10.12.6/include/stdio.h:248:38: note: passing argument to parameter here
FILE    *freopen(const char * __restrict, const char * __restrict,
                                        ^
/private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/t/ogg.cc:122:19: error: use of undeclared identifier 'fmemopen'; did you mean 'freopen'?
        ot::file input = fmemopen((void*) err_msg, 20, "r");
                         ^~~~~~~~
                         freopen
/nix/store/q38d9gxss5nl2annjf3dpyn15dvzad2r-Libsystem-osx-10.12.6/include/stdio.h:248:7: note: 'freopen' declared here
FILE    *freopen(const char * __restrict, const char * __restrict,
         ^
/private/var/folders/r4/k85s52jx3555ckj0wty615s00000gp/T/nix-build-opustags-1.5.1.drv-0/source/t/ogg.cc:122:28: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'void *'
        ot::file input = fmemopen((void*) err_msg, 20, "r");
                                  ^~~~~~~~~~~~~~~
/nix/store/q38d9gxss5nl2annjf3dpyn15dvzad2r-Libsystem-osx-10.12.6/include/stdio.h:248:38: note: passing argument to parameter here
FILE    *freopen(const char * __restrict, const char * __restrict,
                                        ^
6 errors generated.
make[3]: *** [t/CMakeFiles/ogg.t.dir/build.make:82: t/CMakeFiles/ogg.t.dir/ogg.cc.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:234: t/CMakeFiles/ogg.t.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:214: t/CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:222: check] Error 2
builder for '/nix/store/4p18g8jzawjqrblf7ndnvsjswd974akj-opustags-1.5.1.drv' failed with exit code 2
error: build of '/nix/store/4p18g8jzawjqrblf7ndnvsjswd974akj-opustags-1.5.1.drv' failed
fmang commented 3 years ago

Alright! Too bad for the test suite. I’ll see if I can find a fmemopen replacement, but I’m not sure it’s worth it. At least the build work now.