vodka2 / vk-music-fs

FUSE file system for VK audios
37 stars 4 forks source link

Build failure on OS X 10.14 Mojave #3

Closed Logunov closed 5 years ago

Logunov commented 5 years ago
ilya@OhGodAMac ~/Dev/vk-music-fs/build [master]× $ cmake --build . --target vk_music_fs
/usr/local/Cellar/cmake/3.13.1/bin/cmake -S/Users/ilya/Dev/vk-music-fs -B/Users/ilya/Dev/vk-music-fs/build --check-build-system CMakeFiles/Makefile.cmake 0
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 vk_music_fs
/usr/local/Cellar/cmake/3.13.1/bin/cmake -S/Users/ilya/Dev/vk-music-fs -B/Users/ilya/Dev/vk-music-fs/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_progress_start /Users/ilya/Dev/vk-music-fs/build/CMakeFiles 90
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 CMakeFiles/vk_music_fs.dir/all
/Library/Developer/CommandLineTools/usr/bin/make -f nowide/CMakeFiles/nowide.dir/build.make nowide/CMakeFiles/nowide.dir/depend
cd /Users/ilya/Dev/vk-music-fs/build && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs /Users/ilya/Dev/vk-music-fs/nowide /Users/ilya/Dev/vk-music-fs/build /Users/ilya/Dev/vk-music-fs/build/nowide /Users/ilya/Dev/vk-music-fs/build/nowide/CMakeFiles/nowide.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f nowide/CMakeFiles/nowide.dir/build.make nowide/CMakeFiles/nowide.dir/build
make[3]: Nothing to be done for `nowide/CMakeFiles/nowide.dir/build'.
[  2%] Built target nowide
/Library/Developer/CommandLineTools/usr/bin/make -f taglib_mod/CMakeFiles/tag.dir/build.make taglib_mod/CMakeFiles/tag.dir/depend
cd /Users/ilya/Dev/vk-music-fs/build && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs /Users/ilya/Dev/vk-music-fs/taglib_mod /Users/ilya/Dev/vk-music-fs/build /Users/ilya/Dev/vk-music-fs/build/taglib_mod /Users/ilya/Dev/vk-music-fs/build/taglib_mod/CMakeFiles/tag.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f taglib_mod/CMakeFiles/tag.dir/build.make taglib_mod/CMakeFiles/tag.dir/build
make[3]: Nothing to be done for `taglib_mod/CMakeFiles/tag.dir/build'.
[ 55%] Built target tag
/Library/Developer/CommandLineTools/usr/bin/make -f cfgpath/CMakeFiles/cfgpath.dir/build.make cfgpath/CMakeFiles/cfgpath.dir/depend
cd /Users/ilya/Dev/vk-music-fs/build && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs /Users/ilya/Dev/vk-music-fs/cfgpath /Users/ilya/Dev/vk-music-fs/build /Users/ilya/Dev/vk-music-fs/build/cfgpath /Users/ilya/Dev/vk-music-fs/build/cfgpath/CMakeFiles/cfgpath.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f cfgpath/CMakeFiles/cfgpath.dir/build.make cfgpath/CMakeFiles/cfgpath.dir/build
[ 56%] Linking CXX static library libcfgpath.a
cd /Users/ilya/Dev/vk-music-fs/build/cfgpath && /usr/local/Cellar/cmake/3.13.1/bin/cmake -P CMakeFiles/cfgpath.dir/cmake_clean_target.cmake
cd /Users/ilya/Dev/vk-music-fs/build/cfgpath && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_link_script CMakeFiles/cfgpath.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/ar qc libcfgpath.a
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
        ar -m [-TLsv] archive file ...
        ar -m [-abiTLsv] position archive file ...
        ar -p [-TLsv] archive [file ...]
        ar -q [-cTLsv] archive file ...
        ar -r [-cuTLsv] archive file ...
        ar -r [-abciuTLsv] position archive file ...
        ar -t [-TLsv] archive [file ...]
        ar -x [-ouTLsv] archive [file ...]
make[3]: *** [cfgpath/libcfgpath.a] Error 1
make[2]: *** [cfgpath/CMakeFiles/cfgpath.dir/all] Error 2
make[1]: *** [CMakeFiles/vk_music_fs.dir/rule] Error 2
make: *** [vk_music_fs] Error 2
vodka2 commented 5 years ago

@Logunov It seems that Clang does not like header-only libraries. You may try applying this patch (git apply patch.txt), but I've never compiled vk_music_fs with Clang, so there may be other errors.

Logunov commented 5 years ago

Патч помог, спасибо! Однако теперь:

ilya@OhGodAMac ~/Dev/vk-music-fs/build [master]× $ cmake --build . --target vk_music_fs
/usr/local/Cellar/cmake/3.13.1/bin/cmake -S/Users/ilya/Dev/vk-music-fs -B/Users/ilya/Dev/vk-music-fs/build --check-build-system CMakeFiles/Makefile.cmake 0
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 vk_music_fs
/usr/local/Cellar/cmake/3.13.1/bin/cmake -S/Users/ilya/Dev/vk-music-fs -B/Users/ilya/Dev/vk-music-fs/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_progress_start /Users/ilya/Dev/vk-music-fs/build/CMakeFiles 86
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 CMakeFiles/vk_music_fs.dir/all
/Library/Developer/CommandLineTools/usr/bin/make -f taglib_mod/CMakeFiles/tag.dir/build.make taglib_mod/CMakeFiles/tag.dir/depend
cd /Users/ilya/Dev/vk-music-fs/build && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs /Users/ilya/Dev/vk-music-fs/taglib_mod /Users/ilya/Dev/vk-music-fs/build /Users/ilya/Dev/vk-music-fs/build/taglib_mod /Users/ilya/Dev/vk-music-fs/build/taglib_mod/CMakeFiles/tag.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f taglib_mod/CMakeFiles/tag.dir/build.make taglib_mod/CMakeFiles/tag.dir/build
make[3]: Nothing to be done for `taglib_mod/CMakeFiles/tag.dir/build'.
[ 55%] Built target tag
/Library/Developer/CommandLineTools/usr/bin/make -f nowide/CMakeFiles/nowide.dir/build.make nowide/CMakeFiles/nowide.dir/depend
cd /Users/ilya/Dev/vk-music-fs/build && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs /Users/ilya/Dev/vk-music-fs/nowide /Users/ilya/Dev/vk-music-fs/build /Users/ilya/Dev/vk-music-fs/build/nowide /Users/ilya/Dev/vk-music-fs/build/nowide/CMakeFiles/nowide.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f nowide/CMakeFiles/nowide.dir/build.make nowide/CMakeFiles/nowide.dir/build
make[3]: Nothing to be done for `nowide/CMakeFiles/nowide.dir/build'.
[ 58%] Built target nowide
/Library/Developer/CommandLineTools/usr/bin/make -f src/CMakeFiles/vk_music_fs_lib.dir/build.make src/CMakeFiles/vk_music_fs_lib.dir/depend
cd /Users/ilya/Dev/vk-music-fs/build && /usr/local/Cellar/cmake/3.13.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs /Users/ilya/Dev/vk-music-fs/src /Users/ilya/Dev/vk-music-fs/build /Users/ilya/Dev/vk-music-fs/build/src /Users/ilya/Dev/vk-music-fs/build/src/CMakeFiles/vk_music_fs_lib.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f src/CMakeFiles/vk_music_fs_lib.dir/build.make src/CMakeFiles/vk_music_fs_lib.dir/build
[ 59%] Building CXX object src/CMakeFiles/vk_music_fs_lib.dir/net/HttpStream.cpp.o
cd /Users/ilya/Dev/vk-music-fs/build/src && /Library/Developer/CommandLineTools/usr/bin/c++  -DHAVE_CONFIG_H -DTAGLIB_STATIC -I/Users/ilya/Dev/vk-music-fs/src -I/Users/ilya/Dev/vk-music-fs/json -I/Users/ilya/Dev/vk-music-fs/cfgpath -I/Users/ilya/Dev/vk-music-fs/boost-nowide -I/Users/ilya/Dev/vk-music-fs/cpp-lru-cache-mod -I/Users/ilya/Dev/vk-music-fs/taglib_mod -I/Users/ilya/Dev/vk-music-fs/taglib_mod/toolkit -I/Users/ilya/Dev/vk-music-fs/taglib_mod/mpeg -I/Users/ilya/Dev/vk-music-fs/taglib_mod/mpeg/id3v2 -I/Users/ilya/Dev/vk-music-fs/taglib_mod/mpeg/id3v2/frames -I/Users/ilya/Dev/vk-music-fs/taglib_mod/mpeg/id3v1 -I/Users/ilya/Dev/vk-music-fs/taglib_mod/3rdparty -I/Users/ilya/Dev/vk-music-fs/di/extension/include -I/Users/ilya/Dev/vk-music-fs/di/include -I/Users/ilya/Dev/vk-music-fs/nowide/include -isystem /usr/local/opt/openssl/include  --std=gnu++17  -s -O3 -DNDEBUG   -o CMakeFiles/vk_music_fs_lib.dir/net/HttpStream.cpp.o -c /Users/ilya/Dev/vk-music-fs/src/net/HttpStream.cpp
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
In file included from /Users/ilya/Dev/vk-music-fs/src/net/HttpStream.cpp:1:
/Users/ilya/Dev/vk-music-fs/src/net/HttpStream.h:19:13: error: no template named 'optional' in namespace 'std'; did you mean 'boost::optional'?
            std::optional<ByteVect> read();
            ^~~~~~~~~~~~~
            boost::optional
