vsg-dev / VulkanSceneGraph

Vulkan & C++17 based Scene Graph Project
http://www.vulkanscenegraph.org
MIT License
1.32k stars 212 forks source link

vsgdraw fails to build because cmake does not update its files #146

Closed nsajko closed 4 years ago

nsajko commented 4 years ago

Describe the bug Already in the issue description. I think this means that not just vsgdraw, but anything that uses vsg will fail to build.

To Reproduce Steps to reproduce the behavior:

  1. cmake ../VulkanSceneGraph
  2. make
  3. make install
  4. Go to vsgdraw dir
  5. cmake .
  6. make - build fails

Expected behavior vsgdraw should be buildable.

Desktop (please complete the following information):

Additional info Some of the errors seem to be borne out of failure to comply with the new C++ standard. (Search for "(until" here: https://en.cppreference.com/w/cpp/atomic/atomic )

Warnings from the VSG build: log.txt

Errors and warnings from the vsgdraw build: log-vsgdraw.txt

nsajko commented 4 years ago

OK, I got vsgdraw to build, bypassing cmake like this: clang++ $CXXFLAGS -l vulkan -l xcb vsgdraw.cpp /usr/local/lib/libvsg.a. No warnings or errors are produced by that command.

I think there are two separate issues here with vsgdraw's cmake setup:

See the Cmake warnings that seem related and are the result of cmake . in the vsgdraw dir:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- 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: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Warning (dev) at CMakeLists.txt:3 (add_executable):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "vsgdraw" links to target "vsg::vsg" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/nsajko/graphicsSrc/vsg-dev/vsgExamples/Desktop/vsgdraw
mp3butcher commented 4 years ago

please take your time to think before yelling like that. I'm sure your not running cmake on vsgExample root dir

I fix your bullets but i recommand to separate source and build directory

  1. cmake ../VulkanSceneGraph
  2. make
  3. make install
  4. Go to vsgExample
  5. cmake .
  6. make
vsg-dev commented 4 years ago

@nsajko Please follow the build instructions for the VSG and vsgExamples projects, both the READEME.md INSTALL.md show what to do. You should run cmake . from the root directory or the project, or build out of source, you don't run cmake . within each individual example directory.

Also, please when you are going to write something in public place pause and re-read what are writing, the whole tone of you post is really abrasive and unhelpful. It's far better to approach others in a friendly way,

I'm close this Issue as it's a case of user error. The warning log output from VSG is something I'll look into at some point, if you are going to use bleeding edge compilers then they can pick up on issues more widely used compilers don't, the warnings looked to be a lot of noise about nothing of significance that is might be an bug.