errors with math.h while building Softimage Integration

AhmidouAhmidou Posts: 179 ✭✭
edited March 2016 in Integrations

Hi,
I'm trying to build the Softimage Canvas integration, but I'm having thoses strange errors, and of course the files are there with the good functions.
Unfortunately Google didn't helped that much , a few people seems to have the same problem, but no solutions ...

This is the errors I'm having:

d:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64\include\FTL/Config.h(38) : error C3861: 'floor': identifier not found
d:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64\include\FTL/Config.h(39) : error C3861: 'floorf': identifier not found
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(126) : error C2039: 'fmaf' : is not a member of "global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(126) : error C3861: 'fmaf': identifier not found
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(131) : error C2039: 'fma' : is not a member of "global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(131) : error C3861: 'fma': identifier not found

...and so on

and my build batch file look like that:

SET FABRIC_BUILD_OS=Windows
SET FABRIC_BUILD_ARCH=x86_64
SET FABRIC_BUILD_TYPE=Release
SET FABRIC_DIR=d:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64
SET FABRIC_SPLICE_VERSION=2.1.0
SET FABRIC_CAPI_DIR=d:\dev\CPP\FabricSplice\SpliceAPI
SET FABRIC_UI_DIR=d:\dev\CPP\FabricSplice\FabricUI\
SET BOOST_DIR=d:\dev\CPP\boost_1_55_0_msvc12
SET QT_DIR=d:\dev\CPP\qt-4.8.6-64-vs2012-rel
SET SOFTIMAGE_INCLUDE_DIR=d:\Softimage\Softimage 2015 SP1 QFE2\XSISDK\include
SET SOFTIMAGE_LIB_DIR=d:\Softimage\Softimage 2015 SP1 QFE2\XSISDK\lib\nt-x86-64
SET SOFTIMAGE_VERSION=2015SP1


scons -C ./SpliceSoftimage -j8

Any idea?

