Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1371
Closed
Open
Issue created Jul 12, 2019 by Admin@OpenFOAM-adminMaintainer

NotImplemented macro conflicts with OpenVINO

Summary

A user on StackOverflow reported compilation errors when including both OpenFOAM and OpenVINO in one project. The root cause turned out to be OpenFOAM's NotImplemented macro, which conflicts with an exception class defined in OpenVINO.

Steps to reproduce

Include the OpenVINO headers after the OpenFOAM headers in an skeleton C++ file.

Example case

What is the current bug behaviour?

Lots of compile errors.

What is the expected correct behavior?

No compile errors.

Relevant logs and/or images

/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:316:13: error: ‘FatalError’ in namespace ‘Foam’ does not name a type
     ::Foam::FatalError((functionName), __FILE__, __LINE__)
             ^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:358:5: note: in expansion of macro ‘FatalErrorIn’
     FatalErrorIn(functionName)                                                 \
     ^
/opt/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/error.H:367:24: note: in expansion of macro ‘notImplemented’
 #define NotImplemented notImplemented(FUNCTION_NAME)
                        ^
/opt/intel_openvino/openvino/inference_engine/include/ie_common.h:210:7: note: in expansion of macro ‘NotImplemented’
 class NotImplemented : public std::logic_error
       ^
/opt/intel_openvino/openvino/inference_engine/include/details/ie_exception_conversion.hpp:60:55: warning: statement has no effect [-Wunused-value]
         case NOT_IMPLEMENTED:throw NotImplemented(msg);
                                                       ^
make: *** [Make/linux64GccDPInt64Opt/tabulatedCombustionModel/FPVANNModel/FPVANNModel.o] Error 1

Environment information

I am not the submitter of the StackOverflow issue so I do not know the environment. This behavior should be reproducible across all distributions.

  • OpenFOAM version :
  • Operating system :
  • Hardware info :
  • Compiler :

Possible fixes

src/OpenFOAM/lnInclude/error.H line 367 defines a macro that should not be visible outside of the public OpenFOAM headers.

## Reattaching the author to the issue ticket: @Botje ##

Edited Dec 11, 2019 by Kutalmış Berçin
Assignee
Assign to
Time tracking