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::vector<double, std::allocator<double> >' requested
> > ImportOPJ.cc:346: error: conversion from 'graphLayerRange' to non-scalar
> > type 'std::vector<double, std::allocator<double> >' 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 Developer                            finger 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;j<nr_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;i<opj.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;s<opj.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;s<opj.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;s<opj.numGraphs();s++) {
-		kdDebug()<<"		Graph "<<s+1<<" : "<<opj.graphName(s)<<" (ParentFolder : "<<opj.graphParentFolder(s)<<")"<<endl;
+		kdDebug()<<"		Graph "<<s+1<<" : "<<opj.graphName(s)<<endl; //" (ParentFolder : "<<opj.graphParentFolder(s)<<")"<<endl;
 		kdDebug()<<"			Label : "<<opj.graphLabel(s)<<" Layers : "<<opj.numLayers(s)<<endl;
 
 		Worksheet *work = mw->newWorksheet();
@@ -139,8 +169,8 @@ int ImportOPJ::import() {
 #else
 			kdDebug()<<"Layer	x axis : "<<opj.layerXAxisTitle(s,l).txt<<endl;
 			kdDebug()<<"Layer	y axis : "<<opj.layerYAxisTitle(s,l).txt<<endl;
-			Label *xlabel = new Label(parseOriginText(opj.layerXAxisTitle(s,l).txt));
-			Label *ylabel = new Label(parseOriginText(opj.layerYAxisTitle(s,l).txt));
+			LPLabel *xlabel = new LPLabel(parseOriginText(opj.layerXAxisTitle(s,l).txt));
+			LPLabel *ylabel = new LPLabel(parseOriginText(opj.layerYAxisTitle(s,l).txt));
 			kdDebug()<<"Layer	legend : "<<opj.layerLegend(s,l).txt<<endl;
 #endif
 			plot->getAxis(0)->setLabel(xlabel);
@@ -342,11 +372,11 @@ int ImportOPJ::import() {
 			}
 
 			// axis range
-			vector<double> xrange=opj.layerXRange(s,l);
-			vector<double> yrange=opj.layerYRange(s,l);
+			graphLayerRange xrange=opj.layerXRange(s,l);
+			graphLayerRange yrange=opj.layerYRange(s,l);
 			LRange range[2];
-			range[0] = LRange(xrange[0],xrange[1]);
-			range[1] = LRange(yrange[0],yrange[1]);
+			range[0] = LRange(xrange.min,xrange.max);
+			range[1] = LRange(yrange.min,yrange.max);
 			plot->setActRanges(range);
 
 			// axis scale
diff --git a/src/Label.h b/src/Label.h
index b61c55b..a3c4e85 100644
--- a/src/Label.h
+++ b/src/Label.h
@@ -66,4 +66,6 @@ private:
 	bool is_texlabel;		// if it is a tex label
 };
 
+typedef Label LPLabel;
+
 #endif //LABEL_H

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to