Closed zhou13 closed 10 years ago
Unfortunately I'm having trouble finding a linux system with gcc 4.8.2. Could you recompile pbrt with debugging enabled (e.g. 'make OPT=-g') and run it under a debugger and send a stack trace for where it's crashing? I'd definitely like to fix this!
This is actually caused by a bug in std::nth_element in gcc, as pbrt uses nth_element for BVH construction, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800
Nice find--thanks! In a7bf7eaea319f7927ceb478cd3df95545e5e1d14, I've added a check for g++ 4.8.2 in core/pbrt.h; it will issue an error if that version is used.
a7bf7eaea319f7927ceb478cd3df95545e5e1d14 is a rather frustrating solution. GCC 4.8.2 is the version used by both Ubuntu 14.04 and CentOS 7. Both distributions patched the bug, but the #error
forces the build to fail anyways.
On linux, I got a segmentation fault on some serene. This happens on
gcc-4.8.2
. But it seems work fine ongcc-4.7
.