wjakob / nanogui

Minimalistic GUI library for OpenGL
Other
4.66k stars 608 forks source link

Build fails in mac os x. #79

Closed stavenko closed 8 years ago

stavenko commented 8 years ago

Hello. Just tryed to build nanogui in mac os X 10.10.5.

Here's what I got:

$ cmake ../nanogui/
-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Using Cocoa for window creation
-- Using NSGL for context creation
-- Building GLFW only for the native architecture
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- Performing Test HAS_CPP11_FLAG
-- Performing Test HAS_CPP11_FLAG - Success
-- Performing Test HAS_LTO_FLAG
-- Performing Test HAS_LTO_FLAG - Success
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10") 
CMake Error at CMakeLists.txt:311 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  glfw_objects

Any clues how to build this?

wjakob commented 8 years ago

Cannot reproduce (and the CI bots can build the latest revision just fine). I assume the issue is fixed with a clean recursive checkout of the latest version -- feel free to reopen if it isn't.

stavenko commented 8 years ago

Last version builds fine at my linux machine, but I just made a fresh checkout with same result. Here's my bash commands and outputs... Sorry for so much texts.

192:projects azl$ git clone https://github.com/wjakob/nanogui
Cloning into 'nanogui'...
remote: Counting objects: 1594, done.
remote: Compressing objects: 100% (83/83), done.
remote: Total 1594 (delta 39), reused 0 (delta 0), pack-reused 1506
Receiving objects: 100% (1594/1594), 3.77 MiB | 809.00 KiB/s, done.
Resolving deltas: 100% (1044/1044), done.
Checking connectivity... done.
192:projects azl$ cd nanogui/
192:nanogui azl$ git submodule update --init --remote --recursive
Submodule 'eigen' (https://github.com/libigl/eigen.git) registered for path 'ext/eigen'
Submodule 'glfw' (https://github.com/wjakob/glfw) registered for path 'ext/glfw'
Submodule 'nanovg' (https://github.com/wjakob/nanovg) registered for path 'ext/nanovg'
Submodule 'ext/pybind' (https://github.com/wjakob/pybind11) registered for path 'ext/pybind11'
Cloning into '/Users/azl/projects/nanogui/ext/eigen'...
remote: Counting objects: 1647, done.
remote: Total 1647 (delta 0), reused 0 (delta 0), pack-reused 1647
Receiving objects: 100% (1647/1647), 1.82 MiB | 903.00 KiB/s, done.
Resolving deltas: 100% (439/439), done.
Checking connectivity... done.
Submodule path 'ext/eigen': checked out '9e1aab819727bb32747f77afe5befd49d83fa7b3'
Cloning into '/Users/azl/projects/nanogui/ext/glfw'...
remote: Counting objects: 18463, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 18463 (delta 7), reused 0 (delta 0), pack-reused 18448
Receiving objects: 100% (18463/18463), 8.73 MiB | 1.49 MiB/s, done.
Resolving deltas: 100% (12417/12417), done.
Checking connectivity... done.
Submodule path 'ext/glfw': checked out 'f6ec835599123c3c970d34534ed7ddc69a1fc6af'
Cloning into '/Users/azl/projects/nanogui/ext/nanovg'...
remote: Counting objects: 1246, done.
remote: Total 1246 (delta 0), reused 0 (delta 0), pack-reused 1246
Receiving objects: 100% (1246/1246), 1.92 MiB | 1.02 MiB/s, done.
Resolving deltas: 100% (866/866), done.
Checking connectivity... done.
Submodule path 'ext/nanovg': checked out '9835badb8cf6d0da7bd008932da760deba6ef5ae'
Cloning into '/Users/azl/projects/nanogui/ext/pybind11'...
remote: Counting objects: 2965, done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 2965 (delta 9), reused 0 (delta 0), pack-reused 2937
Receiving objects: 100% (2965/2965), 1.06 MiB | 658.00 KiB/s, done.
Resolving deltas: 100% (1900/1900), done.
Checking connectivity... done.
Submodule path 'ext/pybind11': checked out '2353b9b8fa3dfc91b50b8ba9ddaa41fe166c5360'
Submodule 'tools/clang' (https://github.com/wjakob/clang-cindex-python3) registered for path 'ext/pybind11/tools/clang'
Cloning into '/Users/azl/projects/nanogui/ext/pybind11/tools/clang'...
remote: Counting objects: 344, done.
remote: Total 344 (delta 0), reused 0 (delta 0), pack-reused 344
Receiving objects: 100% (344/344), 112.86 KiB | 0 bytes/s, done.
Resolving deltas: 100% (144/144), done.
Checking connectivity... done.
Submodule path 'ext/pybind11/tools/clang': checked out '6019712fe4dc4cfc16df992d2dc874acc1b907c1'
192:nanogui azl$ mkdir build
192:nanogui azl$ cd build/
192:build azl$ cmake ..
-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Could NOT find Vulkan (missing:  VULKAN_LIBRARY VULKAN_INCLUDE_DIR) 
-- Using Cocoa for window creation
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- Performing Test HAS_CPP11_FLAG
-- Performing Test HAS_CPP11_FLAG - Success
-- Performing Test HAS_LTO_FLAG
-- Performing Test HAS_LTO_FLAG - Success
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10") 
CMake Error at CMakeLists.txt:343 (set_target_properties):
  set_target_properties Can not find target to add properties to:
  glfw_objects

-- Configuring incomplete, errors occurred!
See also "/Users/azl/projects/nanogui/build/CMakeFiles/CMakeOutput.log".

Here's git log output:

192:build azl$ git log 
commit ab097dabfd9c7ec171733a1664e88617d3ce9708
Author: Wenzel Jakob <wenzel.jakob@epfl.ch>
Date:   Mon Jun 27 16:31:50 2016 +0200

    completed bindings for new widgets
wjakob commented 8 years ago

aha! very likely your cmake is too old. I've just committed an updated version requirement.

I'm actually using 3.5.2 on OSX, but anything newer than 2.8.12 should work.

stavenko commented 8 years ago

Just checked out latest commit with message bump cmake version requirement.

cmake made it...

Thank you!

wjakob commented 8 years ago

ok, good to know.