Skip to content

building (and trying to run) on Ubuntu/Wayland #3

@drzraf

Description

@drzraf

To build on Ubuntu, various things are necessary:

  1. libocct-foundation-dev contains the /usr/lib/x86_64-linux-gnu/cmake/opencascade/OpenCASCADEConfig.cmake file find_package() looks for.
  2. But said cmake package will complain if any of the libocct-* module is missing. All of them are necessary
  3. => $ apt install libocct-*
  4. Won't build if any of libglfw3, libglfw3-dev, libimgui-dev, libxrandr-dev, libtbb12 or libtbb-dev is missing (worth being added to the README file)
  5. Also the include directory of the opencascade cmake package isn't automatically added to the final compilation command-line. An include_directories(${OpenCASCADE_INCLUDE_DIR}) is also needed.

Once done, it runs and output:

OpenGL info:
  GLXDirectRendering: Yes
  GLXVendor: SGI
  GLXVersion: 1.4
  GLXClientVendor: Mesa Project and SGI
  GLXClientVersion: 1.4
  GLvendor: Intel
  GLdevice: Mesa Intel(R) HD Graphics 630
  GLversion: 4.6 (Core Profile) Mesa 24.0.9
  GLSLversion: 4.60
  Max texture size: 16384
  Max FBO dump size: 4096x16384
  Max combined texture units: 192
  Max MSAA samples: 16
  Viewport: 800x600
  GPU memory: 15879 MiB
  ResolutionRatio: 

but only a black and sluggish OCCT IMGUI X window appear with no control.

I thought (without any proof) that it may be due to libglfw3 in Wayland environment. But replacing that lib by its libglfw3-wayland counterpart keeps compilation from succeeding:

/usr/bin/ld: CMakeFiles/OcctImgui.dir/GlfwOcctWindow.cpp.o: in function `GlfwOcctWindow::GlfwOcctWindow(int, int, TCollection_AsciiString const&)':
GlfwOcctWindow.cpp:(.text+0x14a): undefined reference to `glfwGetX11Display'
/usr/bin/ld: CMakeFiles/OcctImgui.dir/GlfwOcctWindow.cpp.o: in function `GlfwOcctWindow::NativeHandle() const':
GlfwOcctWindow.cpp:(.text+0x248): undefined reference to `glfwGetX11Window'
/usr/bin/ld: CMakeFiles/OcctImgui.dir/GlfwOcctWindow.cpp.o: in function `GlfwOcctWindow::NativeGlContext() const':
GlfwOcctWindow.cpp:(.text+0x26a): undefined reference to `glfwGetGLXContext'
collect2: error: ld returned 1 exit status

(These are part of the Native access glfw API)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions