ffmpegfs
ffmpegfs copied to clipboard
make error on macos
make version: GNU Make 3.81 built for i386-apple-darwin11.3.0
run make
and get these error:
clang: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
In file included from ffmpegfs.cc:54:
In file included from ./ffmpegfs.h:116:
./ffmpeg_utils.h:283:18: error: too few template arguments for class template 'map'
typedef std::map<SAMPLE_FMT, const FORMAT> FORMAT_MAP; /**< @brief Map of formats. One entry per format derivative. */
^
/Applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:55:66: note: template is declared here
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
In file included from ffmpegfs.cc:54:
In file included from ./ffmpegfs.h:116:
./ffmpeg_utils.h:393:18: error: too few template arguments for class template 'map'
typedef std::map<FILETYPE, const Format_Options> OPTIONS_MAP; /**< @brief Map of options. One entry per supported destination type. */
^
/Applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:55:66: note: template is declared here
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
In file included from ffmpegfs.cc:54:
In file included from ./ffmpegfs.h:116:
./ffmpeg_utils.h:1026:15: error: too few template arguments for class template 'map'
typename std::map<const std::string, const T, comp>::const_iterator search_by_value(const std::map<const std::string, const T, comp> & mapOfWords, T value)
^
/Applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:55:66: note: template is declared here
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
In file included from ffmpegfs.cc:54:
In file included from ./ffmpegfs.h:116:
./ffmpeg_utils.h:1026:96: error: too few template arguments for class template 'map'
typename std::map<const std::string, const T, comp>::const_iterator search_by_value(const std::map<const std::string, const T, comp> & mapOfWords, T value)
^
/Applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:55:66: note: template is declared here
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
In file included from ffmpegfs.cc:54:
In file included from ./ffmpegfs.h:116:
./ffmpeg_utils.h:1028:19: error: too few template arguments for class template 'map'
typename std::map<const std::string, const T, comp>::const_iterator it = mapOfWords.cbegin();
^
/Applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:55:66: note: template is declared here
template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
In file included from ffmpegfs.cc:54:
In file included from ./ffmpegfs.h:116:
./ffmpeg_utils.h:1086:24: error: implicit instantiation of undefined template 'std::basic_ostringstream<char>'
std::ostringstream stream;
^
/Applications/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:131:32: note: template is declared here
class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
^
ffmpegfs.cc:58:10: fatal error: 'sys/sysinfo.h' file not found
#include <sys/sysinfo.h>
^~~~~~~~~~~~~~~
7 errors generated.
make[2]: *** [ffmpegfs.o] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
I never compiled under MacOS...
- looks like a compiler version problem. Which compiler do you use and which version?
too few template arguments for class template 'map'"
- seems that the sysinfo,h header is missing:
fatal error: 'sys/sysinfo.h' file not found
This header does not exist on MacOS:
https://stackoverflow.com/questions/12523704/mac-os-x-equivalent-header-file-for-sysinfo-h-in-linux
The only reason it is needed is to get the number of CPU cores. You could use sysctl to get them using the HW_NCPU parameter.
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/sysctl.3.html
To get things compiled fast you could simply set the number of cores manually.
gcc version:
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Applications/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
and more error:
ffmpegfs.cc:867:41: error: no matching function for call to 'search_by_value'
SAMPLE_FMT_MAP::const_iterator it = search_by_value(sample_fmt_map, sample_fmt);
^~~~~~~~~~~~~~~
ffmpegfs.cc:1242:41: error: no matching function for call to 'search_by_value'
AUDIOCODEC_MAP::const_iterator it = search_by_value(audiocodec_map, audio_codec);
^~~~~~~~~~~~~~~
ffmpegfs.cc:1252:41: error: no matching function for call to 'search_by_value'
AUDIOCODEC_MAP::const_iterator it = search_by_value(videocodec_map, video_codec);
^~~~~~~~~~~~~~~
ffmpegfs.cc:1262:39: error: no matching function for call to 'search_by_value'
AUTOCOPY_MAP::const_iterator it = search_by_value(autocopy_map, autocopy);
^~~~~~~~~~~~~~~
ffmpegfs.cc:1308:41: error: no matching function for call to 'search_by_value'
RECODESAME_MAP::const_iterator it = search_by_value(recode_map, recode);
^~~~~~~~~~~~~~~
ffmpegfs.cc:1354:38: error: no matching function for call to 'search_by_value'
PROFILE_MAP::const_iterator it = search_by_value(profile_map, profile);
^~~~~~~~~~~~~~~
ffmpegfs.cc:1402:36: error: no matching function for call to 'search_by_value'
LEVEL_MAP::const_iterator it = search_by_value(level_map, level);
Apple clang version 15.0.0 (clang-1500.0.40.1)
Until now, I built with clang 14.0.6, I just tried with 15.0.6 also, the build went trough fine. Of course the AMD/Intel Version, but the headers should be the same for ARM or AMD/Intel. The only ARM machines I have are Raspberry Pies, I also built with clang 15 successfully.
Sorry but I can't help you out with MacOS.
and more error:
ffmpegfs.cc:867:41: error: no matching function for call to 'search_by_value' SAMPLE_FMT_MAP::const_iterator it = search_by_value(sample_fmt_map, sample_fmt); ^~~~~~~~~~~~~~~ ffmpegfs.cc:1242:41: error: no matching function for call to 'search_by_value' AUDIOCODEC_MAP::const_iterator it = search_by_value(audiocodec_map, audio_codec); ^~~~~~~~~~~~~~~
Do you have a link to the documentation of your std::map version? too few template arguments for class template 'map'
seems that your implementation does not have the same set of parameters.