akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.38k stars 61 forks source link

Build error (QT 5.15) under Gentoo #553

Open msdobrescu opened 1 week ago

msdobrescu commented 1 week ago

Hello,

Under Gentoo, building it with QT 5.15, I get:

level=warning msg="failed to patch binaries\r\nyou won't be able to simply \"go build/run\" your application, but qtdeploy-ing applications should work nevertheless" error="exit status 1" level=error msg="failed to run command" _func=RunCmd cmd="5.13.0/gcc_64/bin/qmake -query QT_INSTALL_PREFIX" dir= env= error="fork/exec 5.13.0/gcc_64/bin/qmake: no such file or directory" name="query install prefix path for linux on linux"

Well, is there a way to build against QT 5.15? If so, how?

akiyosi commented 1 week ago

@msdobrescu Hi :) Thank you for reporting the issue.

I appreciate this report as I have never attempted to build with Gentoo. What procedure are you trying to build and at what step of the procedure is the error occurring?

By the way, the error message you reported shows the following error:

fork/exec 5.13.0/gcc_64/bin/qmake: no such file or directory 

This indicates that the mechanism provided by qt bindings could not find the qmake command. in special cases where the qmake command is not in the expected location, the following environment variable can be used to directly specify the command path. Try to identify the path to the correct qmake command in the installed qt5 package and specify that path in the following environment variable.

export QT_QMAKE_DIR=/path/to/emake_dir
msdobrescu commented 1 week ago

Hi, I basically do this:

git clone https://github.com/akiyosi/goneovim
cd goneovim
git fetch --all --tags
git checkout tags/v0.6.8
make qt_bindings
make deps
make app
akiyosi commented 1 week ago

@msdobrescu How about specifying QT_QMAKE_DIR ?

msdobrescu commented 1 week ago

To what? On the build system I have qmake in /usr/lib64/qt5/bin/, but that does not seem to help at all.

akiyosi commented 1 week ago

In that case, do the following:

export QT_QMAKE_DIR=/usr/lib64/qt5/bin
msdobrescu commented 1 week ago

This went a bit further:

github.com/akiyosi/qt
github.com/akiyosi/qt/core
github.com/akiyosi/qt/core
core.cpp:67:10: fatal error: QExtensionFactory: No such file or directory
67 | #include <QExtensionFactory>
    |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

level=error msg="failed to install 'core'; aborting setup"
make: *** [Makefile:70: qt_bindings] Error 1
akiyosi commented 5 days ago

@msdobrescu How did you install the qt5 package?

msdobrescu commented 5 days ago

Is QExtensionFactory part of the QTDesigner? If so, MocaccinoOS (built on Gentoo) does not have it by default. Is this a build only dependency? I will add it to my build chain and come back! Thanks for your patience!

msdobrescu commented 5 days ago

That helped. Now it fails at:

github.com/akiyosi/qt
github.com/akiyosi/qt/core
github.com/akiyosi/qt/core
core.cpp:155:10: fatal error: QRemoteObjectPendingCallWatcher: No such file or directory
  155 | #include <QRemoteObjectPendingCallWatcher>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
level=error msg="failed to install 'core'; aborting setup"
[Makefile:70: qt_bindings] Error 1
akiyosi commented 4 days ago

@msdobrescu Try the following:

QT_PKG_CONFIG=true QT_API=5.13.0 /path/to/qtsetup
msdobrescu commented 4 days ago

I think the above error shows it needs pyside2, but I can't build it without some tricks. Regarding the paths, please provide some directory or binary name to look for in order to identify them in the Gentoo setup.

akiyosi commented 1 day ago

@msdobrescu I asked ChatGPT and was guided through the following steps. How about trying this?

1. Install dev-qt/qtremoteobjects:

The missing file likely belongs to the qtremoteobjects package. You can install it by running:

sudo emerge dev-qt/qtremoteobjects

2. Sync and Update System:

If the package is not available or the error persists, ensure your system is up-to-date and properly synced:

sudo emerge --sync
sudo emerge -avuDN @world
msdobrescu commented 1 day ago

So far I could use the binary, but now there it is missing a specific version of the tiff lib, so building is the only choice:

    libtiff.so.5 => not found

I'll try and come back. Thank you!

akiyosi commented 1 day ago

@msdobrescu Ah, so that's the situation. The following may help https://github.com/akiyosi/goneovim/issues/532 https://github.com/akiyosi/goneovim/issues/504

msdobrescu commented 1 day ago

Well, you build it against Qt5, while Gentoo goes now Qt6 and tries to eliminate 5 stuff (KF, Plasma etc.). As effect, dev-qt/qtremoteobjects is 6 only (also seems in alpha state with regard to Gentoo ebuilds). I'll try to symlink, although I doubt it's truly reliable - but I'll know when it will crash.

msdobrescu commented 1 day ago

Sorry, the symlink does not work for me.

akiyosi commented 1 day ago

@msdobrescu Ummm, Is it possible to install the qt5 package using the following procedure? Sorry, I am not able to try this as I do not have the Gentoo environment at hand.

1. Install dev-qt/qtremoteobjects

sudo emerge dev-qt/qtremoteobjects

2. Enable USE flag

echo "dev-qt/qtremoteobjects qt5" | sudo tee -a /etc/portage/package.use

3. Rebuild package

sudo emerge --newuse dev-qt/qtremoteobjects
msdobrescu commented 1 day ago

Thanks for your efforts!

Look here: https://packages.gentoo.org/packages/dev-qt/qtremoteobjects

It does not have such flag.

USE flags
Local Use Flags

    [qml](https://packages.gentoo.org/useflags/qml)

Global Use Flags

    [test](https://packages.gentoo.org/useflags/test)

Looking into the ebuild, there is no :5 at the end of the packages, so no QT 5 slot. It is :6, meaning QT 6 only.

We can replace :6 by :5, but I am not sure what may bring.

akiyosi commented 1 day ago

@msdobrescu I see. Thanks for the info.

I did a little research again, and it seems that dev-qt/qtremoteobjects is part of the Qt package, so it would seem that installing Qt5 would install the corresponding package.

Can you confirm that the version is currently Qt5 in your environment with the following command?

qmake --version

What is the output when you run the following command?

equery list dev-qt/qtremoteobjects
msdobrescu commented 1 day ago

First of all, I use MocaccinoOS, which is a built Gentoo, the main repo contains packages for both, 5 and 6, but some things are installed, some not. I must rely on the right package in order to build. Also, the build is done in a container using luet.

In my specific container for this build, I have:

qmake --version
QMake version 3.1
Using Qt version 5.15.14 in /usr/lib64

But do not expect to have everything there. Some packages are built on top when needed.

ACCEPT_KEYWORDS="~amd64" emerge --pretend --verbose dev-qt/qtremoteobjects

[ebuild  r  U ] dev-qt/qtbase-6.7.3 [6.7.2-r4] USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" 
[ebuild     U ] dev-qt/qtwayland-6.7.3 [6.7.2-r3] USE="accessibility vulkan -compositor -qml -test" 
[ebuild     U ] dev-qt/qtsvg-6.7.3 [6.7.2] USE="-test" 
[ebuild     U ] dev-qt/qtshadertools-6.7.3 [6.7.2] USE="-test" 
[ebuild     U ] dev-qt/qtdeclarative-6.7.3 [6.7.2] USE="accessibility jit network opengl sql ssl svg vulkan widgets -qmlls" 
[ebuild     U ] dev-qt/qttools-6.7.3 [6.7.2] USE="assistant clang designer linguist opengl qdbus qml vulkan widgets (zstd) -distancefieldgenerator -gles2-only -pixeltool -qdoc -qtattributionsscanner -qtdiag -qtplugininfo" LLVM_SLOT="18 -15 -16 -17" 
[ebuild     U ] dev-qt/qttranslations-6.7.3 [6.7.2]
[ebuild  N    ] dev-qt/qtremoteobjects-6.7.3  USE="-qml -test" 
[ebuild  rR   ] dev-python/PyQt6-6.7.1-r1  USE="dbus gui multimedia network opengl printsupport qml quick sql ssl svg webchannel websockets widgets xml -bluetooth -debug -designer -examples -gles2-only -help -nfc -pdfium -positioning -quick3d -remoteobjects% -sensors -serialport -spatialaudio -speech -testlib" PYTHON_TARGETS="python3_12 -python3_10 -python3_11 -python3_13" 

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-qt/qtsvg:6

  (dev-qt/qtsvg-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="-test" ABI_X86="(64)" pulled in by
    ~dev-qt/qtsvg-6.7.3:6 required by (dev-qt/qtdeclarative-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="accessibility jit network opengl sql ssl svg vulkan widgets -qmlls" ABI_X86="(64)"
    ^             ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

  (dev-qt/qtsvg-6.7.2-1:6/6.7.2::gentoo, installed) USE="-test" ABI_X86="(64)" pulled in by
    ~dev-qt/qtsvg-6.7.2:6 required by (dev-qt/qtvirtualkeyboard-6.7.2:6/6.7.2::gentoo, installed) USE="spell -test" ABI_X86="(64)"
    ^             ^^^^^^^                                                                                                                                                                                                                                            
    (and 1 more with the same problem)

dev-qt/qtwayland:6

  (dev-qt/qtwayland-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="accessibility vulkan -compositor -qml -test" ABI_X86="(64)" pulled in by
    ~dev-qt/qtwayland-6.7.3:6 required by (dev-qt/qtbase-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" ABI_X86="(64)"
    ^                 ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 

  (dev-qt/qtwayland-6.7.2-r3:6/6.7.2::gentoo, installed) USE="accessibility vulkan -compositor -qml -test" ABI_X86="(64)" pulled in by
    ~dev-qt/qtwayland-6.7.2:6 required by (dev-qt/qtbase-6.7.2-r4:6/6.7.2::gentoo, installed) USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" ABI_X86="(64)"
    ^                 ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

dev-qt/qtshadertools:6

  (dev-qt/qtshadertools-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="-test" ABI_X86="(64)" pulled in by
    ~dev-qt/qtshadertools-6.7.3:6 required by (dev-qt/qtdeclarative-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="accessibility jit network opengl sql ssl svg vulkan widgets -qmlls" ABI_X86="(64)"
    ^                     ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

  (dev-qt/qtshadertools-6.7.2-1:6/6.7.2::gentoo, installed) USE="-test" ABI_X86="(64)" pulled in by
    ~dev-qt/qtshadertools-6.7.2:6 required by (dev-qt/qt5compat-6.7.2-1:6/6.7.2::gentoo, installed) USE="icu qml -test" ABI_X86="(64)"
    ^                     ^^^^^^^                                                                                                                                                                                                                                                           
    (and 1 more with the same problem)

dev-qt/qtbase:6

  (dev-qt/qtbase-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" ABI_X86="(64)" pulled in by
    ~dev-qt/qtbase-6.7.3:6[gui,widgets] required by (dev-qt/qtsvg-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="-test" ABI_X86="(64)"
    ^              ^^^^^^^                                                                                                                                                                                                                                     
    (and 10 more with the same problem)

  (dev-qt/qtbase-6.7.2-r4:6/6.7.2::gentoo, installed) USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" ABI_X86="(64)" pulled in by
    ~dev-qt/qtbase-6.7.2:6[gui,icu=,network,xml] required by (dev-qt/qt5compat-6.7.2-1:6/6.7.2::gentoo, installed) USE="icu qml -test" ABI_X86="(64)"
    ^              ^^^^^^^                                                                                                                                                                                                                                                                                 
    (and 21 more with the same problem)

dev-qt/qttranslations:6

  (dev-qt/qttranslations-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="" ABI_X86="(64)" pulled in by
    ~dev-qt/qttranslations-6.7.3:6 required by (dev-qt/qtbase-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" ABI_X86="(64)"
    ^                      ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 

  (dev-qt/qttranslations-6.7.2-1:6/6.7.2::gentoo, installed) USE="" ABI_X86="(64)" pulled in by
    ~dev-qt/qttranslations-6.7.2:6 required by (dev-qt/qtbase-6.7.2-r4:6/6.7.2::gentoo, installed) USE="X accessibility concurrent cups dbus gtk gui icu libinput libproxy mysql network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -brotli -eglfs -evdev -gles2-only -gssapi -journald -oci8 -odbc -postgres -renderdoc -sctp -syslog -test -tslib" ABI_X86="(64)"
    ^                      ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

dev-qt/qtdeclarative:6

  (dev-qt/qtdeclarative-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="accessibility jit network opengl sql ssl svg vulkan widgets -qmlls" ABI_X86="(64)" pulled in by
    ~dev-qt/qtdeclarative-6.7.3:6[widgets?] required by (dev-qt/qttools-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) USE="assistant clang designer linguist opengl qdbus qml vulkan widgets (zstd) -distancefieldgenerator -gles2-only -pixeltool -qdoc -qtattributionsscanner -qtdiag -qtplugininfo" ABI_X86="(64)" LLVM_SLOT="18 -15 -16 -17"
    ^                     ^^^^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

  (dev-qt/qtdeclarative-6.7.2:6/6.7.2::gentoo, installed) USE="accessibility jit network opengl sql ssl svg vulkan widgets -qmlls" ABI_X86="(64)" pulled in by
    ~dev-qt/qtdeclarative-6.7.2:6[opengl] required by (dev-qt/qtcharts-6.7.2-1:6/6.7.2::gentoo, installed) USE="qml -gles2-only -test" ABI_X86="(64)"
    ^                     ^^^^^^^                                                                                                                                                                                                                                                                          
    (and 10 more with the same problem)

NOTE: Use the '--verbose-conflicts' option to display parents omitted above

The following packages are causing rebuilds:

  (dev-qt/qtbase-6.7.3:6/6.7.3::gentoo, ebuild scheduled for merge) causes rebuilds for:
    (dev-python/PyQt6-6.7.1-r1:0/0::gentoo, ebuild scheduled for merge)

 * IMPORTANT: 22 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

Above there is:

[ebuild N ] dev-qt/qtremoteobjects-6.7.3 USE="-qml -test"

N means it is not installed, all the versions are listed and all the packages needed to be re-emerged additionally to what is already (U is for upgrade to new version because it's actually a newer version of the tree than it is already built in the container, R for reemerge the same versions due to some needed flag changes).

msdobrescu commented 1 day ago

So, the package is missing, the possible version is QT6.

msdobrescu commented 15 hours ago

I've found a version 5 here: http://gpo.zugaina.org/dev-qt/qtremoteobjects/Dep#ptabs, I've renamed it to the current qt version, so it brought dev-qt/qtremoteobjects v5.15.14. The build was successful.

Now it throws the following errors: errors.txt

akiyosi commented 13 hours ago

@msdobrescu Thanks for your research! I'm trying to figure out exactly what the situation is, where in the following general build procedure of goneovim is the error occurring?

# Generate Qt bindings
make qt_bindings

# Get Dependent Libraries
make deps

# Test
make test

# Build
make app
msdobrescu commented 13 hours ago

The procedure is here, but it's a configuration of various steps, not linear and depends on luet and it's generation of these steps. It's also partly Gentoo, partly custom steps. It's disabled for the moment. The log is here: https://github.com/mocaccinoOS/community-repository/actions/runs/11091441752/job/30815239352

akiyosi commented 12 hours ago

Thank you. I'll look into it.