15.5.480 -unable to compile toolkit/samples/field3d

   3398   7   1
User Avatar
Member
13 posts
Joined: 1月 2014
Offline

Hi there!

On Linux, I've sourced houdini_setup and have gone into toolkit/samples/field3d.

As instructed in the README, I then run the following:

hcustom -L $HDSO -l Field3D f3dtools.C

I then get a series of compiler errors. Things like:

/toolkit/include/UT/UT_StringHolder.h:251: error: expected ‘;’ before ‘noexcept’
/toolkit/include/GA/GA_EdgeGroup.h:60: error: ‘nullptr’ was not declared in this scope
/toolkit/include/SOP/SOP_Node.h:891: error: expected ‘;’ before ‘override’

…amongst other errors. Smells like there could be a missing compiler flag.

Has anyone successfully managed to compile this?
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
What Linux is it? Smells like complier issue (no c++11?) What version of gcc?

(it works fine on CentOS 7.1)
User Avatar
Member
13 posts
Joined: 1月 2014
Offline
Thanks for the quick reply symek. It's CentOS 6.8 and gcc 4.4.7. This version should support c++11, right?
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
I'm not sure if Houdini 15.5 officially requires C++11 (probably not since 4.8 is first version fully compliant with it), but gcc 4.4 doesn't support nullptr for example. If I'm not mistaken gcc 4.6 is the oldest working version out of the box (at least for 15.0 it was true). You may try to tune gcc flags (like -std=c++11), but it's pure speculation. On the other hand CentOS6.8 should work with gcc 4.7 rather painlessly [access.redhat.com].
User Avatar
スタッフ
5212 posts
Joined: 7月 2005
Offline
We dropped support for gcc 4.4 because it didn't have C++11 support, and there were several bugs that made working with it rather painful. Just install a later gcc version (4.7+ works fine, not sure about 4.5-4.6) from apt.
User Avatar
Member
13 posts
Joined: 1月 2014
Offline
Hi there!

Thanks very much for the replies. Although I managed to install gcc 4.8.5 just now, and it seems I'm getting the same errors…

From the same shell I'm running hcustom, if I run “gcc –version”, it tells me it's 4.8.5 so it's clearly looking at the correct version…

Also just tried the demo from here:
http://www.sidefx.com/docs/hdk15.0/_h_d_k__intro__compiling.html [sidefx.com]
for SOP_Star.C. Got a load of very similar errors.

Do you think there could be anything else missing here?
Edited by abvariant - 2016年7月22日 12:38:01
User Avatar
Member
1390 posts
Joined: 7月 2005
Offline
which g++
points to correct compiler too? I remember at some point newer gcc on CentOS6.x had similar problem, shell was reporting good compiler, but CMake was using old one (might confuse some details now). You could create Makefile and include $HT/makefiles/Makefile.gnu as described in docs. There are variables to overwrite CC and linker manually there.
User Avatar
Member
13 posts
Joined: 1月 2014
Offline
Symek, that was exactly what the problem was. I'd never checked that the latest install of g++ was being used. As soon as I updated this, everything compiled happily!

Thanks loads!
  • Quick Links