Bug#470246: labplot: FTBFS: ImportOPJ.cc:47: error: no matching function for call to 'Spreadsheet::setColumnType(int, ColumnType)'

2008-03-10 Thread Lucas Nussbaum
Package: labplot
Version: 1.6.0.1-1
Severity: serious
User: [EMAIL PROTECTED]
Usertags: qa-ftbfs-20080308 qa-ftbfs
Justification: FTBFS on i386

Hi,

During a rebuild of all packages in sid, your package failed to build on i386.

Relevant part:
  g++ -DPACKAGE_NAME=\\ -DPACKAGE_TARNAME=\\ -DPACKAGE_VERSION=\\ 
 -DPACKAGE_STRING=\\ -DPACKAGE_BUGREPORT=\\ -DLVERSION=\1.6.0\ 
 -DLVERSION_DATE=\Dec 17, 2007\ -DHAVE_STRTOD=1 -DHAVE_LOG2=1 
 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_TIFF=1 -DHAVE_GSL=1 -DHAVE_GSL14=1 
 -DHAVE_GSL16=1 -DHAVE_GSL17=1 -DGSL_DISABLE_DEPRECATED=1 -DHAVE_GSL18=1 
 -DHAVE_FFTW3=1 -DHAVE_FFTW3_THREADS=1 -DHAVE_JASPER=1 -DHAVE_MAGICK=1 
 -DHAVE_NETCDF=1 -DHAVE_AUDIOFILE=1 -DHAVE_HDF5=1 -DHAVE_GL=1 -DHAVE_QHULL=1 
 -DKDELIBSUFF=\\ -DHAVE_DLFCN_H=1 -DHAVE_SGI_STL=1 -DHAVE_CRYPT=1 
 -Dkde_socklen_t=socklen_t -Dksize_t=socklen_t -DHAVE_SYS_TYPES_H=1 
 -DHAVE_STDINT_H=1 -DHAVE_SYS_BITYPES_H=1 -DHAVE_RES_INIT=1 -DHAVE_RES_INIT=1 
 -DHAVE_RES_INIT_PROTO=1 -DSIZEOF_INT=4 -DSIZEOF_SHORT=2 -DSIZEOF_LONG=4 
 -DSIZEOF_CHAR_P=4 -DSIZEOF_SIZE_T=4 -DSIZEOF_UNSIGNED_LONG=4 
 -DHAVE_VSNPRINTF=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 
 -DHAVE_LIBJPEG=1 -DHAVE_LIBPTHREAD=1 -DSTDC_HEADERS=1 -I. -I. -I/usr/include 
 -I/usr/include -I/usr/include/qwtplot3d-qt3 -I/usr/include/kde 
 -I/usr/share/qt3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT 
 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion 
 -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG 
 -DNO_DEBUG -g -O2 -Wformat-security -Wmissing-format-attribute -fno-check-new 
 -fno-common -MT ImportOPJ.lo -MD -MP -MF .deps/ImportOPJ.Tpo -c ImportOPJ.cc  
 -fPIC -DPIC -o .libs/ImportOPJ.o
 ImportOPJ.cc: In member function 'int ImportOPJ::import()':
 ImportOPJ.cc:47: error: no matching function for call to 
 'Spreadsheet::setColumnType(int, ColumnType)'
 Spreadsheet.h:69: note: candidates are: void Spreadsheet::setColumnType(int, 
 QString)
 ImportOPJ.cc:53: error: cannot convert 'ColumnType' to 'const char*' for 
 argument '1' to 'int strcmp(const char*, const char*)'
 ImportOPJ.cc:65: error: 'class OPJFile' has no member named 
 'matrixParentFolder'
 ImportOPJ.cc:102: error: 'class OPJFile' has no member named 
 'noteParentFolder'
 ImportOPJ.cc:118: error: 'class OPJFile' has no member named 
 'graphParentFolder'
 ImportOPJ.cc:142: error: 'xlabel' was not declared in this scope
 ImportOPJ.cc:142: error: expected type-specifier before 'Label'
 ImportOPJ.cc:142: error: expected `;' before 'Label'
 ImportOPJ.cc:143: error: 'ylabel' was not declared in this scope
 ImportOPJ.cc:143: error: expected type-specifier before 'Label'
 ImportOPJ.cc:143: error: expected `;' before 'Label'
 ImportOPJ.cc:345: error: conversion from 'graphLayerRange' to non-scalar type 
 'std::vectordouble, std::allocatordouble ' requested
 ImportOPJ.cc:346: error: conversion from 'graphLayerRange' to non-scalar type 
 'std::vectordouble, std::allocatordouble ' requested
 make[3]: *** [ImportOPJ.lo] Error 1

The full build log is available from:
   http://people.debian.org/~lucas/logs/2008/03/08

A list of current common problems and possible solutions is available at 
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on about 50 AMD64 nodes
of the Grid'5000 platform, using a clean chroot containing a sid i386
environment.  Internet was not accessible from the build systems.

-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED] GPG: 1024D/023B3F4F |




Bug#470246: labplot: FTBFS: ImportOPJ.cc:47: error: no matching function for call to 'Spreadsheet::setColumnType(int, ColumnType)'

2008-03-10 Thread Frank S. Thomas
tags 470246 + confirmed patch pending
stop

