[OpenIndiana-discuss] Compiling KeepassXC on Hipster

Alexander Pyhalov alp at sfedu.ru
Mon Dec 3 04:23:12 UTC 2018


Hi.

Code likely needs some casts, like in https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/library/webkitgtk/patches/03-functions-ambiguity.patch

С уважением,
Александр Пыхалов,
программист отдела телекоммуникационной инфраструктуры
управления информационно-коммуникационной инфраструктуры ЮФУ


________________________________________
От: bentahyr at chez.com <bentahyr at chez.com>
Отправлено: 3 декабря 2018 г. 6:07:34
Кому: openindiana-discuss at openindiana.org
Тема: [OpenIndiana-discuss] Compiling KeepassXC on Hipster

Hello,

I'm trying to compile KeepassXC from source using gcc-7 but I fall onto
the following issue :

[ 53%] Building CXX object
src/CMakeFiles/keepassx_core.dir/totp/totp.cpp.o
/home/ben/tmp/keepassxc-2.3.4/src/totp/totp.cpp: In static member
function '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);
                                                               ^
In file included from /usr/include/math.h:32:0,
                  from /usr/gcc/7/include/c++/7.3.0/bits/std_abs.h:40,
                  from /usr/gcc/7/include/c++/7.3.0/cstdlib:77,
                  from /usr/gcc/7/include/c++/7.3.0/bits/stl_algo.h:59,
                  from /usr/gcc/7/include/c++/7.3.0/algorithm:62,
                  from /usr/lib/qt/5.8/include/QtCore/qglobal.h:108,
                  from /home/ben/tmp/keepassxc-2.3.4/src/totp/totp.h:22,
                  from
/home/ben/tmp/keepassxc-2.3.4/src/totp/totp.cpp:19:
/usr/include/iso/math_iso.h:84:15: note: candidate: double
std::pow(double, double)
  extern double pow __P((double, double));
                ^~~
/usr/include/iso/math_iso.h:161:16: note: candidate: double
std::pow(double, int)
   inline double pow(double __X, int __Y) { return
                 ^~~
/usr/include/iso/math_iso.h:181:15: note: candidate: float
std::pow(float, float)
   inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
                ^~~
/usr/include/iso/math_iso.h:182:15: note: candidate: float
std::pow(float, int)
   inline float pow(float __X, int __Y) { return
                ^~~
/usr/include/iso/math_iso.h:212:21: note: candidate: long double
std::pow(long double, long double)
   inline long double pow(long double __X, long double __Y) { return
                      ^~~
/usr/include/iso/math_iso.h:214:21: note: candidate: long double
std::pow(long double, int)
   inline long double pow(long double __X, int __Y) { return
                      ^~~
gmake[2]: *** [src/CMakeFiles/keepassx_core.dir/build.make:1545:
src/CMakeFiles/keepassx_core.dir/totp/totp.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:230:
src/CMakeFiles/keepassx_core.dir/all] Error 2
gmake: *** [Makefile:141: all] Error 2

I think KeepassXC code expect pow coming from
/usr/gcc/7/include/c++/7.3.0/complex.h rather than
/usr/include/iso/math_iso.h

I tried to shuffle around the -I on the compiler command line but it
doesn't seem to have any impact

Compile command is :

cd /home/franck/tmp/keepassxc-2.3.4/build/src && /usr/bin/g++-7
-DKEEPASSX_BUILDING_CORE -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB
-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG
-DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB
-I/home/franck/tmp/keepassxc-2.3.4/build/src/keepassx_core_autogen/include
-I/home/franck/tmp/keepassxc-2.3.4/src
-I/home/franck/tmp/keepassxc-2.3.4/build/src
-I/home/franck/tmp/keepassxc-2.3.4/src/zxcvbn -isystem
/usr/lib/qt/5.8/include -isystem /usr/lib/qt/5.8/include/QtCore -isystem
/usr/lib/qt/5.8/./mkspecs/solaris-g++ -isystem
/usr/lib/qt/5.8/include/QtWidgets -isystem /usr/lib/qt/5.8/include/QtGui
-isystem /usr/lib/qt/5.8/include/QtNetwork -isystem
/usr/lib/qt/5.8/include/QtConcurrent -isystem
/usr/lib/qt/5.8/include/QtDBus -fno-common -Wall -Wextra -Wundef
-Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute
-fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong
-fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wold-style-cast
-Woverloaded-virtual -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-Werror=format-security -Wcast-align -std=c++11 -O3 -DNDEBUG   -fPIC
-std=gnu++11 -o CMakeFiles/keepassx_core.dir/totp/totp.cpp.o -c
/home/franck/tmp/keepassxc-2.3.4/src/totp/totp.cppEPASSX_BUILDING_CORE
-DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB
-DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS
-DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -I/usr/gcc/7/include/c++/7.3.0
-I/home/franck/tmp/keepassxc-2.3.4/build/src/keepassx_core_autogen/include
-I/home/franck/tmp/keepassxc-2.3.4/src
-I/home/franck/tmp/keepassxc-2.3.4/build/src
-I/home/franck/tmp/keepassxc-2.3.4/src/zxcvbn -isystem
/usr/lib/qt/5.8/include -isystem /usr/lib/qt/5.8/include/QtCore -isystem
/usr/lib/qt/5.8/./mkspecs/solaris-g++ -isystem
/usr/lib/qt/5.8/include/QtWidgets -isystem /usr/lib/qt/5.8/include/QtGui
-isystem /usr/lib/qt/5.8/include/QtNetwork -isystem
/usr/lib/qt/5.8/include/QtConcurrent -isystem
/usr/lib/qt/5.8/include/QtDBus -fno-common -Wall -Wextra -Wundef
-Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute
-fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong
-fno-exceptions -fno-rtti -Wnon-virtual-dtor -Wold-style-cast
-Woverloaded-virtual -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-Werror=format-security -Wcast-align -std=c++11 -O3 -DNDEBUG   -fPIC


Best regards.
ben

_______________________________________________
openindiana-discuss mailing list
openindiana-discuss at openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss



More information about the openindiana-discuss mailing list