eliemichel / DagAmendment

The official implementation of the research paper "DAG Amendment for Inverse Control of Parametric Shapes"
Other
172 stars 22 forks source link

Macos build failure logs #5

Open fire opened 1 year ago

fire commented 1 year ago

Hope to post some logs, so that others can help.

  1. I had to change the bash script to use python 3.11

  2. Some minor? coding errors.


[ 50%] Building CXX object CMakeFiles/Accel.dir/Accel.cpp.o
/Users/ernest.lee/Documents/DagAmendment/Accel/Accel.cpp:39:35: error: constexpr variable 'version' must be initialized by a constant expression
constexpr std::tuple<int,int,int> version = {1, 0, 0};
                                  ^         ~~~~~~~~~
/Users/ernest.lee/Documents/DagAmendment/Accel/Accel.cpp:39:45: note: non-constexpr constructor 'tuple<int, int, int, 0>' cannot be used in a constant expression
constexpr std::tuple<int,int,int> version = {1, 0, 0};
                                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/tuple:606:5: note: declared here
    tuple(_Up&&... __u)
    ^
/Users/ernest.lee/Documents/DagAmendment/Accel/Accel.cpp:100:41: error: braces around scalar initializer [-Werror,-Wbraced-scalar-init]
        auto proj_triangles = py::array_t<int>({ static_cast<pybind11::ssize_t>(samples_buf.shape[0]) });
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make[2]: *** [CMakeFiles/Accel.dir/Accel.cpp.o] Error 1
make[1]: *** [CMakeFiles/Accel.dir/all] Error 2
make: *** [all] Error 2
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:49 (file):
  file INSTALL cannot find
  "/Users/ernest.lee/Documents/DagAmendment/Accel/build-darwin/Accel.cpython-311-darwin.so":
  No such file or directory.
fire commented 1 year ago
% python3 make_releases.py
-- pybind11 v2.9.2
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/ernest.lee/Documents/DagAmendment/Accel/build-darwin
[100%] Built target Accel
-- Install configuration: "Release"
-- Up-to-date: /Users/ernest.lee/Documents/DagAmendment/Accel/../DagAmendment/Accel.cpython-311-darwin.so
Zipping DagAmendment into releases/DagAmendment-v1.1.0...
Done! You may install in Blender the addon releases/DagAmendment-v1.1.0.zip.
eliemichel commented 1 year ago

Hello!

About constexpr std::tuple<int,int,int> version = {1, 0, 0}, apparently ISO C++ does not require std::tuple constructor to be constexpr, so just replace constexpr by const it's ok.

For auto proj_triangles = py::array_t<int>(...) I guess just remove the braces from this line (sorry, compiler specific thing again, and I don't have a mac to test).

Could you do a Pull Request to share your changes?