Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672652 - media-libs/shaderc-2017.2 - .../work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4/libshaderc_util/src/resources.cc:132:6: error: braces around scalar initializer for type ‘int’
Summary: media-libs/shaderc-2017.2 - .../work/shaderc-7a23a01742b88329fb2260eda0071721...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Coacher
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-06 20:52 UTC by Chris
Modified: 2018-12-19 03:00 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.log,6.03 KB, text/x-log)
2018-12-06 20:52 UTC, Chris
Details
build.log (media-libs:shaderc-2017.2:20181206-203421.log,16.47 KB, text/plain)
2018-12-06 20:53 UTC, Chris
Details
build.log using clang (media-libs:shaderc-2017.2:20181206-201307.clang-compiler.log,16.44 KB, text/plain)
2018-12-06 20:55 UTC, Chris
Details
build.log (build.log,16.67 KB, text/plain)
2018-12-16 04:02 UTC, Stefan Strogin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2018-12-06 20:52:39 UTC
Created attachment 557188 [details]
emerge --info

=media-libs/shaderc-2017.2 fails to build. Exits with the following:

cd /var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4-abi_x86_64.amd64/libshaderc_util && /usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4/libshaderc_util/include   -DNDEBUG -march=native -O2 -pipe   -Wall -Werror -fvisibility=hidden -fPIC -std=c++11 -o CMakeFiles/shaderc_util.dir/src/spirv_tools_wrapper.cc.o -c /var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4/libshaderc_util/src/spirv_tools_wrapper.cc
/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4/libshaderc_util/src/resources.cc:132:6: error: braces around scalar initializer for type ‘int’
     }};
      ^
[ 37%] Building CXX object libshaderc_util/CMakeFiles/shaderc_util.dir/src/version_profile.cc.o
cd /var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4-abi_x86_64.amd64/libshaderc_util && /usr/bin/x86_64-pc-linux-gnu-g++  -I/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4/libshaderc_util/include   -DNDEBUG -march=native -O2 -pipe   -Wall -Werror -fvisibility=hidden -fPIC -std=c++11 -o CMakeFiles/shaderc_util.dir/src/version_profile.cc.o -c /var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4/libshaderc_util/src/version_profile.cc
make[2]: *** [libshaderc_util/CMakeFiles/shaderc_util.dir/build.make:115: libshaderc_util/CMakeFiles/shaderc_util.dir/src/resources.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4-abi_x86_64.amd64'
[ 37%] Built target check-copyright
make[2]: Leaving directory '/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4-abi_x86_64.amd64'
make[1]: *** [CMakeFiles/Makefile2:225: libshaderc_util/CMakeFiles/shaderc_util.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4-abi_x86_64.amd64'
make: *** [Makefile:141: all] Error 2
 * ERROR: media-libs/shaderc-2017.2::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/shaderc-2017.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/shaderc-2017.2::gentoo'`.
 * The complete build log is located at '/var/log/portage/media-libs:shaderc-2017.2:20181206-203421.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-libs/shaderc-2017.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/shaderc-2017.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4-abi_x86_64.amd64'
 * S: '/var/tmp/portage/media-libs/shaderc-2017.2/work/shaderc-7a23a01742b88329fb2260eda007172135ba25d4'
Comment 1 Chris 2018-12-06 20:53:35 UTC
Created attachment 557190 [details]
build.log
Comment 2 Chris 2018-12-06 20:55:00 UTC
Created attachment 557192 [details]
build.log using clang
Comment 3 Stefan Strogin gentoo-dev 2018-12-16 04:02:07 UTC
Created attachment 557882 [details]
build.log

I confirm the bug. Here is my build.log with MAKEOPTS="-j1".
Comment 4 Niklas Haas 2018-12-16 17:32:19 UTC
This is most likely a conflict between `glslang` and `shaderc` versions. The context of this error is a field `TBuiltInResources` which had fields added (in the middle) in `GLSLANG_PATCH_LEVEL >= 2892`.

We should be able to work around this issue by patching `libshaderc_util/src/resources.cc` to add these new fields, probably with the values set to `0`.
Comment 5 Marcin Deranek 2018-12-16 17:38:07 UTC
Version 2018.0 from #672684 does not seem to suffer this problem.
Comment 6 Andrei Slavoiu 2018-12-16 23:33:40 UTC
Can confirm this as well, and now that media-video/mpv[vulkan] is depending on this it will pop up more frequently. Any plans for a version bump?
Comment 7 Dmitry Suloev 2018-12-18 11:00:04 UTC
You can find ebuild for newest version of shaderc attached to #672684
It's does not cause any problem on compile phase.
Comment 8 Michael Cook 2018-12-18 18:13:18 UTC
Yeah, 2017.2 requires an older glslang, 2018.0 appears to work fine with glslang-7.10.2984. glslang-7.9.2888 works fine with 2017.2 though.
Comment 9 Gary E. Miller 2018-12-18 21:44:43 UTC
Same here.

mpv[vulkan] pulls this in.  My workaround: mpv[-vulkan]
Comment 10 Larry the Git Cow gentoo-dev 2018-12-19 02:57:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6df6b586912812298cedb516a7c3b3d3862101c

commit a6df6b586912812298cedb516a7c3b3d3862101c
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2018-12-19 02:56:20 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2018-12-19 02:56:20 +0000

    media-libs/shaderc: drop old
    
    Closes: https://bugs.gentoo.org/672652
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 media-libs/shaderc/shaderc-2017.2.ebuild | 89 --------------------------------
 1 file changed, 89 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=370c3d3030220a76274794702d943d1f431c6df3

commit 370c3d3030220a76274794702d943d1f431c6df3
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2018-12-19 02:55:30 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2018-12-19 02:55:30 +0000

    media-libs/shaderc: revbump 2017.2, require older glslang
    
    Bug: https://bugs.gentoo.org/672652
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 media-libs/shaderc/shaderc-2017.2-r1.ebuild | 89 +++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7b891fb1485664188eebc4efb01b1865d664cbd

commit d7b891fb1485664188eebc4efb01b1865d664cbd
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2018-12-19 02:54:25 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2018-12-19 02:54:25 +0000

    media-libs/shaderc: bump to 2018.0
    
    Bug: https://bugs.gentoo.org/672652
    Closes: https://bugs.gentoo.org/672684
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 media-libs/shaderc/Manifest                        |  1 +
 .../shaderc-2018.0-fix-glslang-link-order.patch    | 26 +++++++
 media-libs/shaderc/shaderc-2018.0.ebuild           | 85 ++++++++++++++++++++++
 3 files changed, 112 insertions(+)
Comment 11 Georgy Yakovlev archtester gentoo-dev 2018-12-19 03:00:50 UTC
thanks guys, fixed. both versions compile fine with appropriate glslang.
mpv[vulkan] compiles/works fine for me.
please open new bug if you still have problems