[OpenIndiana-discuss] Compiling KeepassXC on Hipster

bentahyr at chez.com bentahyr at chez.com
Thu Jan 10 23:22:01 UTC 2019


Ok, I just needed a few more minutes obviously so I found where this 
options were defined by default :
CMakeLists.txt:add_gcc_compiler_flags("-fvisibility=hidden")
CMakeLists.txt:add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden")

commented them out and compiled it....

Et voila! It works (64bits as well), I finally have auto type function 
available which is quite cool.
I think I'm ready to try to package it.
Should I do 1PR for libargon2 and 1PR for KeepassXC  or 1 PR for both 
libargon2 and KeepassXC ?
64 bits build only or both 32/64 bits ?

Best regards.
Ben

Le 2019-01-11 11:17, bentahyr at chez.com a écrit :
> Hi all,
> I'm coming back to this and spent nearly 1.5 day on this. They used to
> have this issue on netbsd and first solved it by removing compilation
> option related to symbol visibility, then removed that hack later on
> but I cannot figure out how they work it out to not use the hack.
> 
> http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/security/keepassxc/Makefile.diff?only_with_tag=MAIN&r1=text&tr1=1.1&r2=text&tr2=1.2
> 
> Basically, I would like to try to compile without -fvisibility=hidden
> but I cannot get my head around how to make it through cmake
> The only packages (curl, gnome2-atk) in OI-userland having something
> to do with this option are using autoconfigure and diabling it is part
> of the configure script.
> 
> What would be the way to force cmake to tell gcc not to use
> -fvisibility=hidden ?
> 
> Best regards.
> Ben
> 
> On 05/12/2018 10:43, bentahyr at chez.com wrote:
> 
>> 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