Could not find a package configuration file provided by "vsg_glslang" with - how do I set up a proper development environment?

139 views
Skip to first unread message

Raymond de Vries

unread,
May 17, 2022, 10:56:16 AM5/17/22
to vsg-...@googlegroups.com
Hi,

After a long time, I started to build the VSG and it's companion
projects again, very curious about VSG v1.0. Building the VSG works fine
and now I'd like to build vsgExamples. For this, I set the env variable
vsg_DIR to my installed VSG. $vsg_DIR contains
lib/libvsg.a
lib/cmake/vsg/vsgConfig.cmake
lib/cmake/vsg_glslang/vsg_glslangConfig.cmake

and when cmake-ing vsgExamples for instance, I get
CMake Error at
/usr/local/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47
(find_package):
  By not providing "Findvsg_glslang.cmake" in CMAKE_MODULE_PATH this
project
  has asked CMake to find a package configuration file provided by
  "vsg_glslang", but CMake did not find one.

  Could not find a package configuration file provided by "vsg_glslang"
with
  any of the following names:

    vsg_glslangConfig.cmake
    vsg_glslang-config.cmake

It must be something with an incorrect environment variable but I can't
figure out what it needs to be... Any idea?

Thanks, cheers,
Raymond


--
Deze e-mail is gecontroleerd op virussen door AVG.
http://www.avg.com

Robert Osfield

unread,
May 17, 2022, 11:21:33 AM5/17/22
to vsg-...@googlegroups.com
Hi Raymond,

On Tue, 17 May 2022 at 15:56, Raymond de Vries <reed...@gmail.com> wrote:
After a long time, I started to build the VSG and it's companion
projects again, very curious about VSG v1.0.

For clarification, the VSG is now feature complete for 1.0 - so has all the major features written, but work isn't quite complete yet.  The project has now entered a refinement phase where we find all the rough edges and attempt to resolve them before the final 1.0 release.  So... resolving problems is exactly the one you've just came across :-)

Building the VSG works fine
and now I'd like to build vsgExamples. For this, I set the env variable
vsg_DIR to my installed VSG. $vsg_DIR contains
lib/libvsg.a
lib/cmake/vsg/vsgConfig.cmake
lib/cmake/vsg_glslang/vsg_glslangConfig.cmake

Did you build and install vsgXchange OK? 

I have never personally used the vsg_DIR env var.  I don't recall it being mentioned in the build docs. I can see vsg_DIR used internally by the CMakeCache.txt generated after running the first cmake .

Personally I have Install  directory in my home directory, with LD_LIBRARY_PATH  and PATH set to the ~/Install/lib and ~/Install/bin  respectively, and when I build each vsg component I used the line:

    cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install

I've attached one of the script I use to rebuild the VSG and all the associated libs and examples, this isn't something I;d suggest everyone uses, but it works for me, ingore adapt to your own needs.


and when cmake-ing vsgExamples for instance, I get
CMake Error at
/usr/local/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47
(find_package):
   By not providing "Findvsg_glslang.cmake" in CMAKE_MODULE_PATH this
project
   has asked CMake to find a package configuration file provided by
   "vsg_glslang", but CMake did not find one.

   Could not find a package configuration file provided by "vsg_glslang"
with
   any of the following names:

     vsg_glslangConfig.cmake
     vsg_glslang-config.cmake

It must be something with an incorrect environment variable but I can't
figure out what it needs to be... Any idea?

My best guess is that you are being too specific with the env var, it should be enough to just point cmake at the parent directory for where all the include and libs are installed if it's different from the standard system directories like /usr/lib and /usr/local/lib.

 At this point I think we are probably seeing an issue with our docs not being clear enough, rather than a specific problem.

Cheers,
Robert.

Raymond de Vries

unread,
May 17, 2022, 1:57:26 PM5/17/22
to vsg-...@googlegroups.com
Hi Robert,

Thanks for your quick reply.


On Tue, 17 May 2022 at 15:56, Raymond de Vries <reed...@gmail.com> wrote:
After a long time, I started to build the VSG and it's companion
projects again, very curious about VSG v1.0.

For clarification, the VSG is now feature complete for 1.0 - so has all the major features written, but work isn't quite complete yet.  The project has now entered a refinement phase where we find all the rough edges and attempt to resolve them before the final 1.0 release.  So... resolving problems is exactly the one you've just came across :-)
Aha, I was doubting myself in the first place. No problem at all.



Building the VSG works fine
and now I'd like to build vsgExamples. For this, I set the env variable
vsg_DIR to my installed VSG. $vsg_DIR contains
lib/libvsg.a
lib/cmake/vsg/vsgConfig.cmake
lib/cmake/vsg_glslang/vsg_glslangConfig.cmake

Did you build and install vsgXchange OK? 
No, I did not. I was not aware of a particular order. I suspected that a bit but I wasn't aware of that. I just tried to build vsgXchange right after the vsg and I get the same results...



I have never personally used the vsg_DIR env var.  I don't recall it being mentioned in the build docs. I can see vsg_DIR used internally by the CMakeCache.txt generated after running the first cmake .
Aha, it was a hint of cmake when vsg was not found, and so I did, and then I got the mentioned error.



Personally I have Install  directory in my home directory, with LD_LIBRARY_PATH  and PATH set to the ~/Install/lib and ~/Install/bin  respectively, and when I build each vsg component I used the line:

    cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/Install
Aha, you build in-source, I think that makes a difference...



I've attached one of the script I use to rebuild the VSG and all the associated libs and examples, this isn't something I;d suggest everyone uses, but it works for me, ingore adapt to your own needs.
Thanks




and when cmake-ing vsgExamples for instance, I get
CMake Error at
/usr/local/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47
(find_package):
   By not providing "Findvsg_glslang.cmake" in CMAKE_MODULE_PATH this
project
   has asked CMake to find a package configuration file provided by
   "vsg_glslang", but CMake did not find one.

   Could not find a package configuration file provided by "vsg_glslang"
with
   any of the following names:

     vsg_glslangConfig.cmake
     vsg_glslang-config.cmake

It must be something with an incorrect environment variable but I can't
figure out what it needs to be... Any idea?

My best guess is that you are being too specific with the env var, it should be enough to just point cmake at the parent directory for where all the include and libs are installed if it's different from the standard system directories like /usr/lib and /usr/local/lib.

 At this point I think we are probably seeing an issue with our docs not being clear enough, rather than a specific problem.
Maybe but when I read the cmake documentation about this config capability, I read that it should be possible like that.

Could you try an out-of-source build?

Cheers,
Raymond



Cheers,
Robert.

--
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%2BVLBapZ2ne4rrHv6%2Bm_YuDXXAox9aSHzPhAcrKSd4A6KA%40mail.gmail.com.


Virusvrij. www.avg.com

Robert Osfield

unread,
May 17, 2022, 2:35:16 PM5/17/22
to vsg-...@googlegroups.com
Hi Raymond,

I don't think doing an insource or out of source build should make any difference as I'm calling make install, so the original build location should no longer be relevant.

What I am doing that is making things is making things simpler is installing all the libs into the same local Install directory using the CMAKE_INSTALL_PREFIX to point CMake at where I want to install, but as CMake checks the CMAKE_INSTALL_PREFIX for searching for other modules it can also find previously installed libs.

This approach avoids the need to explicitly set the path to each library install location.

What we probably need is a documentation page illustrating this approach in action.  it isn't the only way to do things - you could just use vsgFramework to pull in all the dependencies together.

I also am just one developer with my own preferred way of working that works well for me under Linux.  I'm sure others will have developed their preferred way of doing things, happy for others to dive in with an explanation of how they like to build things together.

Cheers,
Robert.

Gareth Francis

unread,
May 17, 2022, 4:22:48 PM5/17/22
to vsg-...@googlegroups.com

In vs out of source builds - No issues here, personally prefer out of source but I've had both work.
I tend to build the base vsg project, then 'make install' into something like C:/vsg/, or /home/me/vsg/ on Linux.

For dependent projects, rather than setting the cmake vsg_Dir and similar directly, provide cmake with the paths to vsgConfig.cmake and let CMake do its thing.
If vsg has had a 'make install' to C:/vsg/, and we're building within C:/myrepo/build:
  cmake -DCMAKE_PREFIX_PATH="C:/vsg/lib/cmake/vsg;C:/vsg/lib/cmake/vsg_glslang" -DCMAKE_INSTALL_PREFIX="C:/myrepo/install" ../
  cmake -DCMAKE_PREFIX_PATH="/home/me/vsg/lib/cmake/vsg:/home/me/vsg/lib/cmake/vsg_glslang" -DCMAKE_INSTALL_PREFIX="/home/me/myrepo/install" ../

Then in your CMake file a call to find_package(vsg REQUIRED) should find it, and in your CMake project you'll have the 'vsg' target to link to
For the prefix path it can be on command line or environment, it's best to use absolute paths rather than relative ones, this is very similar to using CMAKE_INSTALL_PREFIX, but maybe more explicit

(Setting vsg_Dir directly does influence find_package, but can be error-prone. Using CMAKE_INSTALL_PREFIX is recommended from the 'modern/effective cmake' docs but it's all subjective)






--
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.


--
----
Gareth Francis
www.gfrancisdev.co.uk

Raymond de Vries

unread,
May 19, 2022, 4:14:56 AM5/19/22
to vsg-...@googlegroups.com
Hi Robert,

Aha, you gave the right pointer: when I also set the environment variable vsg_glslang_DIR to point to the same dir as vsg_DIR, vsg_glslang config is found properly. That is essentially the same as what you are doing, installing everything in the same directory.

Cheers,
Raymond
--
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.

Raymond de Vries

unread,
May 19, 2022, 4:18:28 AM5/19/22
to vsg-...@googlegroups.com
Hi Gareth,

Yes, this makes sense now. Obviously, CMAKE_PREFIX_PATH makes it explicit where setting vsg_DIR for instance uses cmake's capability to derive the path.

Thanks, cheers,
Raymond

future Charles

unread,
Aug 12, 2022, 3:53:01 AM8/12/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Hi, I had the same problem as you and did what you said and it didn't solve it. Can you show me how you are installing everything in the same directory.

Raymond de Vries

unread,
Aug 12, 2022, 4:38:43 AM8/12/22
to vsg-...@googlegroups.com
Hi Charles (?),

Have you searched how to use the suggested CMAKE_PREFIX_PATH ? When you use the same directory for all of the projects, everything will be installed in the same directory.

Cheers,
Raymond

future Charles

unread,
Aug 16, 2022, 3:58:33 AM8/16/22
to vsg-users : VulkanSceneGraph Developer Discussion Group
Hi,
Yeah, I got it.Thanks you for your help。

Reply all
Reply to author
Forward
0 new messages