[Kst] Build failure

Reinis Veips reinis.veips at wot.lv
Fri Sep 4 22:00:38 UTC 2015


Hi guys,
I'm not sure if this is the right place, but kst failed to build on my Arch
Linux box, with an error about ambigious function call which I resolved
with this patch:

diff --git a/src/libkstmath/curve.cpp b/src/libkstmath/curve.cpp
> index dc61ae1..05c992e 100644
> --- a/src/libkstmath/curve.cpp
> +++ b/src/libkstmath/curve.cpp
> @@ -1252,7 +1252,7 @@ qDebug() << "y not in bounds"
>          pt.setX(m_X * rX + b_X);
>          pt.setY(m_Y * rY + b_Y);
>          if (rect.contains(pt) && pt != lastPt &&
> -            (lastPt.isNull() || (abs(pt.x() - lastPt.x()) > size) ||
> ((size==0) && (abs(pt.y() - lastPt.y()) > 0)))) {
> +            (lastPt.isNull() || (fabs(pt.x() - lastPt.x()) > size) ||
> ((size==0) && (fabs(pt.y() - lastPt.y()) > 0)))) {
>  #ifdef BENCHMARK
>            ++numberOfPointsDrawn;
>  #endif
>

Basically it boils down to abs -> fabs.

Full error message:

[ 14%] Building CXX object
> src/libkstmath/CMakeFiles/kst2math.dir/curve.cpp.o
> /home/reinis/tmp/kst-git/src/kst/src/libkstmath/curve.cpp: In member
> function ‘virtual void Kst::Curve::updatePaintObjects(const
> Kst::CurveRenderContext&)’:
> /home/reinis/tmp/kst-git/src/kst/src/libkstmath/curve.cpp:1255:57: error:
> call of overloaded ‘abs(qreal)’ is ambiguous
>              (lastPt.isNull() || (abs(pt.x() - lastPt.x()) > size) ||
> ((size==0) && (abs(pt.y() - lastPt.y()) > 0)))) {
>
>
gcc version:

> reinis at workstation ~/tmp/kst-git $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
> Target: x86_64-unknown-linux-gnu
> Configured with: /build/gcc-multilib/src/gcc-5.2.0/configure --prefix=/usr
> --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
> --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
> --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
> --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
> --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
> --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
> --enable-linker-build-id --enable-lto --enable-plugin
> --enable-install-libiberty --with-linker-hash-style=gnu
> --enable-gnu-indirect-function --enable-multilib --disable-werror
> --enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
> Thread model: posix
> gcc version 5.2.0 (GCC)
>

qt version:

> reinis at workstation ~/tmp/kst-git $ pacman -Qi qt4
> Name           : qt4
> Version        : 4.8.7-2
>

Git revsion of kst I was building: b35d42633bde00f5dfe40a97bccd689fa78f51df
(latest at the time of writing).

Hope this helps,
Reinis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kst/attachments/20150905/5d9f3f23/attachment.html>


More information about the Kst mailing list