alecjacobson/computer-graphics-bounding-volume-hierarchy

CGAL missing

Closed this issue · 13 comments

I get this when compiling cmake:

`-- CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  libigl/shared/cmake/libigl.cmake:25 (find_package)
  CMakeLists.txt:27 (include)


CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  libigl/shared/cmake/libigl.cmake:25 (find_package)
  CMakeLists.txt:27 (include)


-- Could NOT find Boost
-- Could NOT find Matlab (missing:  Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY Matlab_MEX_EXTENSION Matlab_ROOT_DIR MEX_COMPILER MX_LIBRARY ENG_LIBRARY)
-- Could NOT find MOSEK (missing:  MOSEK_LIBRARIES MOSEK_INCLUDE_DIR)
-- Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
-- Creating target: igl::core (igl)
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindOpenGL.cmake:172 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  libigl/shared/cmake/libigl.cmake:316 (find_package)
  CMakeLists.txt:27 (include)`

I tried it on different machines too. Is this problem on my end?

The CGAL errors are a red herring. They are not actually throwing an error (rather a warning. See your output).

The real problem is that you don't seem to have OpenGL installed.

See "Note for linux users" on http://libigl.github.io/libigl/tutorial/#noteforlinuxusers

Thank you! That resolved the issue.

I came across another problem right after and I can't seem to figure out a fix:

Assertion failed: SizeAtCompileTime == Dynamic || SizeAtCompileTime == dim, file c:\users\main\desktop\cs 3rd year\csc418\computer-graphics-bounding-volume-hierarchy\libigl\external\eigen\eigen\src\core\matrix.h, line 241

This happens when I run the executable file in windows. I was initially using the Linux subsystem, so I switched over to visual studio. Here is the output of build.
build.txt

I also encounter some similar issue:
build_release $ cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found libtool - /usr/bin/libtool
-- CGAL not found. Set the CGAL_DIR cmake variable or environment variable to the directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.
CMake Warning at /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindBoost.cmake:577 (message):
Imported targets and dependency information not available for Boost version
(all versions older than 1.33)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
/usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
libigl/shared/cmake/libigl.cmake:25 (find_package)
CMakeLists.txt:27 (include)

CMake Warning at /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindBoost.cmake:577 (message):
Imported targets and dependency information not available for Boost version
(all versions older than 1.33)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES)
/usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES)
libigl/shared/cmake/libigl.cmake:25 (find_package)
CMakeLists.txt:27 (include)

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Could NOT find Boost
CMake Error at /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindMatlab.cmake:1171 (file):
file STRINGS file "/usr/local/texlive/2016/bin/VersionInfo.xml" cannot be
read.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindMatlab.cmake:1433 (_Matlab_get_version_from_root)
libigl/shared/cmake/libigl.cmake:29 (find_package)
CMakeLists.txt:27 (include)

CMake Error at /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindMatlab.cmake:1173 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindMatlab.cmake:1433 (_Matlab_get_version_from_root)
libigl/shared/cmake/libigl.cmake:29 (find_package)
CMakeLists.txt:27 (include)

-- Could NOT find Matlab (missing: Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY Matlab_MEX_EXTENSION MEX_COMPILER MX_LIBRARY ENG_LIBRARY) (found version "unknown")
-- Could NOT find MOSEK (missing: MOSEK_LIBRARIES MOSEK_INCLUDE_DIR)
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework
-- Creating target: igl::core (igl)
-- Creating target: igl::opengl (igl_opengl)
-- Creating target: igl::opengl_glfw (igl_opengl_glfw)
CMake Deprecation Warning at libigl/external/glfw/CMakeLists.txt:10 (cmake_policy):
The OLD behavior for policy CMP0042 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- Could NOT find Vulkan (missing: VULKAN_LIBRARY VULKAN_INCLUDE_DIR)
-- Using Cocoa for window creation
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Creating target: igl::png (igl_png)
-- Configuring incomplete, errors occurred!
See also "/Users/zwx/Desktop/computer-graphics-bounding-volume-hierarchy/build_release/CMakeFiles/CMakeOutput.log".

I solved it by installing the required libraries
brew install glfw3 --HEAD
brew install cgal
brew install glm

just to be clear. You should not have to install glfw3, cgal or glm like this.

cgal and glm are not a required dependencies for this assignment.

glfw3 is, but it is included in the repo and will be built as part of the project.

The errors @Ian729 is getting are confusing to me. They seem to be related to the FindMATLAB routine (matlab is also not a required dependency). Without access, I'm guessing that actually these installs are unrelated to getting it to work and just issuing the cmake command twice gets it to work.

@Ian729 , could you confirm this by issuing

mkdir build-test
cd build-test
cmake ../
# even if the common above throws an error, try again:
cmake ../

Meanwhile, could you also upload the file /usr/local/Cellar/cmake/3.12.2/share/cmake/Modules/FindMatlab.cmake. I don't understand why the error in this file refers to something in your texlive distribution...

Ah, nice. I can reproduce this. It appears to be a bug with the newest version of cmake (3.12). Using 3.10 works. I'll see if anything can be done for 3.12. In the meantime you could:

brew switch cmake 3.10.2

or

brew install https://github.com/Homebrew/homebrew-core/blob/a169609a5dcd5bf0cb83c2d8ffc7da934b3d81fe/Formula/cmake.rb

To get 3.10

Hopefully, this is fixed now. You should issue:

git pull
git submodule update

if it worked correctly then you should see the file:

shared/cmake/FindMATLAB.cmake

(again, matlab is not a dependency, but cmake's default way of determining whether it exists is now broken. So this file will correctly determine whether you have it, and then disregard the answer).

I still get this error: Assertion failed: (reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****", file c:\users\vinay komaravolu\desktop\cs 3rd year\computer-graphics-bounding-volume-hierarchy\libigl\external\eigen\eigen\src\core\densestorage.h, line 86

I've been getting errors one after another for windows visuals studio and spent more time debugging these issues rather than doing the assignment, do you suggest working in virtualbox?

The official suggestion is to work using a CDF machine.

I would definitely not spend hours trying to get this compiled on an unsupported platform. Instead, I would work at CDF. Meanwhile you could ask the TAs for specific help on your home computer setup.

(I'm closing this issue as it's becoming a list of unrelated errors; please post a new issue for specific problems).