/usr/local/include/boost/optional/optional.hpp:843:7: note: 'boost::optional' declared here
class optional
      ^
/Users/ilya/Dev/vk-music-fs/src/net/HttpStream.cpp:11:1: error: no template named 'optional' in namespace 'std'; did you mean 'boost::optional'?
std::optional<ByteVect> HttpStream::read() {
^~~~~~~~~~~~~
boost::optional
/usr/local/include/boost/optional/optional.hpp:843:7: note: 'boost::optional' declared here
class optional
      ^
/Users/ilya/Dev/vk-music-fs/src/net/HttpStream.cpp:14:25: error: no member named 'nullopt' in namespace 'std'
            return std::nullopt;
                   ~~~~~^
3 errors generated.
make[3]: *** [src/CMakeFiles/vk_music_fs_lib.dir/net/HttpStream.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/vk_music_fs_lib.dir/all] Error 2
make[1]: *** [CMakeFiles/vk_music_fs.dir/rule] Error 2
make: *** [vk_music_fs] Error 2

В linux-окружении похожие ошибки. Собираю согласно инструкции. Чем лучше собирать?

vodka2 commented 5 years ago

@Logunov всё-таки не совсем по инструкции

GCC compiler must support C++17

А компилятор той версии, которой вы собираете, как видно из ошибки, не поддерживает std::optional. Я попробовал, современные версии Clang и GCC собирают программу нормально.

У вас есть возможность обновиться? Если нет, я могу попробовать заменить этот класс на boost::optional, но может ещё что-то вылезти.

Logunov commented 5 years ago

Извиняюсь, не заметил, что подхватилась старая версия компилятора. Переключение на g++8 помогло, однако теперь падает на:

/usr/local/Cellar/cmake/3.13.2/bin/cmake -S/Users/ilya/Dev/vk-music-fs-master -B/Users/ilya/Dev/vk-music-fs-master/build --check-build-system CMakeFiles/Makefile.cmake 0
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 vk_music_fs
/usr/local/Cellar/cmake/3.13.2/bin/cmake -S/Users/ilya/Dev/vk-music-fs-master -B/Users/ilya/Dev/vk-music-fs-master/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_progress_start /Users/ilya/Dev/vk-music-fs-master/build/CMakeFiles 86
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 CMakeFiles/vk_music_fs.dir/all
/Library/Developer/CommandLineTools/usr/bin/make -f nowide/CMakeFiles/nowide.dir/build.make nowide/CMakeFiles/nowide.dir/depend
/Library/Developer/CommandLineTools/usr/bin/make -f taglib_mod/CMakeFiles/tag.dir/build.make taglib_mod/CMakeFiles/tag.dir/depend
cd /Users/ilya/Dev/vk-music-fs-master/build && /usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs-master /Users/ilya/Dev/vk-music-fs-master/nowide /Users/ilya/Dev/vk-music-fs-master/build /Users/ilya/Dev/vk-music-fs-master/build/nowide /Users/ilya/Dev/vk-music-fs-master/build/nowide/CMakeFiles/nowide.dir/DependInfo.cmake --color=
cd /Users/ilya/Dev/vk-music-fs-master/build && /usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs-master /Users/ilya/Dev/vk-music-fs-master/taglib_mod /Users/ilya/Dev/vk-music-fs-master/build /Users/ilya/Dev/vk-music-fs-master/build/taglib_mod /Users/ilya/Dev/vk-music-fs-master/build/taglib_mod/CMakeFiles/tag.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f nowide/CMakeFiles/nowide.dir/build.make nowide/CMakeFiles/nowide.dir/build
/Library/Developer/CommandLineTools/usr/bin/make -f taglib_mod/CMakeFiles/tag.dir/build.make taglib_mod/CMakeFiles/tag.dir/build
make[3]: Nothing to be done for `nowide/CMakeFiles/nowide.dir/build'.
make[3]: Nothing to be done for `taglib_mod/CMakeFiles/tag.dir/build'.
[  5%] Built target nowide
[ 58%] Built target tag
/Library/Developer/CommandLineTools/usr/bin/make -f src/CMakeFiles/vk_music_fs_lib.dir/build.make src/CMakeFiles/vk_music_fs_lib.dir/depend
cd /Users/ilya/Dev/vk-music-fs-master/build && /usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs-master /Users/ilya/Dev/vk-music-fs-master/src /Users/ilya/Dev/vk-music-fs-master/build /Users/ilya/Dev/vk-music-fs-master/build/src /Users/ilya/Dev/vk-music-fs-master/build/src/CMakeFiles/vk_music_fs_lib.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f src/CMakeFiles/vk_music_fs_lib.dir/build.make src/CMakeFiles/vk_music_fs_lib.dir/build
make[3]: Nothing to be done for `src/CMakeFiles/vk_music_fs_lib.dir/build'.
[ 97%] Built target vk_music_fs_lib
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/vk_music_fs.dir/build.make CMakeFiles/vk_music_fs.dir/depend
cd /Users/ilya/Dev/vk-music-fs-master/build && /usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ilya/Dev/vk-music-fs-master /Users/ilya/Dev/vk-music-fs-master /Users/ilya/Dev/vk-music-fs-master/build /Users/ilya/Dev/vk-music-fs-master/build /Users/ilya/Dev/vk-music-fs-master/build/CMakeFiles/vk_music_fs.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/vk_music_fs.dir/build.make CMakeFiles/vk_music_fs.dir/build
[ 98%] Linking CXX executable vk_music_fs
/usr/local/Cellar/cmake/3.13.2/bin/cmake -E cmake_link_script CMakeFiles/vk_music_fs.dir/link.txt --verbose=1
/usr/local/bin/g++-8   --std=gnu++17  -s -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/vk_music_fs.dir/main.cpp.o  -o vk_music_fs src/libvk_music_fs_lib.a /usr/local/lib/libfuse.dylib taglib_mod/libtag.a nowide/libnowide.a /usr/lib/libz.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_filesystem-mt.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_thread-mt.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_program_options-mt.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_system-mt.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_chrono-mt.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_date_time-mt.dylib /usr/local/Cellar/boost/1.68.0/lib/libboost_atomic-mt.dylib /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
  "_FSFindFolder", referenced from:
      get_user_config_folder(char*, unsigned int, char const*) [clone .constprop.379] in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "_FSRefMakePath", referenced from:
      get_user_config_folder(char*, unsigned int, char const*) [clone .constprop.379] in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::filesystem::path::imbue(std::locale const&)", referenced from:
      _main in main.cpp.o
  "boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::validation_error::get_template[abi:cxx11](boost::program_options::validation_error::kind_t)", referenced from:
      boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::basic_parsed_options<char> boost::program_options::parse_config_file<char>(std::basic_istream<char, std::char_traits<char> >&, boost::program_options::options_description const&, bool)", referenced from:
      vk_music_fs::ProgramOptions::ProgramOptions(unsigned int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)", referenced from:
      vk_music_fs::ProgramOptions::ProgramOptions(unsigned int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      void boost::program_options::validate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, int) [clone .constprop.372] [clone .cold.390] in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      void boost::program_options::validate<unsigned int, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, unsigned int*, long) [clone .constprop.371] [clone .cold.391] in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::error_with_option_name::error_with_option_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from:
      boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::arg[abi:cxx11]", referenced from:
      boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::name() const in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      boost::program_options::typed_value<unsigned int, char>::name[abi:cxx11]() const in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      boost::program_options::typed_value<bool, char>::name[abi:cxx11]() const in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      boost::program_options::typed_value<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, char>::name() const in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)", referenced from:
      boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int)", referenced from:
      boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      void boost::program_options::validate<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, int) [clone .constprop.372] in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool*, int)", referenced from:
      boost::program_options::typed_value<bool, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::operator<<(std::basic_ostream<char, std::char_traits<char> >&, boost::program_options::options_description const&)", referenced from:
      vk_music_fs::ProgramOptions::ProgramOptions(unsigned int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::abstract_variables_map::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const", referenced from:
      vk_music_fs::ProgramOptions::parseCommonOptions(boost::program_options::variables_map&)         in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vk_music_fs::ProgramOptions::parseOptions(boost::program_options::variables_map&)         in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vk_music_fs::ProgramOptions::ProgramOptions(unsigned int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const", referenced from:
      vtable for boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> > in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::exception_detail::error_info_injector<boost::program_options::validation_error> in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::validation_error> > in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::program_options::validation_error in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::program_options::invalid_option_value in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
  "boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const", referenced from:
      vtable for boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char> in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::program_options::typed_value<unsigned int, char> in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::program_options::typed_value<bool, char> in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
      vtable for boost::program_options::typed_value<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, char> in libvk_music_fs_lib.a(ProgramOptions.cpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[3]: *** [vk_music_fs] Error 1
make[2]: *** [CMakeFiles/vk_music_fs.dir/all] Error 2
make[1]: *** [CMakeFiles/vk_music_fs.dir/rule] Error 2
make: *** [vk_music_fs] Error 2
vodka2 commented 5 years ago

@Logunov ошибки специфические для OS X, где я даже не могу протестировать... Первую ошибку с FSFindFolder и FSRefMakePath может исправить patch2.txt. Остальные ошибки, наверно, возникли из-за того, что boost скомпилирован другим компилятором или с другой стандартной библиотекой С++, судя по ответу на SO. По крайней мере, в команде компоновки библиотеки Boost есть: /usr/local/Cellar/boost/1.68.0/lib/libboost_program_options-mt.dylib.

Если ничего не получится, на днях попробую установить себе OS X в Virtual Box и посмотреть, в чём дело.

vodka2 commented 5 years ago

@Logunov внёс изменения в ветку dev, чтобы программа компилировалась и запускалась в OS X. Образа Mojave так сразу не нашёл, но в El Capitan всё работает. Не могли бы вы попробовать ещё раз?

Если снова вылезет та ошибка с boost, попробуйте перекомпилировать его с помощью gcc: brew install boost --cc=gcc-8

Logunov commented 5 years ago

Да, помогло, спасибо! На 10.14 собралось вот так:

 [dev]× $ brew install --cc=gcc-8 boost
 [dev]× $ set -gx CXX "/usr/local/bin/g++-8"
 [dev]× $ set -gx CC "/usr/local/bin/gcc-8"
 [dev]× $ git diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54fa08f..dc476be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,8 @@
 cmake_minimum_required(VERSION 3.7)
 project(vk_music_fs)

+include_directories(/usr/local/Cellar/boost/1.68.0/include)
+
 option(ENABLE_TESTS "Enable tests" OFF)

 set(OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS})

 [dev]× $ cmake .. -DCMAKE_BUILD_TYPE=Release
 [dev]× $ cmake --build . --target vk_music_fs -- -j 5