Current behavior
The bitcoin launcher hardcodes libexec when locating internal executables, while the CMake installation uses the configurable CMAKE_INSTALL_LIBEXECDIR.
Arch Linux builds Bitcoin Core with:
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_LIBEXECDIR=lib
See the Arch Linux bitcoin PKGBUILD.
This installs the binaries as:
/usr/lib/bitcoin-node
/usr/lib/bitcoin-gui
/usr/lib/bitcoin-chainstate
However, the following commands fail:
$ /usr/bin/bitcoin -m node --version
Error: execvp failed to execute '/usr/bin/bitcoin-node': No such file or directory
Try '/usr/bin/bitcoin --help' for more information.
$ /usr/bin/bitcoin -m gui --version
Error: execvp failed to execute '/usr/bin/bitcoin-gui': No such file or directory
Try '/usr/bin/bitcoin --help' for more information.
$ /usr/bin/bitcoin chainstate --version
Error: execvp failed to execute '/usr/bin/bitcoin-chainstate': No such file or directory
Try '/usr/bin/bitcoin --help' for more information.
Cause
install_binary_component(... INTERNAL) correctly installs binaries into ${CMAKE_INSTALL_LIBEXECDIR}, but ExecCommand() searches a hardcoded libexec directory:
Expected behavior
The launcher should locate internal executables using the configured CMAKE_INSTALL_LIBEXECDIR, so installations using a non-default value such as lib work correctly.
CC: @kpcyrd