Yubico / yubikey-personalization-gui

YubiKey Personalization GUI
https://developers.yubico.com/yubikey-personalization-gui
BSD 2-Clause "Simplified" License
198 stars 38 forks source link

Compilation instructions do not work on Debian 12.0 (linking error with -llib) #107

Open martinschwinzerl opened 1 year ago

martinschwinzerl commented 1 year ago

I tried to follow the instructions and to compile the application (version 3.1.25, 0dd58da) on a freshly installed Debian 12.0 amd64 system. After compiling the individual files, I was stuck at an error message regarding linking against the -llib library:

...
compiling ../build/release/MOCFiles/moc_yubikeylogger.cpp
moc yubikeyfinder.h
compiling ../build/release/MOCFiles/moc_yubikeyfinder.cpp
moc yubikeyconfig.h
compiling ../build/release/MOCFiles/moc_yubikeyconfig.cpp
linking ../build/release/yubikey-personalization-gui
/usr/bin/ld: cannot find -llib: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:290: ../build/release/yubikey-personalization-gui] Error 1

This can be fixed by first heading into the lib directory and compiling this auxiliary library first, then resuming with the compilation of the tool itself:

martin@computer:~/downloads/git/yubikey-personalization-gui/lib$ qmake 
Info: creating stash file /home/martin/downloads/git/yubikey-personalization-gui/lib/.qmake.stash
Project MESSAGE: Release build
martin@computer:~/downloads/git/yubikey-personalization-gui/lib$ make
compiling scanedit.cpp
compiling us-scanedit.cpp
compiling de-scanedit.cpp
compiling bepo-scanedit.cpp
compiling fr-scanedit.cpp
compiling yubikeyutil.cpp
rm -f release/liblib.a
ar cqs release/liblib.a scanedit.o us-scanedit.o de-scanedit.o bepo-scanedit.o fr-scanedit.o yubikeyutil.o
martin@computer:~/downloads/git/yubikey-personalization-gui/lib$ cd release/
martin@computer:~/downloads/git/yubikey-personalization-gui/lib/release$ ls
liblib.a
martin@computer:~/downloads/git/yubikey-personalization-gui/lib/release$ cd ../../src/
martin@computer:~/downloads/git/yubikey-personalization-gui/src$ qmake
Info: creating stash file ~/downloads/git/yubikey-personalization-gui/src/.qmake.stash
Project MESSAGE: Release build
Project MESSAGE: Unix build
martin@computer:~/downloads/git/yubikey-personalization-gui/src$ make
...
linking ../build/release/yubikey-personalization-gui 

This should be reflected in the build instructions (unless I am overlooking something) Thanks!