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

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);


[quote=“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[/quote]

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

[quote=“giacomos”]Hello Neilen.

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

Let me know.

Giacomo[/quote]

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);
}

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. :slight_smile:

[quote=“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[/quote]

Hello,
You can download all you need from this page.

Hope this helps
Jean-Luc

Hi Jean-Luc

Is there have hdb++ configurator JAR, i need hdb++ configurator GUI to add attributes to archiver,or start and stop attributes archiving. but i don’t know how to make this JAR file from source code in svn (no knowledge of java)

Hi,

HDB++ configurator jar file can be downloaded from ESRF ftp site:
ftp://ftp.esrf.fr/pub/cs/tango/hdb++/

Here is the HDB++ configurator startup script:


#!/bin/bash
#
#-----------------------------------------------------------------------
#	Source the JavaAppliStartup script which defines a few variables
#       which you can use later in your script :
# 
#  TANGO (for TangORB.jar)
#  TACO  (for Taco.jar)
#  ATK  (for the 2 jarfiles ATKCore and ATKWidget)
#  TANGOPANELS (for tangopanels.jar)
#  ATKPANEL (for atkpanel.jar)
#  LIBHOME (for the folder where all java library jarfiles are located)
#  TACOLIBHOME (for the folder where all TACO java library jarfiles are located)
#  APPLIHOME (for the folder where your application jarfile should be located)
#  JAVA (for the JVM to use for the application startup)
#---------------------------------------------------------

TANGO_HOME=/operation/dserver/java
. $TANGO_HOME/scripts/Common/JavaAppliStartup

#--------------------------------------------------------------------------------
#   If you need to modify any of the variables above do it here
#   In most cases this section is empty
#
#   For example :
#   JAVA=/opt/java-1.6.0_18/bin/java   if you need to use another JVM than the default one
#   TANGO=$LIBHOME/TangORB-7.3.0.jar
#   ATK=$LIBHOME/ATKCore-4.1.6.jar:$LIBHOME/ATKWidget-4.1.6.jar
#   ATKPANEL=$APPLIHOME/atkpanel-4.3-old.jar
#-------------------------------------------------------------------------------


JIVE=$APPLIHOME/Jive.jar
ASTOR=$APPLIHOME/astor.jar

JYTHON=$LIBHOME/jython.jar
JCALENDAR=$LIBHOME/JCalendar/jcalendar.jar
HDB_LIBS=$LIBHOME/HDB++.jar:$JYTHON:$JCALENDAR
HDB=$APPLIHOME/jhdbviewer.jar:$HDB_LIBS

export HdbExtraction=true
export HDB_MYSQL_HOST=hdbplus

#--------------------------------------------------------------------------------
#   Set the variables for Application jarfile, Package and Main class name
#
#  Set APPLI_JAR to the absolute pathname of your application's jarfile
#  Set APPLI_PACKAGE to the fully qualified package name which contains the main class
#         example : fr.esrf.tangoatk.widget.util.jdraw
#  Set APPLI_MAIN_CLASS to the name of the main class that this script should start
#-------------------------------------------------------------------------------
APPLI_JAR=$APPLIHOME/hdb_configurator.jar
APPLI_PACKAGE=org.tango.hdb_configurator
APPLI_MAIN_CLASS=configurator.HdbConfigurator


#--------------------------------------------------------------------------------
#   Set the eventual additional variables Specific to the application
#
#   Here you can add some jarfiles which contains other applications you may launch
#   through your application
#-------------------------------------------------------------------------------

#
#	if manager device is passed, forward it
#	else set the default one (for MySql)
#
if [ -n "$1" ]
then
	HdbManager=$1
else
	HdbManager=tango/hdb/manager
fi
export HdbManager


#--------------------------------------------------------------------------------
#  Set the CLASSPATH
#-------------------------------------------------------------------------------
CLASSPATH=$EXTRACTION:$TANGO:$ATK:$JIVE:$APPLI_JAR:$ASTOR:$HDB
export CLASSPATH
echo "CLASSPATH=$CLASSPATH"


#--------------------------------------------------------------------------------
#  Set the TANGO_HOST
#	!!!!!!!  MUST BE ON 10000 !!!!!
#-------------------------------------------------------------------------------
TANGO_HOST=orion:10000
export HDB_TYPE=cassandra
export HDB_CONTACT_POINTS="hdbr1,hdbr2,hdbr3"

#-----------------------------------------------------------------------------------
#       Start the application 
#
#       All applications should normally have the same startup command line
#-----------------------------------------------------------------------------------
#
$JAVA -version

echo "Starting $APPLI_MAIN_CLASS ..."

$JAVA $APPLI_PACKAGE.$APPLI_MAIN_CLASS $*

Hope this helps
Jean-Luc