Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-6419

ROOT-6.00.01 fails to build with geocad support due to conficting function definition

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • 6.00.01
    • 6.06/00, 6.02/14, 6.04/04
    • Geometry
    • None
    • Gentoo Linux ~amd64, gcc-4.8.2, clang-3.4, opencascade-6.7.0

    Description

      As one can see both opencascade and root define Printf() in global scope with conflicting definitions.

      bin/rmkdepend -R -fgeom/geocad/src/TGeoToOCC.d -Y -w 1000 – -pipe -m64 -fPIC -march=native -O2 -funswitch-loops -fpredictive-commoning -ftree-vectorize -ftree-slp-vectorize -fvect-cost-model -fgcse-after-reload -ftree-partial-pre -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -fexcess-precision=fast -pipe -frecord-gcc-switches -fvisibility-inlines-hidden -std=c++11 -Wno-deprecated-declarations -pthread -DHAVE_CONFIG_H -I/usr/lib64/opencascade-6.7.0/ros/lin/inc -Iinclude -D__cplusplus – /home/andrew/src/root/geom/geocad/src/TGeoToOCC.cxx
      g++ -O2 -DNDEBUG -pipe -m64 -fPIC -march=native -O2 -funswitch-loops -fpredictive-commoning -ftree-vectorize -ftree-slp-vectorize -fvect-cost-model -fgcse-after-reload -ftree-partial-pre -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -fexcess-precision=fast -pipe -frecord-gcc-switches -fvisibility-inlines-hidden -std=c++11 -Wno-deprecated-declarations -pthread -DHAVE_CONFIG_H -I/usr/lib64/opencascade-6.7.0/ros/lin/inc -Iinclude -o geom/geocad/src/TGeoToOCC.o -c /home/andrew/src/root/geom/geocad/src/TGeoToOCC.cxx
      In file included from include/TNamed.h:29:0,
      from include/TGeoShape.h:16,
      from include/TGeoBBox.h:16,
      from include/TGeoXtru.h:16,
      from include/TGeoToOCC.h:21,
      from /home/andrew/src/root/geom/geocad/src/TGeoToOCC.cxx:47:
      include/TString.h:462:37: error: new declaration 'void Printf(const char*, ...)'
      _attribute_((format(printf, 1, 2)))
      ^
      In file included from /usr/lib64/opencascade-6.7.0/ros/lin/inc/Standard_PrimitiveTypes.hxx:46:0,
      from /usr/lib64/opencascade-6.7.0/ros/lin/inc/Handle_Standard_Transient.hxx:27,
      from /usr/lib64/opencascade-6.7.0/ros/lin/inc/Handle_MMgt_TShared.hxx:17,
      from /usr/lib64/opencascade-6.7.0/ros/lin/inc/Handle_TopoDS_TShape.hxx:17,
      from /usr/lib64/opencascade-6.7.0/ros/lin/inc/TopoDS_Shape.hxx:20,
      from include/TGeoToOCC.h:16,
      from /home/andrew/src/root/geom/geocad/src/TGeoToOCC.cxx:47:
      /usr/lib64/opencascade-6.7.0/ros/lin/inc/Standard_CString.hxx:66:6: error: ambiguates old declaration 'int Printf(const char*, ...)'
      __Standard_API int Printf (const char* theFormat, ...);
      ^
      make: *** [geom/geocad/src/TGeoToOCC.o] Error 1

      Attachments

        Activity

          People

            mato Pere Mato Vila
            6a3c96007491cb013881 Andrew Savchenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: