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

error: 'operator=' is a private member of 'glslang::TPoolAllocator' #1869

Closed
PiJoules opened this issue Aug 13, 2019 · 2 comments
Closed

error: 'operator=' is a private member of 'glslang::TPoolAllocator' #1869

PiJoules opened this issue Aug 13, 2019 · 2 comments
Labels

Comments

@PiJoules
Copy link

It seems that pool_allocator is attempting to assign a TPoolAllocator even though the TPoolAllocator assignment operator is private.

  FAILED: host_x64-asan/obj/third_party/shaderc/libshaderc_util/src/shaderc_util_sources.compiler.o
  /b/s/w/ir/k/recipe_cleanup/clangUy7JlV/bin/clang++ -MD -MF host_x64-asan/obj/third_party/shaderc/libshaderc_util/src/shaderc_util_sources.compiler.o.d -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -I../.. -Ihost_x64-asan/gen -I../../third_party/shaderc/libshaderc_util/include -I../../third_party/glslang -I../../third_party/spirv-tools/include -fcolor-diagnostics -fcrash-diagnostics-dir=clang-crashreports --sysroot=/b/s/w/ir/k/prebuilt/third_party/sysroot/linux --target=x86_64-linux-gnu -fdebug-prefix-map=/b/s/w/ir/k/out/default=. -fdebug-prefix-map=/b/s/w/ir/k/out=.. -fdebug-prefix-map=/b/s/w/ir/k=../.. -no-canonical-prefixes -fomit-frame-pointer -g3 -Wall -Wextra -Wnewline-eof -Wno-unused-parameter -Wno-unknown-warning-option -Wno-implicit-int-float-conversion -fvisibility=hidden -O0 -fsanitize=address -fno-omit-frame-pointer -fvisibility-inlines-hidden -std=c++17 -stdlib=libc++ -fno-exceptions -fno-rtti -c ../../third_party/shaderc/libshaderc_util/src/compiler.cc -o host_x64-asan/obj/third_party/shaderc/libshaderc_util/src/shaderc_util_sources.compiler.o
  In file included from ../../third_party/shaderc/libshaderc_util/src/compiler.cc:29:
  In file included from ../../third_party/glslang/SPIRV/GlslangToSpv.h:42:
  In file included from ../../third_party/glslang/SPIRV/SpvTools.h:47:
  In file included from ../../third_party/glslang/SPIRV/../glslang/MachineIndependent/localintermediate.h:42:
  In file included from ../../third_party/glslang/glslang/Public/../MachineIndependent/../Include/intermediate.h:55:
  In file included from ../../third_party/glslang/glslang/Public/../Include/../Include/Common.h:108:
  ../../third_party/glslang/glslang/Public/../Include/PoolAlloc.h:307:54: error: 'operator=' is a private member of 'glslang::TPoolAllocator'
  void setAllocator(TPoolAllocator* a) { allocator = *a; }
  ~~~~~~~~~ ^ ~~
  ../../third_party/glslang/glslang/Public/../Include/PoolAlloc.h:244:21: note: declared private here
  TPoolAllocator& operator=(const TPoolAllocator&);  // don't allow assignment operator
  ^
  1 error generated.

Something else that's also weird: It seems that PoolAlloc.hhasn't been touched since 2017, so I'm wondering how this went uncaught for a while.

@PiJoules
Copy link
Author

Ah so I hadn't noticed this earlier, but this error will only be raised if setAllocator is called since it is a non-virtual function of a templated class. It could be that another one of our third party libraries that uses glslang (shaderc in this case) ended up calling setAllocator and caused the error to manifest.

The reason it might've gone unnoticed is because it seems setAllocator isn't being used in glslang internally (as far as a github query tells me).

Not sure if this needs to be changed, but I'll keep this issue open in the meantime.

@johnkslang
Copy link
Member

It seems like setAllocator couldn't be called either. This is removed by #2010. If that really does break something, make an issue that we need to add that functionality some other way.

kraj added a commit to YoeDistro/meta-openembedded that referenced this issue Dec 30, 2019
Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj added a commit to YoeDistro/meta-openembedded that referenced this issue Dec 31, 2019
Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj added a commit to YoeDistro/meta-openembedded that referenced this issue Dec 31, 2019
Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj added a commit to YoeDistro/meta-openembedded that referenced this issue Dec 31, 2019
Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/meta-openembedded that referenced this issue Dec 31, 2019
Source: meta-openembedded
MR: 00000
Type: Integration
Disposition: Merged from meta-openembedded
ChangeID: 13b8e3f
Description:

Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
alexandre-clement added a commit to alexandre-clement/ostl that referenced this issue Apr 2, 2021
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
Backport a patch from glslang to fix a build error
KhronosGroup/glslang#1869

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants