Ultimaker / cura-build-environment

CMake project to build dependencies for Cura
GNU Affero General Public License v3.0
24 stars 55 forks source link

Linux native build missing dependencies #113

Closed sunheat closed 2 years ago

sunheat commented 2 years ago

Hi team, I have spent days trying to resolve native build missing dependencies to no avail. Can you please give me a hint?

The errors:

ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed.

ERROR: Feature 'opengl-desktop' was enabled, but the pre-condition '(config.win32 && !config.winrt && !features.opengles2 && (config.msvc || libs.opengl))
                          || (!config.watchos && !config.win32 && !config.wasm && libs.opengl)' failed.

ERROR: Feature 'system-freetype' was enabled, but the pre-condition 'features.freetype && libs.freetype' failed.

ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.msvc && features.system-freetype && libs.fontconfig' failed.

ERROR: Feature 'xcb-xlib' was enabled, but the pre-condition 'features.xlib && libs.xcb_xlib' failed.

Environment: Ubuntu 20.04 VM on Windows 10 host.

Is there a way to satisfy these requirements or the Linux box needs to be a host OS instead of inside a VM?

If it's simple as following the instructions as you have written on this repository:

On Linux, the following dependencies are required in order to build Qt:

  • pkg-config
  • freetype
  • xcb
  • opengl-desktop
  • fontconfig

Then how can I satisfy these dependencies using apt or whatever?

Ghostkeeper commented 2 years ago

I've seen some of these errors myself (they occur during the build of Qt) when I tried building the build environment on CentOS 6. The problem back then was that CentOS6 doesn't have xkbcommon anywhere.

What you're having trouble with is really just building Qt itself, not Cura's build environment. So for help, you'd need to reference Qt's documentation. In particular, this seems to be relevant: https://doc.qt.io/qt-5/linux-requirements.html

That documentation has a list just below the table, of apt packages you should probably install.

I don't think it's necessary for the Linux environment to be native. Depending on the level of virtualisation, it should build fine on a VM. Our own builds are run on a Linux VM (but running on a Linux host too).

Ghostkeeper commented 2 years ago

I'll consider this question answered, but if you have follow-up questions, feel free to ask them still. We can always re-open the thread.