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

Cannot compile Plus on Debian 12 (bookworm) Linux #1096

Open
benzwick opened this issue Jun 23, 2023 · 14 comments
Open

Cannot compile Plus on Debian 12 (bookworm) Linux #1096

benzwick opened this issue Jun 23, 2023 · 14 comments
Assignees

Comments

@benzwick
Copy link

When I try to compile Plus on Debian 12 (bookworm) Linux I get the following error:

[ 95%] Linking CXX shared module ../../../lib/qml/VTK.9.1/libqmlvtkpluginD.so
Generating qmltypes file using qmlplugindump
QQmlComponent: Component is not ready
make[5]: *** [GUISupport/QtQuick/qml/CMakeFiles/qmlvtkplugin.dir/build.make:150: lib/qml/VTK.9.1/libqmlvtkpluginD.so] Error 3
make[5]: *** Deleting file 'lib/qml/VTK.9.1/libqmlvtkpluginD.so'
make[4]: *** [CMakeFiles/Makefile2:11494: GUISupport/QtQuick/qml/CMakeFiles/qmlvtkplugin.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/vtk.dir/build.make:98: vtk-prefix/src/vtk-stamp/vtk-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/vtk.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

Maybe it is related to https://gitlab.kitware.com/vtk/vtk/-/issues/18219, https://gitlab.kitware.com/vtk/vtk/-/issues/18714 or https://gitlab.kitware.com/vtk/vtk/-/issues/18964 but I cannot find a solution.

@benzwick
Copy link
Author

The results are similar on Ubuntu 22.04.

I've created a GitHub action here to test the compilation of PlusBuild on Ubuntu 22.04: benzwick/PlusBuild#1

This is the output (https://github.com/benzwick/PlusBuild/actions/runs/5359279119/jobs/9722668307?pr=1):

[ 95%] Linking CXX shared module ../../../lib/qml/VTK.9.1/libqmlvtkpluginD.so
Generating qmltypes file using qmlplugindump
QQmlComponent: Component is not ready
make[5]: *** [GUISupport/QtQuick/qml/CMakeFiles/qmlvtkplugin.dir/build.make:150: lib/qml/VTK.9.1/libqmlvtkpluginD.so] Error 3
make[5]: *** Deleting file 'lib/qml/VTK.9.1/libqmlvtkpluginD.so'
make[4]: *** [CMakeFiles/Makefile2:11476: GUISupport/QtQuick/qml/CMakeFiles/qmlvtkplugin.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/vtk.dir/build.make:98: vtk-prefix/src/vtk-stamp/vtk-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/vtk.dir/all] Error 2
make: *** [Makefile:101: all] Error 2
Error: Process completed with exit code 2

@turtleizzy
Copy link

turtleizzy commented Sep 10, 2023

I encountered similar issue on Ubuntu 22.04 and this comment helped.

If anyone came across this on Ubuntu 20.04 using Qt 5 from the distro packages and none of the above helped, you are most likely missing these packages. sudo apt install qml-module-qtquick* fixed it for me.

FYI, on Ubuntu 22.04 qt5-default doesn't exist any longer, this is the actual apt install command I used for successful building.

sudo apt update && sudo apt install git build-essential cmake qtbase5-dev qt5-qmake qtmultimedia5-dev qttools5-dev libqt5xmlpatterns5-dev qtbase5-private-dev libqt5x11extras5-dev libxt-dev qtdeclarative5-dev libqt5webenginewidgets5 qml-module-qtquick\*

@lassoan
Copy link
Contributor

lassoan commented Sep 10, 2023

Thank you for the comments and suggestions @turtleizzy and @benzwick.

@Sunderlandkyl when you have the time it would be nice if you could add these to the documentaiton.

@adamrankin
Copy link
Member

Documentation added in PlusToolkit/PlusBuild@cc63660

@aitor-ollo
Copy link

Hello,
I am trying to build Plus in Ubuntu 22.04.

Even after using the above mentioned apt install command, I still get the same error in the master branch, it is a clean installation and I followed the documentation step by step (I got a similar result in Ubuntu 20.04):

[ 95%] Linking CXX shared module ../../../lib/qml/VTK.9.1/libqmlvtkpluginD.so
Generating qmltypes file using qmlplugindump
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QQmlComponent: Component is not ready
make[5]: *** [GUISupport/QtQuick/qml/CMakeFiles/qmlvtkplugin.dir/build.make:150: lib/qml/VTK.9.1/libqmlvtkpluginD.so] Error 3
make[5]: *** Deleting file 'lib/qml/VTK.9.1/libqmlvtkpluginD.so'
make[4]: *** [CMakeFiles/Makefile2:11494: GUISupport/QtQuick/qml/CMakeFiles/qmlvtkplugin.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/vtk.dir/build.make:92: vtk-prefix/src/vtk-stamp/vtk-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/vtk.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

I tried to compile the Plus-2.8 branch, and I don't get any link error at this point.

Thank you!

@adamrankin
Copy link
Member

I will try a clean build and confirm

@adamrankin adamrankin reopened this Jan 16, 2024
@adamrankin
Copy link
Member

Are you able to build the vtk subproject and identify its build error?

I am getting one as well, but I'm not sure if it's specific to my hardware.

@turtleizzy
Copy link

I did have a successful de-novo binary build on Ubuntu 22.04 (to be exact, Linux Mint 21.2) following this instruction:
https://github.com/PlusToolkit/PlusBuild/blob/master/Docs/BuildInstructionsLinux.md
I was using VTK toolkit in the SuperBuild bundle without further configuration. However since I have quite a lot of packages installed, I am not sure whether some random package on my machine happened to be the key to successful build.
I think reproducing in a ubuntu 22.04 docker can actually verify if the dependency suffices.

@aitor-ollo
Copy link

Are you able to build the vtk subproject and identify its build error?

I am getting one as well, but I'm not sure if it's specific to my hardware.

Thank you for the quick response. I will let you know as soon as I figure out how to build the vtk subproject (I am not really experienced with cmake).

@aitor-ollo
Copy link

I did have a successful de-novo binary build on Ubuntu 22.04 (to be exact, Linux Mint 21.2) following this instruction: https://github.com/PlusToolkit/PlusBuild/blob/master/Docs/BuildInstructionsLinux.md I was using VTK toolkit in the SuperBuild bundle without further configuration. However since I have quite a lot of packages installed, I am not sure whether some random package on my machine happened to be the key to successful build. I think reproducing in a ubuntu 22.04 docker can actually verify if the dependency suffices.

I also tried to build it in a new virtual machine with Mint 21.2 following the instructions you mentioned, and I get exactly the same error. To get to this point I had to install OpenGL with sudo apt-get install libgl1-mesa-dev and sudo apt-get install libegl1-mesa-dev.

@adamrankin
Copy link
Member

I had to install libglvnd-dev to get a step further, still have an error though

@aitor-ollo
Copy link

I tried installing libglvnd-dev, this was enough to avoid installing libgl1-mesa-dev and libegl1-mesa-dev, but then I got the same error as before.

@turtleizzy
Copy link

turtleizzy commented Jan 19, 2024

I reproduced building process in ubuntu 22.04 docker. I can confirm installing libglvnd-dev was necessary. Here is my dockerfile.

FROM ubuntu:22.04
ADD PlusBuild-master.zip /
WORKDIR /
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get install -y \
    # Necessary commandline utilities
    unzip git \
    # Here are from the documentation
    build-essential cmake \
    qtbase5-dev qt5-qmake qtmultimedia5-dev qttools5-dev libqt5xmlpatterns5-dev \
    qtbase5-private-dev libqt5x11extras5-dev libxt-dev qtdeclarative5-dev libqt5webenginewidgets5 qml-module-qtquick\* \
    # Here are the additional packages
    libglvnd-dev \
    # Here are some other utilities specific to my network connection
    # you can safely remove proxychains before the make command
    # if you don't need a proxy to clone from github
    proxychains
RUN unzip PlusBuild-master.zip && \
    mv PlusBuild-master PlusBuild && \
    mkdir PlusBuild-bin && \
    cd PlusBuild-bin && \
    cmake ../PlusBuild -DCMAKE_BUILD_TYPE=Release
ADD proxychains.conf /etc/
RUN cd /PlusBuild-bin && \
    proxychains make -j8

PlusBuild-master.zip was the mirror of the current master branch (commit: 2caaeb4).

Note that you can safely remove everything related to proxychains as long as you don't have connectivity issues with github.
I didn't wait until the whole building process finished due to connectivity issues but I confirmed the successful building of vtk.
I think following the steps in the documentation and installing libglvnd-dev should be sufficient to successfully build vtk 9.1 in the superbuild bundle.

image

Update:

The building process finished successfully with the provided dockerfile. You can try this out.

image

@aitor-ollo
Copy link

Thank you @adamrankin and @turtleizzy for your support!

Apart from missing the libglvnd-dev I was executing
cmake ../PlusBuild
instead of
cmake ../PlusBuild -DCMAKE_BUILD_TYPE=Release

I looks like it was trying to link this:
Linking CXX shared module ../../../lib/qml/VTK.9.1/libqmlvtkpluginD.so
instead of
Linking CXX shared module ../../../lib/qml/VTK.9.1/libqmlvtkplugin.so

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

6 participants