houmain / keymapper

A cross-platform context-aware key remapper.
GNU General Public License v3.0
260 stars 22 forks source link

Unable to build the latest release from AUR #25

Closed Azarattum closed 2 years ago

Azarattum commented 2 years ago

Build fails with:

fatal: No names found, cannot describe anything.
CMake Error at CMakeLists.txt:153 (list):
list GET given empty list

CMake Error at CMakeLists.txt:154 (list):
list GET given empty list

CMake Error at CMakeLists.txt:155 (list):
list GET given empty list

— Configuring incomplete, errors occurred!

Commenting out these 3 lines makes it compile, but the version info seem to be broken.

...
#list (GET VERSION_LIST 0 CPACK PACKAGE VERSION_MAJOR)
#list (GET VERSION_LIST 1 CPACK PACKAGE VERSION_MINOR)
#list (GET VERSION_LIST 2 CPACK PACKAGE VERSION_PATCH)
...
$ ./keymapper —help
keymapper  (c) 2019-2022 by Albert Kalchmair
...
Azarattum commented 2 years ago

Also src/_version.h contains just empty quotation marks.

""

P.S. I'm looking at yay's cache at ~/.cache/yay/keymapper/src/keymapper-1.8.2

Azarattum commented 2 years ago

Hmm... Interesting. The cloned from git version compiles just fine. It creates a valid _version.h file at the cmake -B build step.

Azarattum commented 2 years ago

keymapper-git AUR package works perfectly fine.

houmain commented 2 years ago

Thanks for the thorough report. The last commit (7584cc1573e706a7b95c95202c6c3620f8f38d84, d11ad2ab46eb1d30804360499e5c95e42de807c6) should fix the problem, when the AUR packet is updated. Now it builds even when it could not retrieve the version. The version can also be passed to CMake using e.g. -DVERSION=1.8.3