#3967 closed defect (fixed)
[PATCH] Update workspaces fails with gcc 6
Reported by: | echotangoecho | Owned by: | sanderd17 |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 21 |
Component: | Build & Packages | Keywords: | patch |
Cc: | Patch: |
Description
Using gcc 6, running update_workspaces.sh fails on compilation of nvtt with errors similar to:
nvimage/ImageIO.cpp:624:10: error: cannot convert ‘bool’ to ‘nv::Image*’ in return
This is most likely related to the change to std=gnu++14
as default in gcc 6. Adding -std=gnu++98
to the CMAKE_CXX_FLAGS
for gcc fixes the problem.
Attachments (2)
Change History (9)
by , 8 years ago
Attachment: | gcc6buildnvtt.patch added |
---|
comment:1 by , 8 years ago
Milestone: | Backlog → Alpha 21 |
---|
comment:2 by , 8 years ago
Summary: | Update workspaces fails with gcc 6 → [PATCH] Update workspaces fails with gcc 6 |
---|
by , 8 years ago
Attachment: | alterNvtt.diff added |
---|
comment:3 by , 8 years ago
comment:4 by , 8 years ago
Might be nice to try with -std=gnu++11 since that's the c++11 https://gcc.gnu.org/onlinedocs/gcc/Standards.html
The second way is nice too because you should want to return null instead of a bool since that's a more suitable variable. Especially since the variables will likely be tested for null.
I guess the best of both worlds would be to use both patches.
comment:5 by , 8 years ago
After asking Philip: we already patch NVTT in various places, so the alterNvtt.diff patch should probably be better.
And it should be documented under http://trac.wildfiregames.com/browser/ps/trunk/libraries/source/nvtt/README.txt and http://trac.wildfiregames.com/browser/ps/trunk/libraries/source/nvtt/patches
Will commit this later ...
comment:7 by , 8 years ago
Keywords: | review removed |
---|
And the above patch just fixes NVTT to work with GCC 6.
Not sure what fix is best.