vsgExamples troubles

226 views
Skip to first unread message

Vadim Balashoff

unread,
Jun 30, 2022, 7:19:16 AM6/30/22
to vsg-users
hi!

Ok. Now I can compile vsg and vsg applications without messing with
custom cmake files. Thanks for that.

So, vsgExamples

1. Some applications runs well, but some crashes at startup.

For example, vsgtext. There is applicaiton screen flashes at startup,
but immediately i get:

----
$ ./vsgtext
terminate called after throwing an instance of 'vsg::Exception'
Aborted
----

And yes, I start vsgtext from the "data" folder, where "fonts" folder is.
Otherwise I get:

----
$ ./vsgtext
Failing to read font : fonts/times.vsgb
----

It seems that all applications that crashes give same message
(terminate called after throwing an instance of 'vsg::Exception'.
Aborted).
I can make complete list of crashing applications if it's needed.

2. Not a problem, but anyway.
'make install' works well. It installs all binaries to /usr/local/bin

uninstall doesn't work:
----
# make uninstall
CMake Error: Error processing file:
/home/vvb/src/vsg/vsgExamples/uninstall.cmake
make[3]: *** [CMakeFiles/uninstall.dir/build.make:70:
CMakeFiles/uninstall] Error 1
make[2]: *** [CMakeFiles/Makefile2:1270: CMakeFiles/uninstall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1277: CMakeFiles/uninstall.dir/rule] Error 2
make: *** [Makefile:208: uninstall] Error 2
----

v.v.b.

Robert Osfield

unread,
Jun 30, 2022, 8:59:14 AM6/30/22
to vsg-...@googlegroups.com
Hi Vadim.

vsgtext presently relies on runtime shader composition and compilation, which relies upon the VSG to built with glslang.  If the compilation fails then an exception is thrown.

Does this sound possible in your case?  Did you build the VSG without glslang installed or availability via VulkanSDK?

FYI, VulkanSDK now contains glslang so normally if you build the VSG using the VulkanSDK as reference it'll pick up on the glslang automatically, otherwise you'll need to install it, either by building the glslang repo or installing it from repositories.

Cheers,
Robert.

Vadim Balashoff

unread,
Jun 30, 2022, 9:32:45 AM6/30/22
to vsg-...@googlegroups.com
Hi, Robert!

vsg cmake output:
----
-- Reading 'vsg_...' macros from
/home/vvb/src/vsg/VulkanSceneGraph/cmake/vsgMacros.cmake - look there
for documentation
-- Using Vulkan version check embedded in vsg
-- Found Vulkan: /usr/lib64/libvulkan.so (found suitable version
"1.3.211", minimum required is "1.1.70.0")
-- Failed to find glslang
-- Support for compiling GLSL to SPIR-V and associated shader
composition is not available.
-- The following OPTIONAL packages have been found:

* vsg_glslang

-- The following REQUIRED packages have been found:

* Vulkan (required version >= 1.1.70.0)
* Threads
* PkgConfig

-- Configuring done
-- Generating done
-- Build files have been written to: /home/vvb/src/build/vsg/vsg
----

so, I'm not sure is glslang support here.
1. it says "Failed to find glslang". But system library
dev-util/glslang-1.3.211 is installed. May be it's cmake find issues
again.
2. It says "The following OPTIONAL packages have been found: * vsg_glslang"
Is it enough? Or not?

I'll look for VulkanSDK in the meantime...

v.v.b.

Robert Osfield

unread,
Jun 30, 2022, 9:51:26 AM6/30/22
to vsg-...@googlegroups.com
Hi Vadim,

On Thu, 30 Jun 2022 at 14:32, Vadim Balashoff <bala...@gmail.com> wrote:
-- Failed to find glslang
--   Support for compiling GLSL to SPIR-V and associated shader
composition is not available.

That confirms what I was thinking.

 
  so, I'm not sure is glslang support here.
 1. it says "Failed to find glslang". But system library
dev-util/glslang-1.3.211 is installed. May be it's cmake find issues
again.

Unfortunately glslang is a bit slippery beast with various versions and components to it,   If you build glslang from scratch or use VulkanSDK it'll have spirv-tools.

Could you install spirv-tools as well, this is a component of the glslang but can be distributed separately.

I will need to add some docs about glsang & spirv-tools. Though I'm trying to figure out all the different combinations that users might have so it's not quite a straightforward as just recommending one install.

 
 2. It says "The following OPTIONAL packages have been found: * vsg_glslang"
 Is it enough? Or not?

vsg_gslang cmake config file is one generated by the VSG because the glslang's own config support has historically been such a mess.  Once you've installed the VSG then it'll pick up on the preexisting vsg_glslang.cmake.
 
 I'll look for VulkanSDK in the meantime...