Comments

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    Wow that's really annoying -- they must not be defined in the version of VC++ that is being used to build the Softimage integration.

    You can floor in terms of ceil and floorf in terms of ceilf. Can you try changing the "POSIX-y functions" block to this and let me know if it fixes the build error?

    #include <math.h>
    inline double round( double x ) { return -ceil(-(x+0.5)); }
    inline float roundf( float x ) { return -ceilf(-(x+0.5f)); }
    #define snprintf _snprintf
    

    Can you let me know making that

    Peter Zion
    Fabric Engine

  • AhmidouAhmidou Posts: 179 ✭✭

    Hi Peter,
    I just tried and I got the same result as for floor :neutral:

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    Hmm maybe it's including the FTL/Math.h file when it has the #include <math.h> line. Can you try changing #include <math.h> to #include <cmath>?

    Peter Zion
    Fabric Engine

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    If that works BTW we will probably need to rename "FTL/Math.h" to "FTL/FPRep.h" or something like that. It's probably not too complicated to do that but it will need to be changed in a few places.

    Peter Zion
    Fabric Engine

  • AhmidouAhmidou Posts: 179 ✭✭
    edited March 2016

    still the same, it seems they added round and roundf them in VC++ 2013 (MSVC 12)
    https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/
    So if I remove them it it fixing the two first errors, but not the other ones:

    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(126) : error C2039: 'fmaf' : is not a member of '`global namespace''
    ...
    ...

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    It looks a lot like FTL itself does not actually use round or roundf. What if you remove #include <math.h> and the two round definitions, just leaving snprintf?

    Peter Zion
    Fabric Engine

  • AhmidouAhmidou Posts: 179 ✭✭
    edited March 2016

    no FTL errors anymore but still C2039 errors all around In not sure if it can help but I'm including a cl command related to the error:

    cl /Fo.build\2015SP1\FabricDFGMenu.obj /c FabricDFGMenu.cpp /TP /nologo /EHsc /wd4624 /Ox /MT /DNT_PLUGIN /D_SCL_SECURE_NO_WARNINGS=1 /D_ITERATOR_DEBUG_LEVEL=0 /D_WIN32_WINNT=0x0600 /DNDEBUG /DSPLICE_
    API_VERSION=2001000 /DSPLICE_MAJOR_VERSION=2 /DSPLICE_MINOR_VERSION=1 /DSPLICE_REVISION_VERSION=0 /D_SPLICE_SOFTIMAGE_VERSION=2015 /DFEC_PROVIDE_STL_BINDINGS /D__STDC_LIMIT_MACROS /D__STDC_CONSTANT_MA
    CROS /DFEC_SHARED /D_BOOL /DFECS_STATIC /ID:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64\include\FTL /ID:\dev\CPP\boost_1_55_0_msvc12\include "/ID:\Softimage\
    Softimage 2015 SP1 QFE2\XSISDK\include" /ID:\dev\CPP\qt-4.8.6-64-vs2012-rel\include /ID:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64\include /I.build\SpliceAP
    I.stage /ID:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64\include\FabricServices /ID:\dev\CPP\FabricSplice\FabricUI /INative
    FabricDFGMenu.cpp
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(126) : error C2039: 'fmaf' : is not a member of "global namespace''
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(126) : error C3861: 'fmaf': identifier not found
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(131) : error C2039: 'fma' : is not a member of "global namespace''
    C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xtgmath.h(131) : error C3861: 'fma': identifier not found
    ........

  • AhmidouAhmidou Posts: 179 ✭✭
    edited March 2016

    Hey Peter you were right, I renamed FTL\Math.h, and changed Fabric UI accrodingly and it fixed those errors.
    I'm almost there, but some new errors came up:

    NodeHeaderButton.cpp
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(101) : error C2664: 'FabricUI::GraphView::NodeBubble::NodeBubble(const FabricUI::GraphView::NodeBubble &)' : cannot convert argument 1 from 'FabricU
    I::GraphView::Node *const ' to 'FabricUI::GraphView::Graph *'
    Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(208) : error C2065: 'm_pins' : undeclared identifier
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(208) : error C2228: left of '.size' must have class/struct/union
    type is 'unknown-type'
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(210) : error C2065: 'm_pins' : undeclared identifier
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(210) : error C2227: left of '->labelWidget' must point to class/struct/union/generic type
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(210) : error C2227: left of '->setColor' must point to class/struct/union/generic type
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(210) : error C2227: left of '->highlightColor' must point to class/struct/union/generic type
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(318) : error C2039: 'addPin' : is not a member of 'FabricUI::GraphView::Node'
    d:\dev\hybride_pipeline\software\FabricEngine_Releases\FabricEngine-2.0.1-Windows-x86_64\include\FabricUI/GraphView/Node.h(28) : see declaration of 'FabricUI::GraphView::Node'
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(321) : error C2065: 'm_pins' : undeclared identifier
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(321) : error C2228: left of '.size' must have class/struct/union
    type is 'unknown-type'
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(323) : error C2065: 'm_pins' : undeclared identifier
    d:\dev\CPP\FabricSplice\FabricUI\GraphView\Node.cpp(325) : error C2065: 'm_pins' : undeclared identifier

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    Hi Ahmidou, glad to hear it's almost there. What is the branch of commit of FabricUI that you are working with?

    Peter Zion
    Fabric Engine

  • AhmidouAhmidou Posts: 179 ✭✭

    I'm on Pablo, last commit.

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    I'm trying to understand what can be wrong here. What does the constructor declaration on line 25 of d:\dev\CPP\FabricSplice\FabricUI\GraphView\NodeBubble.h look like? For me it takes a Node * as the first parameter, but your errors suggest it takes a Graph *..

    Peter Zion
    Fabric Engine

  • AhmidouAhmidou Posts: 179 ✭✭

    yes, can't find why, the decalration seems good:
    NodeBubble( Node *node, GraphConfig const &config = GraphConfig() );

  • AhmidouAhmidou Posts: 179 ✭✭

    Ho my bad I was pointing to 2.0.1 for the Fabric Dir.
    Sorry about that!

  • AhmidouAhmidou Posts: 179 ✭✭

    Got it compiled, thanks for the help!!!
    Should I log something for the FTL/Math.h?

  • pzionpzion Moderator, Fabric Employee Posts: 117 Fabric Employee

    Yes please! mention for Borja to assign it directly to me :-)

    Peter Zion
    Fabric Engine

  • AhmidouAhmidou Posts: 179 ✭✭
  • borjaborja Administrator, Fabric Employee Posts: 480 admin

    Internal ticket FE-6262 was created for this issue.

    Borja Morales
    Technical Product Manager
    Fabric Software Inc.

  • laschmoovelaschmoove Posts: 17

    Hello,
    I am facing that same problem. What is your recommended way of working around it?
    Thanks and best regards!

  • AhmidouAhmidou Posts: 179 ✭✭

    @Peter Zion , @laschmoove , I faced the problem again while trying to build for Maya and found that the problem was a bad path, this can also happen when include path are duplicated:
    http://scons.1086193.n5.nabble.com/problems-with-math-functions-td24113.html#a24116

Sign In or Register to comment.