Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

gcc6buildnvtt.patch (556 bytes ) - added by echotangoecho 8 years ago.
alterNvtt.diff (1.1 KB ) - added by sanderd17 8 years ago.

Download all attachments as: .zip

Change History (9)

by echotangoecho, 8 years ago

Attachment: gcc6buildnvtt.patch added

comment:1 by echotangoecho, 8 years ago

Milestone: BacklogAlpha 21

comment:2 by echotangoecho, 8 years ago

Summary: Update workspaces fails with gcc 6[PATCH] Update workspaces fails with gcc 6

by sanderd17, 8 years ago

Attachment: alterNvtt.diff added

comment:3 by sanderd17, 8 years ago

And the above patch just fixes NVTT to work with GCC 6.

Not sure what fix is best.

comment:4 by Stan, 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 sanderd17, 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:6 by sanderd17, 8 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 18364:

Fix NVTT for building with GCC 6. Fixes #3967

comment:7 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.