Trouble building hdbextractor-qt

Hi,

I'm trying to install hdbextractor-qt on an ubuntu 14.04 system running Tango 9.2.2. I've managed to compile and install /hdbextractor-qt (I used the release-0.94.0 version rather than trunk)

However, I'm getting a compiler error when trying to build hdbextractor-qt. I am following the instructions from this file: http://www.tango-controls.org/media/pybb_upload/attachments/0d4a844d-74ff-4a2e-abee-7ade26f7070c.txt

The qmake step completes successfully (I'm using QT4, is that correct?) but when I run make, I get this compiler error:



src/qhdbxutils.cpp:291:37: error: call of overloaded ‘isnan(double&)’ is ambiguous
                         if(isnan(val) || !indata[i].isValid() || indata[i].isNull())
                                     ^
src/qhdbxutils.cpp:291:37: note: candidates are:
In file included from /usr/include/features.h:374:0,
                 from /usr/include/x86_64-linux-gnu/sys/types.h:25,
                 from /usr/local/include/xvariant.h:4,
                 from src/qhdbxutils.h:4,
                 from src/qhdbxutils.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:234:1: note: int isnan(double)
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^
In file included from /usr/include/c++/4.8/random:38:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from /usr/include/qt4/QtCore/qglobal.h:68,
                 from /usr/include/qt4/QtCore/qiterator.h:45,
                 from /usr/include/qt4/QtCore/qvector.h:45,
                 from /usr/include/qt4/QtCore/QVector:1,
                 from src/qhdbxutils.h:6,
                 from src/qhdbxutils.cpp:1:

There were more warnings, let me know if I should attach the whole build log.

Thanks
Neilen
Hi,

I would suggest to replace
if(isnan(val) || !indata[i].isValid() || indata[i].isNull())
with
if(std::isnan(val) || !indata[i].isValid() || indata[i].isNull())
if you are compiling with C++11 flags or use a glibc >= 2.23 (https://sourceware.org/bugzilla/show_bug.cgi?id=19439)

Cheers,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi,

Indeed, with the diff below it compiles. Should I try and submit this patch upstream, and if so, how do I go about it?

Thanks
Neilen


Index: src/qhdbxutils.cpp
===================================================================
— src/qhdbxutils.cpp	(revision 30033)
+++ src/qhdbxutils.cpp	(working copy)
@@ -288,7 +288,7 @@
                     {
                         val = indata[i].toDoubleP()[j];
 
-                        if(isnan(val) || !indata[i].isValid() || indata[i].isNull())
+                        if(std::isnan(val) || !indata[i].isValid() || indata[i].isNull())
                             val = nan("NaN");
                         matrix[j + i * (*dataSize)] = val;
                         printf("\e[1;32msetting %f into %ld (dataSize %d, i %d)\e[0m\n", val, j + i * (*dataSize), i);


Reynald
Hi,

I would suggest to replace
if(isnan(val) || !indata[i].isValid() || indata[i].isNull())
with
if(std::isnan(val) || !indata[i].isValid() || indata[i].isNull())
if you are compiling with C++11 flags or use a glibc >= 2.23 (https://sourceware.org/bugzilla/show_bug.cgi?id=19439)

Cheers,
Reynald
Hi,

Following up on my previous post, I have not managed to build hdbextractor-qt, but I am a bit confused with the result. I was expecting a GUI app that I could run, but instead only libhdbextractor-qt.so.1.0.5 was built. What else do I need to build/install/do to get a GUI app that can query an hdb++ database?

Thanks
Neilen
Hello Neilen.

You can find a directory QHdbExtractor inside hdbextractor-qt folder.
qmake and make there!

Let me know.

Giacomo
Giacomo,

Thanks for that info. Unfortunately I get this error when trying to build:

src/qhdbextractor.cpp:2:37: fatal error: extscaleplotscenewidget.h: No such file or directory

What else do I need to install to build this package?

Thanks
Neilen


giacomos
Hello Neilen.

You can find a directory QHdbExtractor inside hdbextractor-qt folder.
qmake and make there!

Let me know.

Giacomo
Hi, Neilen

I think you not make and install tgraphicsplot and it's plugins

I find src/plugins/tgraphicsplotplugin.cpp have an error:

// #include "extscaletplotscenewidget.h"
// should be:
#include "extscaleplotscenewidget.h"

QWidget *ExtScaleTPlotSceneWidgetPlugin::createWidget(QWidget *parent)
{
    // return new ExtScaleTPlotSceneWidget(parent);
    // should be:
    return new ExtScalePlotSceneWidget(parent);
}
Edited 3 years ago
Hi Neilen,

did you know there is a java application for retrieving and displaying data from hdb++? It is called jhdbviewer. We use it at extensively and is optimised for large data sets. It could be complementary to hdbextractor-qt. If you are interested it can be made available as binary jar.

Andy
Hi,

Indeed, I would be interested in the JAR. :)


Andy
Hi Neilen,

did you know there is a java application for retrieving and displaying data from hdb++? It is called jhdbviewer. We use it at extensively and is optimised for large data sets. It could be complementary to hdbextractor-qt. If you are interested it can be made available as binary jar.

Andy
Hello,
You can download all you need from this page.
http://www.esrf.eu/computing/cs/tango/tango_doc/hdb_viewer/index.html
Hope this helps
Jean-Luc
 
Register or login to create to post a reply.