Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Compile fail on macOS Catalina 10.15.6 - no namespace std::filesystem #251

Description

@thefrostysnowman

After following the Mac build steps, make is failing with the following:

.../waifu2x-converter-cpp/src/modelHandler_OpenCL.cpp:54:16: error: no namespace named 'filesystem' in namespace 'std'; did you mean std::__fs::filesystem'?
namespace fs = std::filesystem;
               ^~~~~~~~~~~~~~~
               std::__fs::filesystem
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:259:1: note: namespace 'std::__fs::filesystem' defined here
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
^
/usr/local/opt/llvm/bin/../include/c++/v1/__config:790:58: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM'
  _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
                                                         ^

By commenting out the offending line the build succeeded and Waifu2x works as expected. It appears the fs definition can be defined out for Mac?

Make specified this information about my machine:

-- Found git, set version to: v5.3.3 (master-e7de04d)
-- System is: Darwin (Apple)
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) 
-- CUDA not found. disabled.
-- 
-- Config summary:
-- 	OpenCV: 4.4.0
-- 	OpenCL: 1.2
-- 	CUDA: Not found
-- 	Unicode: TRUE
-- 	Installing models to: /usr/local/share/waifu2x-converter-cpp
-- 	Not building test binaries
-- 	Building for: Unix Makefiles-x86_64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions