Skip to content

MacOS build support #39

Description

@EgorOrachyov

Current master version could not be compiled on macOS by gcc or clang (Mac version of clang: 10) because of the following problems:

  1. Use of std c++17 functionality, which was not implemented by Apple in current os release 10.14 Mojave.
    Filesystem usage possibly could be fixed by global.h core/utils modification.

In file included from alignment/camerasCalibration/camerasCalibrationFunc.cpp:1:
In file included from ../../corecvs/core/alignment/camerasCalibration/camerasCalibrationFunc.h:2:
In file included from ../../corecvs/core/function/function.h:15:
../../corecvs/core/utils/global.h:408:12:
fatal error: 'experimental/filesystem' file not found
# include <experimental/filesystem>
^~~~~~~~~~~~~~~~~~~~~~~~~

  1. Use of not standardized functionality from C11. Apple as vendor for macOS do not want
    to support this features. GCC 9 for macOS has own std c++17 headers and compiled libs,
    however C libs and headers could be provided and installed only by Apple.

In file included from alignment/camerasCalibration/camerasCalibrationFunc.cpp:1:
In file included from ../../corecvs/core/alignment/camerasCalibration/camerasCalibrationFunc.h:2:
In file included from ../../corecvs/core/function/function.h:16:
In file included from ../../corecvs/core/math/matrix/matrix.h:17:
In file included from ../../corecvs/core/buffers/abstractBuffer.h:31:
../../corecvs/core/buffers/memory/alignedMemoryBlock.h:22:17:
error: use of undeclared identifier 'aligned_alloc'
mData = aligned_alloc(align, ((size + align - 1) / align) * align);
^

  1. Qmake could not find intel TBB library. However, it is located in usr directory as
    third-party dependency (path: "/usr/local/include/tbb/"). Possibly need to fix mac tbb config.

In file included from alignment/camerasCalibration/camerasCalibrationFunc.cpp:1:
In file included from ../../corecvs/core/alignment/camerasCalibration/camerasCalibrationFunc.h:2:
In file included from ../../corecvs/core/function/function.h:16:
In file included from ../../corecvs/core/math/matrix/matrix.h:17:
In file included from ../../corecvs/core/buffers/abstractBuffer.h:32:
../../corecvs/core/tbbwrapper/tbbWrapper.h:20:10: fatal error: 'tbb/parallel_for.h' file not found
#include <tbb/parallel_for.h>
^~~~~~~~~~~~~~~~~~~~

List of problems above not exhaustive. With this modifications currently I has been able to
compile coresvs/core lib without tests or cloudview.

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