Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking errors while compiling against static libraries on Ubuntu 20.04 LTS #10

Closed
olegded opened this issue Sep 2, 2020 · 6 comments
Closed

Comments

@olegded
Copy link

olegded commented Sep 2, 2020

Hi Robert,

I have tried to build vsgXchange against default static glslang libraries installed via native package manager on Ubuntu 20.04 LTS. It looks like that this Ubuntu version includes latest glslang version including breaking changes as described here, see deletion of glslang/Include/revision.h.

Somewhat easy change is to fix <glslang/Include/revision.h> include here, although it requires changes to "#if GLSLANG_PATCH_LEVEL > 3727" test to make it right.

However, what I really failed so far is to link against the static libraries resulting in tons of linker errors. I have tried to change add_library(glslang::glslang UNKNOWN IMPORTED) to add_library(glslang::glslang STATIC IMPORTED) (and all subsequent libraries further in the CMake file), still no success. I couldn't figure out whether set_target_properties calls need some changes or not, at least I cannot find which flags would be required here.

Latest self-compiled glslang master branch using dynamic libraries works. This issue can be reproduced by compiling latest glslang master as static libraries under Ubuntu 20.04 LTS.

Do you have an idea what might be missing?

Regards,
Oleg

@robertosfield
Copy link
Collaborator

robertosfield commented Sep 3, 2020 via email

@olegded
Copy link
Author

olegded commented Sep 3, 2020

  • Vulkan SDK is at 1.2.148.0, updated as described here Ubuntu packages - libvulkan1/libvulkan-dev, lunarg and vulkan* packages

  • glslang-dev, glslang-tools, v8.13.3743+193-1ubuntu20.04-2

I guess using VulkanSDK could break things too when it will be updated to the latest version (at least the breaking change).

Really wondering if there any difference between installing the VulkanSDK via tarball or provided Ubuntu packages. Ubuntu packages look like easier to update via system tools.

@robertosfield
Copy link
Collaborator

robertosfield commented Sep 3, 2020 via email

@olegded
Copy link
Author

olegded commented Sep 3, 2020

Yes and I definitely don't have glslang/Include/revision.h resulting in a compiler error. I would say having a self-compiled version with dynamic libraries is a working solution/workaround. Maybe it's worth to add an install readme file describing how to install known working version of the glslang library.

@robertosfield
Copy link
Collaborator

robertosfield commented Sep 3, 2020 via email

@olegded
Copy link
Author

olegded commented Sep 8, 2020

Hi Robert,

I can confirm that both vsgExamples and MyFirstVsgApplication can be built now on Ubuntu 20.04 using latest self-compiled glslang master (compiled as static libraries).

Oleg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants