On mardi 12 septembre 2017 21:51:45 CEST Alexander Ploumistos wrote: > Hello, > > I have a package under review[0], that I realized had python scripting > support disabled, so I enabled it. Before that, it built fine in > rawhide on all arches[1]. > > After enabling it (which involves python obviously and at least sip) > the build failed only on armv7hl[2], because a file that is generated > during the %build stage was not found: > > src/PythonScripting.cpp:65:10: fatal error: sipAPIscidavis.h: No such > file or directory > > Antonio Trande told me that I should disable parallel building on ARM, > so I modified my build section from > > %build > […] > make %{?_smp_mflags} > > to > > %build > […] > %ifarch %{arm} > make -j1 > %else > %make_build > %endif > > Even though the output is a bit different now, the builds still > fail[3] with the same error. Is this something I can fix in my spec > file or with a patch, should this be taken upstream, or is there some > other problem with my armv7hl dependencies? > > These are the package's requirements: > > BuildRequires: desktop-file-utils > BuildRequires: doxygen > BuildRequires: gsl-devel > BuildRequires: muParser-devel > BuildRequires: PyQt4-devel > BuildRequires: python2-devel > BuildRequires: qt-assistant-adp-devel > BuildRequires: qt-devel > BuildRequires: qwt5-qt4-devel > BuildRequires: qwtplot3d-qt4-devel > BuildRequires: sip-devel > BuildRequires: zlib-devel > Requires: PyQt4 > > Can anyone shed some light? > Hello Alexander, I've investigated your case and I believe I've found an explanation on scidavis mailing list: >Now we're a the point: The current mentor for the Debian package, Sven >Hoexter, realised that SciDAVis can't build for ARM(armel) architecture >[2]. It even couldn't be build with version 0.2.3 (first version as an >official Debian package), by the way. >Right now, I hopefully solved the problem. The inital error message was > sip: Column::replaceValues() unsupported function argument type - >provide %MethodCode and a valid C++ signature >when invoking sip to src/scidavis.sip. The other errors are only >followups. My suggestion is the replacement of "QVector<double>" to >"QVector<qreal>". The only implementation of "QVector" in PyQt4 (Debian >file PyQt4/QtCore/qvector.sip) with a float variable is with "<qreal>". >That's likely because since Qt 4.2 "qreal" is (only on ARM) a typedef >for "float", else for "double" [3]. Until now, with this replacement, >this error seems to be cleared.Do you have a clue with this works >although in the c++-implementation (src/future/core/column/Column.cpp) >the argument is defined as "QVector<double>"? > Source: https://sourceforge.net/p/scidavis/mailman/message/25758645/ This is an old message from 2010, and now the C++ implementation at "src/ future/core/column/Column.cpp" is defined as "QVector<qreal>" : >void Column::replaceValues(int first, const QVector<qreal>& new_values) >{ > if (!new_values.isEmpty()) > exec(new ColumnReplaceValuesCmd(d_column_private, first, new_values)); >} > Thus it seems scidavis.sip was somehow "forgotten" in the change from "QVector<double>" to "QVector<qreal>". A simple patch would fix it: diff -up scidavis-1.21/libscidavis/src/scidavis.sip.fix_arm scidavis-1.21/ libscidavis/src/scidavis.sip --- scidavis-1.21/libscidavis/src/scidavis.sip.fix_arm 2017-08-09 04:19:02.000000000 +0200 +++ scidavis-1.21/libscidavis/src/scidavis.sip 2017-09-13 09:37:48.167919067 +0200 @@ -171,7 +171,7 @@ class Column: AbstractAspect void replaceDateTimes(int first, const QList<QDateTime>& new_values); double valueAt(int row) const; void setValueAt(int row, double new_value); - void replaceValues(int first, const QVector<double>& new_values); + void replaceValues(int first, const QVector<qreal>& new_values); Column * x() const; %MethodCode @@ -516,7 +516,7 @@ public: %MethodCode sipRes = new QVector<qreal>(sipCpp->d_future_matrix->columnCells(a0, a1, a2)); %End - void setColumn(int col, int first_row, const QVector<double> &values); + void setColumn(int col, int first_row, const QVector<qreal> &values); %MethodCode sipCpp->d_future_matrix->setColumnCells(a0, a1, a1+a2->size()-1, *a2); %End @@ -524,7 +524,7 @@ public: %MethodCode sipRes = new QVector<qreal>(sipCpp->d_future_matrix->rowCells(a0, a1, a2)); %End - void setRow(int row, int first_column, const QVector<double> & values); + void setRow(int row, int first_column, const QVector<qreal> & values); %MethodCode sipCpp->d_future_matrix->setRowCells(a0, a1, a1+a2->size()-1, *a2); %End With this patch, scidavis sucessfully builds on ARM: https:// koji.fedoraproject.org/koji/taskinfo?taskID=21837152 Best regards, Robert-André _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx