Compiling QGIS 2.4 with GCC 4.4 (debian squeeze)?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling QGIS 2.4 with GCC 4.4 (debian squeeze)?

Luca Manganelli
Hi,

I'm trying to compile QGIS git (after having success with 2.2) on
Debian Squeeze (6.0) which has GCC 4.4.2.

The compilations stops with an make error (see below for error trace).

In summary, GCC 4.4 doesn't like this line from
qgsvectorlayerfeatureiterator.cpp (line 87):

QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator(
QgsVectorLayerFeatureSource* source, bool ownSource,
 const QgsFeatureRequest& request )
    : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
    , mEditGeometrySimplifier( 0 )

in the corresponding header .h file we have:

    QgsVectorLayerFeatureIterator( QgsVectorLayerFeatureSource*
source, bool ownSource, const QgsFeatureRequest& request ) :
QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
    , mEditGeometrySimplifier( 0 );


it seems that the left part ( from ": QgsAbstractFeatureFromSource to
end) is missing, but adding it returns a preprocessing gcc error.

It's possible to fix this?


---------
[  0%] Building CXX object
src/core/CMakeFiles/qgis_core.dir/qgsvectorlayerfeatureiterator.cpp.o

/home/trap/qgis-git/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp:
In constructor ‘QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator(QgsVectorLayerFeatureSource*,
bool, const QgsFeatureRequest&)’:

/home/trap/qgis-git/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp:87:
error: class ‘QgsVectorLayerFeatureIterator’ does not have any field
named ‘QgsAbstractFeatureIteratorFromSource’

/home/trap/qgis-git/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp:88:
error: no matching function for call to
‘QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource>::QgsAbstractFeatureIteratorFromSource()’

/home/trap/qgis-git/QGIS/src/core/qgsfeatureiterator.h:113: note:
candidates are:

QgsAbstractFeatureIteratorFromSource< <template-parameter-1-1>
>::QgsAbstractFeatureIteratorFromSource(T*, bool, const
QgsFeatureRequest&) [with T = QgsVectorLayerFeatureSource]

/home/trap/qgis-git/QGIS/src/core/qgsfeatureiterator.h:111: note:
           QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource>::QgsAbstractFeatureIteratorFromSource(const
QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource>&)
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Compiling QGIS 2.4 with GCC 4.4 (debian squeeze)?

sulu
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I'm in the same boat here.

Centos-6, gcc 4.4.7, QT 4.8.5, ....


/data/build/QGIS-release-2_4/src/core/qgsvectorlayerfeatureiterator.cpp: In constructor 'QgsVectorLayerFeatureIterator::QgsVecto                                                                           rLayerFeatureIterator(QgsVectorLayerFeatureSource*, bool, const QgsFeatureRequest&)':
/data/build/QGIS-release-2_4/src/core/qgsvectorlayerfeatureiterator.cpp:87: error: class 'QgsVectorLayerFeatureIterator' does not have any field named 'QgsAbstractFeatureIteratorFromSource'
/data/build/QGIS-release-2_4/src/core/qgsvectorlayerfeatureiterator.cpp:88: error: no matching function for call to 'QgsAbstract                                                                           FeatureIteratorFromSource<QgsVectorLayerFeatureSource>::QgsAbstractFeatureIteratorFromSource()'
/data/build/QGIS-release-2_4/src/core/qgsfeatureiterator.h:113: note: candidates are: QgsAbstractFeatureIteratorFromSource< <tem                                                                           plate-parameter-1-1> >::QgsAbstractFeatureIteratorFromSource(T*, bool, const QgsFeatureRequest&) [with T = QgsVectorLayerFeature                                                                           Source]
/data/build/QGIS-release-2_4/src/core/qgsfeatureiterator.h:111: note:                 QgsAbstractFeatureIteratorFromSource<QgsVe                                                                           ctorLayerFeatureSource>::QgsAbstractFeatureIteratorFromSource(const QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSo                                                                           urce>&)

Facing the same problem unfortunately does not mean me having a solution.


Andy
Reply | Threaded
Open this post in threaded view
|

Re: Compiling QGIS 2.4 with GCC 4.4 (debian squeeze)?

Todd Chisholm
Hi,

I ran into this as well, again with Centos and gcc 4.4.7.  There are handful of places with, for example:

QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( ... )
    : QgsAbstractFeatureIteratorFromSource( ... )

that needs to be switched to
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( ... )
    : QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeaturesSource>( ... )

as seen in the declaration in the header file.  I believe this is happening because Centos has a older version of the compiler that isn't smart enough to add the template to the parent class.

Todd