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

Please support Open Cascade >7.4.0 (was: Build fails: fatal error: 'BRepAdaptor_HSurface.hxx' file not found) #359

Open
yurivict opened this issue Jan 27, 2022 · 13 comments

Comments

@yurivict
Copy link
Contributor

/disk-samsung/freebsd-ports/science/chrono/work/chrono-7.0.1/src/chrono_cascade/ChCascadeMeshTools.cpp:37:10: fatal error: 'BRepAdaptor_HSurface.hxx' file not found
#include <BRepAdaptor_HSurface.hxx>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~

Where is BRepAdaptor_HSurface.hxx expected to come from?

Version: 7.0.1
OS: FreeBSD 13

@rserban
Copy link
Member

rserban commented Jan 27, 2022

Open Cascade.

Did you provide the proper path to the (CMake) Open Cascade project configuration script during Chrono cmake configuration?
See https://api.projectchrono.org/module_cascade_installation.html. Note that we currently do not support Open Cascade 7.5.0.
Please post your CMakeCache.txt.

@yurivict
Copy link
Contributor Author

I have opencascade-7.6.0 and it doesn't install BRepAdaptor_HSurface.hxx.
It does install a similarly named BRepAdaptor_Surface.hxx though.

@rserban
Copy link
Member

rserban commented Jan 27, 2022

I should have been more clear. Currently, we only support Open Cascade 7.4.0.
7.5.0 and 7.6.0 are not supported yet (precisely because API changes such as this one).

@yurivict
Copy link
Contributor Author

Do you have a branch that supports the latest Open Cascade?

The FreeBSD port for Open Cascade has been updated a while ago and now Chrono fails to build.

@rserban
Copy link
Member

rserban commented Jan 27, 2022

No, not yet.

@yurivict
Copy link
Contributor Author

Is there an ETA?

@rserban
Copy link
Member

rserban commented Jan 27, 2022

Unfortunately, no. I don't have the time right now and don't know if anyone else on our side is planning on doing that anytime soon. Having said that, we'd be more than happy to accept a pull request with this update (as long as the code also supports the current 7.4.0 version).

@yurivict
Copy link
Contributor Author

FYI: OpenCascade-7.4.0 doesn't even build with current cmake. I tried to resurrect the old version and found that it fails to build now.

@rserban
Copy link
Member

rserban commented Jan 29, 2022

Can you please provide more details? It works fine on the systems we are testing (Ubuntu, arch, Windows) but I do not have access to a FreeBSD system.
Note also that the cmake mechanism for finding and configuring Open Cascade in Chrono has changed. You must only provide the path to the directory which contains the Open Cascade configuration script (OpenCASCADEConfig.cmake) through the CMake variable OpenCASCADE_DIR. On my Ubuntu installation, this is /usr/local/lib/cmake/opencascade.

@yurivict
Copy link
Contributor Author

Ubuntu doesn't update packages as often. Everything is older on Ubuntu.

cmake in particular was updated recently, and it fails to configure older Open Cascade:

===>  Performing out-of-source build
/bin/mkdir -p /wrkdirs/usr/ports/cad/opencascade740/work/.build
-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Info. Detecting doxygen
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) (Required is at least version "1.8.4")
-- Info: TCL is used by OCCT
-- Found Tclsh: /usr/local/bin/tclsh8.6 (found version "8.6")
-- Info: TK is used by OCCT
-- Info: Freetype is used by OCCT
-- Found Freetype: /usr/local/lib/libfreetype.so (found version "2.11.0")
CMake Error at adm/cmake/vtk.cmake:159 (endif):
  Flow control statements are not properly nested.
Call Stack (most recent call first):
  CMakeLists.txt:14 (include)
  CMakeLists.txt:523 (OCCT_INCLUDE_CMAKE_FILE)


-- Configuring incomplete, errors occurred!

@rserban
Copy link
Member

rserban commented Jan 29, 2022

Ah, I see -- you're talking about configuring Open Cascade itself.
I am using CMake 3.22.0 myself. But I didn't enable VTK when configuring Open Cascade (not needed for how it's used with Chrono). Having said that, if I enable use of VTK, I get the same error as you. Looking at the code in adm/cmake/vtk.cmake it's pretty clear that there's a bug in there: if()s are not properly matched by endif()s. I doubt an older version of CMake would let that fly. Long story, short -- this is an issue to be brought up with the Open Cascade folks.

@yurivict yurivict changed the title Build fails: fatal error: 'BRepAdaptor_HSurface.hxx' file not found Please support Open Cascade >7.4.0 (was: Build fails: fatal error: 'BRepAdaptor_HSurface.hxx' file not found) Jan 30, 2022
@yurivict
Copy link
Contributor Author

I managed to resurrect OpenCascade-7.4.0 (thanks for the hint with VTK).

But please add support OpenCascade >7.4.0 when this would be possible.

@thepianoboy
Copy link
Contributor

This seems to be related to #357.

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

No branches or pull requests

3 participants