[OpenIndiana-discuss] Compiling KeepassXC on Hipster

bentahyr at chez.com bentahyr at chez.com
Tue Dec 4 21:43:53 UTC 2018


The issue on autotype is related to QT.
The plugin for autotype doesn't load at start :
$ LANG=en_US.UTF-8 LD_LIBRARY_PATH=/usr/lib/qt/5.8/lib:/usr/local/lib 
/usr/local/bin/keepassxc
Qt: Session management error: Could not open network socket
Warning: using insecure memory!
Couldn't load translations.
Unable to load auto-type plugin:
Cannot resolve symbol "qt_plugin_instance" in 
/usr/local/lib/keepassxc/libkeepassx-autotype-xcb.so: (ld.so.1: 
keepassxc: fatal: qt_plugin_instance: can't find symbol)
QObject::startTimer: Timers cannot have negative interval

I have to add the LD_LIBRARY_PATH for QT, so I suspect I miss a few 
other path, though :
/usr/lib/qt/5.8/lib$ LANG=en_US.UTF-8 grep -R qt_plugin_instance *
Binary file amd64/libQt5DesignerComponents.so.5.8.0 matches
Binary file amd64/libQt5DesignerComponents.so.5 matches
Binary file amd64/libQt5Core.so.5.8 matches
Binary file amd64/libQt5DesignerComponents.so matches
Binary file amd64/libQt5DesignerComponents.so.5.8 matches
Binary file amd64/libQt5Core.so.5 matches
Binary file amd64/libQt5Core.so.5.8.0 matches
Binary file amd64/libQt5Core.so matches
Binary file libQt5Core.so matches
Binary file libQt5Core.so.5 matches
Binary file libQt5Core.so.5.8 matches
Binary file libQt5Core.so.5.8.0 matches
Binary file libQt5DesignerComponents.so matches
Binary file libQt5DesignerComponents.so.5 matches
Binary file libQt5DesignerComponents.so.5.8 matches
Binary file libQt5DesignerComponents.so.5.8.0 matches

I'm not sure why it doesn't find the symbol

Best regards.
Ben

On 04/12/2018 10:38, bentahyr at chez.com wrote:

> This is not perfect, this is what's left to do :
> - 64bits keepassxc and libargon2
> - autotype doesn't work, option (menu entries, shortcut) not present
> 
> libargon2 compiles out of the box
> https://github.com/P-H-C/phc-winner-argon2
> 
> cmake :
> - cmake linker flags -lsocket -lnsl -lrt -lresolv
> - cmake didn't find QT5 config utilities, I had to point it to the 
> directory
> - did compilation with GCC7 but I think default GCC6 should work as 
> well
> - due to GCC7, I added -I /usr/gcc/7/include/c++/7.3.0 to CXX_FLAGS
> 
> keepassxc patch :
> ==== cut here ====
> --- src/totp/totp.cpp   2018-08-23 03:25:04.000000000 +0000
> +++ src/totp/totp.cpp.mod       2018-12-04 09:09:32.413168641 +0000
> @@ -164,7 +164,7 @@
> direction = 1;
> startpos = 0;
> 
> }
> -    quint32 digitsPower = pow(encoder.alphabet.size(), digits);
> +    quint32 digitsPower = pow(double (encoder.alphabet.size()), 
> digits);
> 
> quint64 password = binary % digitsPower;
> QString retval(int(digits), encoder.alphabet[0]);
> ==== cut here ====
> 
> Best regards.
> Ben
> 
> On 04/12/2018 09:29, Till Wegmüller wrote:
> 
>> Nice work.
>> 
>> I would also be interested in it.
>> 
>> Could you Publish a patch or put a makefile into OI Userland?
>> 
>> Thanks and Greetings
>> Till
>> On 12/03/18 09:28 PM, bentahyr at chez.com wrote:
>> 
>> Thanks Bob and Alexander, I think I start to understand.
>> 
>> grep digits ../../src/totp/totp.cpp
>> [...]
>> quint8 digits = encoder.digits == 0 ? numDigits : encoder.digits;
>> [...]
>> 
>> From my 30 years old rusty knowledge of C++, this mean that digits is
>> supposed to be a 'quint8' which is most probably QT version of the 
>> 'int'
>> and as Bob noticed the pow function expects 'int', 'float', or 
>> 'double'
>> 
>> From Alexander reference, I should have
>> quint32 digitsPower = pow(encoder.alphabet.size(), int(digits));
>> 
>> In that particular case it was 'encoder.alphabet.size()'  which 
>> appeared
>> ambiguous, using 'double (encoder.alphabet.size())' made it. 'digits'
>> was ok so far
>> 
>> Bottom line is I could compile and execute it, it is nice to have it
>> native (works with wine).
>> 
>> Thanks both of you.
>> Best regards.
>> Ben
>> 
>> On 04/12/2018 03:21, Bob Friesenhahn wrote:
>> 
>> On Mon, 3 Dec 2018, bentahyr at chez.com wrote:
>> 
>> Hello,
>> 'static QString Totp::generateTotp(QByteArray, quint64, quint8,
>> quint8)':
>> /home/ben/tmp/keepassxc-2.3.4/src/totp/totp.cpp:167:62: error: call
>> of overloaded 'pow(int, quint8&)' is ambiguous
>> quint32 digitsPower = pow(encoder.alphabet.size(), digits);
>> 
>> What is the declared storage type of the 'digits' argument?  From
>> reading the header, it appears that it must be of type 'int', 'float',
>> or 'double'.  Any other type would require a type transformation which
>> might be ambiguous.
>> 
>> Bob



More information about the openindiana-discuss mailing list