Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unable to compile TiglViewer on gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0 #948

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Conversation

Mk-arc
Copy link
Contributor

@Mk-arc Mk-arc commented Feb 21, 2023

I checked out the current master and simply tried.

mkdir build
cmake ..
make

which leads to the following error:

/<user>/git/tigl/src/fuselage/ITiGLFuselageDuctStructure.cpp: In function ‘TopoDS_Wire tigl::{anonymous}::project(TopoDS_Shape, BRepProj_Projection&, tigl::DebugScope&)’:
/<user>/git/tigl/src/fuselage/ITiGLFuselageDuctStructure.cpp:111:60: error: variable ‘TopTools_ListIteratorOfListOfShape it’ has initializer but incomplete type
  111 |         for (TopTools_ListIteratorOfListOfShape it(wireList); it.More(); it.Next()) {
      |                                                            ^
/home/kisle/git/tigl/src/fuselage/ITiGLFuselageDuctStructure.cpp:128:60: error: variable ‘TopTools_ListIteratorOfListOfShape it’ has initializer but incomplete type
  128 |         for (TopTools_ListIteratorOfListOfShape it(wireList); it.More(); it.Next()) {

Description

The problem is resolved by importing the proper header required by TopTools_ListIteratorOfListOfShape.

How Has This Been Tested?

running the build again:

mkdir build
cmake ..
make

This time it works.

Checklist:

  • A test for the new functionality was added.
  • All tests run without failure.
  • The new code complies with the TiGL style guide.
  • New classes have been added to the Python interface.
  • API changes were documented properly in tigl.h.

@joergbrech
Copy link
Contributor

Thanks! But also strange, since we don't have any problems with gcc in our CI. Which OpenCascade version are you using?

@Mk-arc
Copy link
Contributor Author

Mk-arc commented Feb 21, 2023

I basically just installed liboce and libocct from the standard Ubuntu 22.10 apt repository

dpkg -l | grep liboce
ii  liboce-foundation-dev:amd64                   0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform library development files
ii  liboce-foundation11:amd64                     0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform shared library
ii  liboce-modeling-dev:amd64                     0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform library development files
ii  liboce-modeling11:amd64                       0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform shared library
ii  liboce-ocaf-dev:amd64                         0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform library development files
ii  liboce-ocaf-lite-dev:amd64                    0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform library development files
ii  liboce-ocaf-lite11:amd64                      0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform shared library
ii  liboce-ocaf11:amd64                           0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform shared library
ii  liboce-visualization-dev:amd64                0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform library development files
ii  liboce-visualization11:amd64                  0.18.3-2                                          amd64        OpenCASCADE Community Edition CAE platform shared library
dpkg -l | grep libocct
ii  libocct-data-exchange-7.5:amd64               1:7.5.2+dfsg1-0~202107020155~ubuntu22.04.1        amd64        Open CASCADE Technology module for CAD data format interoperability
ii  libocct-foundation-7.5:amd64                  1:7.5.2+dfsg1-0~202107020155~ubuntu22.04.1        amd64        OCCT module underlying all other OCCT classes
ii  libocct-modeling-algorithms-7.5:amd64         1:7.5.2+dfsg1-0~202107020155~ubuntu22.04.1        amd64        Open CASCADE Technology geometrical & topological algorithms module
ii  libocct-modeling-data-7.5:amd64               1:7.5.2+dfsg1-0~202107020155~ubuntu22.04.1        amd64        Open CASCADE Technology 2D/3D geometric primitives data structures
ii  libocct-ocaf-7.5:amd64                        1:7.5.2+dfsg1-0~202107020155~ubuntu22.04.1        amd64        Open CASCADE Technology application-specific data and functionality
ii  libocct-visualization-7.5:amd64               1:7.5.2+dfsg1-0~202107020155~ubuntu22.04.1        amd64        Open CASCADE Technology graphical data visualization module

@joergbrech
Copy link
Contributor

Maybe that's just it. We are currently building TiGL with version 7.4. But either way, adding the missing include makes sense.

@joergbrech joergbrech merged commit 4075643 into DLR-SC:master Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants