AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.75k stars 665 forks source link

Can't build OpenVDB 5.1.0 on macOS 10.13.5 #245

Closed 23d1 closed 4 years ago

23d1 commented 6 years ago

I'm not a software programmer, so I'll not pretend to have deep knowledge of libraries and compilers, but both cmake and make fails to build with the following issues when reaching vdb_view;

[ 32%] Building CXX object openvdb/CMakeFiles/vdb_view.dir/viewer/Camera.cc.o
/Users/a/Desktop/openvdb-5.1.0/openvdb/viewer/Camera.cc:152:5: warning: 'gluPerspective' is deprecated: first deprecated in
      macOS 10.9 - "Use GLKMatrix4MakePerspective" [-Wdeprecated-declarations]
    gluPerspective(mFov, aspectRatio, mNearPlane, mFarPlane);
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:278:13: note: 'gluPerspective' has been explicitly marked deprecated
      here
extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) OPENGL_DEPRECATED_MSG(10_0, 1...
            ^
/Users/a/Desktop/openvdb-5.1.0/openvdb/viewer/Camera.cc:173:5: warning: 'gluLookAt' is deprecated: first deprecated in macOS
      10.9 - "Use GLKMatrix4MakeLookAt" [-Wdeprecated-declarations]
    gluLookAt(mEye[0], mEye[1], mEye[2],
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ...
            ^
2 warnings generated.
[ 32%] Building CXX object openvdb/CMakeFiles/vdb_view.dir/viewer/ClipBox.cc.o
[ 33%] Building CXX object openvdb/CMakeFiles/vdb_view.dir/viewer/Font.cc.o
[ 33%] Building CXX object openvdb/CMakeFiles/vdb_view.dir/viewer/RenderModules.cc.o
/Users/a/Desktop/openvdb-5.1.0/openvdb/viewer/RenderModules.cc:585:5: warning: 'gluLookAt' is deprecated: first deprecated in
      macOS 10.9 - "Use GLKMatrix4MakeLookAt" [-Wdeprecated-declarations]
    gluLookAt(campos[0], campos[1], campos[2], 0.0, 0.0, 0.0, up[0], up[1], up[2]);
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:265:13: note: 'gluLookAt' has been explicitly marked deprecated here
extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ...
            ^
1 warning generated.
[ 34%] Building CXX object openvdb/CMakeFiles/vdb_view.dir/viewer/Viewer.cc.o
[ 35%] Linking CXX executable vdb_view
Undefined symbols for architecture x86_64:
  "_glfwCloseWindow", referenced from:
      openvdb_viewer::ViewerImpl::close() in Viewer.cc.o
      openvdb_viewer::ViewerImpl::getVersionString() const in Viewer.cc.o
  "_glfwGetWindowParam", referenced from:
      openvdb_viewer::ViewerImpl::open(int, int) in Viewer.cc.o
      openvdb_viewer::ViewerImpl::view(std::__1::vector<boost::shared_ptr<openvdb::v5_1abi3::GridBase const>, std::__1::allocator<boost::shared_ptr<openvdb::v5_1abi3::GridBase const> > > const&) in Viewer.cc.o
      openvdb_viewer::ViewerImpl::getVersionString() const in Viewer.cc.o
      openvdb_viewer::ViewerImpl::isOpen() const in Viewer.cc.o
  "_glfwOpenWindow", referenced from:
      openvdb_viewer::ViewerImpl::open(int, int) in Viewer.cc.o
      openvdb_viewer::ViewerImpl::getVersionString() const in Viewer.cc.o
  "_glfwSetMousePosCallback", referenced from:
      openvdb_viewer::ViewerImpl::open(int, int) in Viewer.cc.o
  "_glfwSetMouseWheelCallback", referenced from:
      openvdb_viewer::ViewerImpl::open(int, int) in Viewer.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [openvdb/vdb_view] Error 1
make[1]: *** [openvdb/CMakeFiles/vdb_view.dir/all] Error 2
make: *** [all] Error 2

Would love some light shed on what I'm doing wrong.

Here's what I get in the log when compiling, if that helps;

CMake Deprecation Warning at CMakeLists.txt:76 (MESSAGE):
  OPENVDB_ENABLE_3_ABI_COMPATIBLE is deprecated.  Instead use
  OPENVDB_ABI_VERSION_NUMBER=N, where N is the abi version.

Boost version: 1.67.0
Found the following Boost libraries:
  iostreams
  system
  thread
  regex
  chrono
  date_time
  atomic
Found OpenEXR v2.2 at /usr/local
Boost version: 1.67.0
Found the following Boost libraries:
  python
CMake Warning at openvdb/python/CMakeLists.txt:75 (MESSAGE):
  Assumes the openvdb shared library is one level up

CMake Warning at openvdb/python/CMakeLists.txt:76 (MESSAGE):
  If this is wrong set OpenVDB_LIBRARY_DIR to correct path

Boost version: 1.67.0
Configuring done
WARNING: Target "vdb_render" requests linking to directory "/usr/local".  Targets may link only to libraries.  CMake is dropping the item.
CMake Warning (dev):
  Policy CMP0068 is not set: RPATH settings on macOS do not affect
  install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, the install_name fields for
  the following targets are still affected by RPATH settings:

   openvdb_maya
   pyopenvdb

This warning is for project developers.  Use -Wno-dev to suppress it.

Generating done

While on the subject, any reason for not compiling cross-platform with each release? What I'm specifically after is the Maya 2018 Plugin on macOS.

Idclip commented 4 years ago

Hey @23d1, the CMake for the Maya plugin has been improved over the last few releases. I'm going to close this as it's pretty old (and I'm sorry no one replied) - but please re-open or create a new issue if you try this again with newer releases of VDB.