On Monday 10 March 2008 09:48, Lucas Nussbaum wrote:
 During a rebuild of all packages in sid, your package failed to build on
 i386.

 Relevant part:
  ImportOPJ.cc: In member function 'int
  ImportOPJ::import()':
  ImportOPJ.cc:47: error: no matching function for call to
  'Spreadsheet::setColumnType(int, ColumnType)' Spreadsheet.h:69: note:
  candidates are: void Spreadsheet::setColumnType(int, QString)
  ImportOPJ.cc:53: error: cannot convert 'ColumnType' to 'const char*' for
  argument '1' to 'int strcmp(const char*, const char*)' ImportOPJ.cc:65:
  error: 'class OPJFile' has no member named 'matrixParentFolder'
  ImportOPJ.cc:102: error: 'class OPJFile' has no member named
  'noteParentFolder' ImportOPJ.cc:118: error: 'class OPJFile' has no member
  named 'graphParentFolder' ImportOPJ.cc:142: error: 'xlabel' was not
  declared in this scope ImportOPJ.cc:142: error: expected type-specifier
  before 'Label'
  ImportOPJ.cc:142: error: expected `;' before 'Label'
  ImportOPJ.cc:143: error: 'ylabel' was not declared in this scope
  ImportOPJ.cc:143: error: expected type-specifier before 'Label'
  ImportOPJ.cc:143: error: expected `;' before 'Label'
  ImportOPJ.cc:345: error: conversion from 'graphLayerRange' to non-scalar
  type 'std::vectordouble, std::allocatordouble ' requested
  ImportOPJ.cc:346: error: conversion from 'graphLayerRange' to non-scalar
  type 'std::vectordouble, std::allocatordouble ' requested make[3]:
  *** [ImportOPJ.lo] Error 1

 The full build log is available from:
http://people.debian.org/~lucas/logs/2008/03/08

This FTBFS is caused by the new liborigin/20080225-1 which changed it's API 
and ABI. For example the declaration of the OPJFile::colType() function 
changed from
const char *OPJFile::colType(int, int) const;   (20071119)
to
ColumnType OPJFile::colType(int, int) const;(20080225).

And this is not the only API/ABI incompatible change. I guess liborigin's 
SONAME should have been bumped for version 20080225. However, I've a patch 
ready to fix this bug (it is attached, and requires a B-D on liborigin (= 
20080225)) but it needs some more testing before I can upload a fixed labplot 
package.

Cheers,
-- 
Frank S. Thomas [EMAIL PROTECTED]   PGP public key ID: 0xDC426429
Debian Developerfinger fst/[EMAIL PROTECTED]
diff --git a/src/ImportOPJ.cc b/src/ImportOPJ.cc
index 2b625d4..790d09c 100644
--- a/src/ImportOPJ.cc
+++ b/src/ImportOPJ.cc
@@ -12,6 +12,36 @@
 
 #include liborigin/OPJFile.h
 
+QString colTypeToString(const ColumnType type) {
+QString type_str = ;
+
+switch (type) {
+case X:
+type_str = X;
+break;
+case Y:
+type_str = Y;
+break;
+case Z:
+type_str = Z;
+break;
+case XErr:
+type_str = DX;
+break;
+case YErr:
+type_str = DY;
+break;
+case Label:
+type_str = LABEL;
+break;
+case NONE:
+type_str = NONE;
+break;
+}
+
+return type_str;
+}
+
 ImportOPJ::ImportOPJ(MainWin *mw, QString filename)
 	: mw(mw),filename(filename)
 {}
@@ -44,13 +74,13 @@ int ImportOPJ::import() {
 		for (int j=0;jnr_cols;j++) {
 			QString name(opj.colName(s,j));
 			spread-setColumnTitle(j,name.replace(QRegExp(.*_),));
-			spread-setColumnType(j,opj.colType(s,j));
+			spread-setColumnType(j,colTypeToString(opj.colType(s,j)));
 
 			for (int i=0;iopj.numRows(s,j);i++) {
 double *v = (double *) opj.oData(s,j,i,true);
 
 LTableItem *item;
-if(strcmp(opj.colType(s,j),LABEL)) {	// number
+if(strcmp(colTypeToString(opj.colType(s,j)),LABEL)) {	// number
 	if(fabs(*v)0  fabs(*v)2.0e-300)	// empty entry
 		continue;
 	item = new LTableItem( table, QTableItem::OnTyping,QString::number(*v));
@@ -62,7 +92,7 @@ int ImportOPJ::import() {
 		}
 	}
 	for (int s=0;sopj.numMatrices();s++) {
-		kdDebug()		Matrix s+1 : opj.matrixName(s) (ParentFolder : opj.matrixParentFolder(s))endl;
+		kdDebug()		Matrix s+1 : opj.matrixName(s)endl; // (ParentFolder : opj.matrixParentFolder(s))endl;
 		kdDebug()			Label : opj.matrixLabel(s) Cols/Rows : opj.numMatrixCols(s)'/'opj.numMatrixRows(s)endl;
 		kdDebug()			Formula : opj.matrixFormula(s) DisplayType : opj.matrixNumDisplayType(s)endl;
 
@@ -99,7 +129,7 @@ int ImportOPJ::import() {
 
 	QString notes = mw-getProject()-Notes();
 	for (int s=0;sopj.numNotes();s++) {
-		kdDebug()		Note s+1 : opj.noteName(s) (ParentFolder : opj.noteParentFolder(s))endl;
+		kdDebug()		Note s+1 : opj.noteName(s)endl; // (ParentFolder : opj.noteParentFolder(s))endl;
 		kdDebug()			Label : opj.noteLabel(s) Text : opj.noteText(s)endl;
 		notes.append(QString(opj.noteLabel(s))+:\n);
 		notes.append(opj.noteText(s));
@@ -115,7 +145,7 @@ int ImportOPJ::import() {
 	}
 
 	for (int s=0;sopj.numGraphs();s++) {
-		kdDebug()		Graph s+1 : opj.graphName(s) (ParentFolder : opj.graphParentFolder(s))endl;
+		kdDebug()		Graph s+1 :