VulkanSDK has become a one stop shop so does simplify things.

In general with the VSG I've tried to minimize external dependencies to make it easier to build but... compiling GLSL to SPIR-V is such a useful feature for a scene graph I've included glslang as a dependences, but this has it's pitfalls as glslang has turned out to be a bit awkward to get working well across all platforms combinations.

 Robert.

Vadim Balashoff

unread,
Jun 30, 2022, 10:01:15 AM6/30/22
to vsg-users
hi!

Small notes:
----
vvb@vampire ~/src/build/vsg/vsg $ cat CMakeCache.txt | grep glslang
Vulkan_GLSLANG_VALIDATOR_EXECUTABLE:FILEPATH=/usr/bin/glslangValidator
glslang_INCLUDE_DIR:PATH=/usr/include
glslang_LIBRARY:FILEPATH=/usr/lib64/libglslang.so
//The directory containing a CMake configuration file for vsg_glslang.
vsg_glslang_DIR:PATH=/home/vvb/src/vsg/VulkanSceneGraph/src/vsg
//ADVANCED property for variable: glslang_INCLUDE_DIR
glslang_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: glslang_LIBRARY
glslang_LIBRARY-ADVANCED:INTERNAL=1
----

There are some binaries of glslang found by cmake, but it seems they are not enough.

2. I try to keep to system libraries as close as I can get. So, there are no vulkansdk library for gentoo. There is vulkan-tools library (https://github.com/LunarG/VulkanTools), but I don't exactly sure what is it.
And there is a spirv-tools in gentoo:
----
#emerge -a spirv-tools
Calculating dependencies... done!
[ebuild  N     ] dev-util/spirv-headers-1.3.211
[ebuild  N     ] dev-util/spirv-tools-1.3.211-r1  ABI_X86="(64) -32 (-x32)"
------

 So, I'll install it, recompile vsg and look where it goes.
 
 v.v.b.

чт, 30 июн. 2022 г. в 16:51, Robert Osfield <robert....@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vsg-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vsg-users/CAFN7Y%2BWvzpTAFThLS4V_pNji%2B-CDF2ktj8NLmbBBLJfohMUj8Q%40mail.gmail.com.

Vadim Balashoff

unread,
Jul 1, 2022, 5:07:55 AM7/1/22
to vsg-users
Hi!

May be it'll be good if there is a mention about spirv-tools installation needed when vsg is compiling? Or this information can be put into documentation in "Installation" part...

v.v.b.


чт, 30 июн. 2022 г. в 16:51, Robert Osfield <robert....@gmail.com>:
Hi Vadim,

--

Vadim Balashoff

unread,
Jul 1, 2022, 5:10:10 AM7/1/22
to vsg-users
Hi!

 Oh! I've forgot that I've said about "spirv-tools" library needed here.

v.v.b.

Robert Osfield

unread,
Jul 1, 2022, 8:05:06 AM7/1/22
to vsg-...@googlegroups.com
The VulkanSceneGraph/INSTAL.md is long overdue improvement, including mention of glslang/spirv-tools etc.

I'm happy to add a Gentoo section if you are willing to chip in.

Vadim Balashoff

unread,
Jul 11, 2022, 12:12:46 PM7/11/22
to vsg-...@googlegroups.com
hello, Robert!

I'd like to, but my english is very bad, sorry.
All I can do is:
---
Gentoo installation:

1. needed packages:
You have to emerge dev-util/vulkan-tools
dev-util/vulkan-tools will pull dev-util/vulkan-headers and
dev-util/vulkan-tools.
These are necessary libraries.

2. optional libraries:
emerge dev-util/spirv-tools
dev-util/spirv-tools will pull dev-util/spirv-headers

This package is recommended if you want to use vsg::Text

emerge dev-util/glslang
This package is needed if you want to use GLSL shaders.
---

v.v.b.
> --
> You received this message because you are subscribed to the Google Groups
> "vsg-users : VulkanSceneGraph Developer Discussion Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vsg-users+...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/vsg-users/CAFN7Y%2BXuoHK07P1baLekEccqS%3DhZ03fLrC%3D%3Dzv2A7x8-er8A_A%40mail.gmail.com.
>

Robert Osfield

unread,
Jul 11, 2022, 4:12:20 PM7/11/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Thanks Vadim, I'm away from my dev system right now so will just quickly drop in what I think are the key bits w.r.t emerge.  Does this look correct?  I'll need to add instructions for other Linux distros and can add more details then so they all look consistent.

Reply all
Reply to author
Forward
0 new messages