Bug report #18888

QGIS 2.18 branch 2.18 release 2.18 and over don't compile

Added by aperi2007 - almost 6 years ago. Updated about 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:QGIS Server
Affected QGIS version:2.18.19 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:wontfix
Crashes QGIS or corrupts data:No Copied to github as #:26720

Description

Hi,
I see the QGS-Server section of QGIS branch 2_18 release 2.19 or 2.18 don't compile at all.
It return this error log:

[ 94%] Building CXX object
src/server/CMakeFiles/qgis_server.dir/qgssoaprequesthandler.cpp.o
[ 94%] Building CXX object
src/server/CMakeFiles/qgis_server.dir/qgsowsserver.cpp.o
In file included from
/home/tomcat/software/30-qgis/QGIS-final-2_18_19/src/server/qgsowsserver.cpp:18:0:
/home/tomcat/software/30-qgis/QGIS-final-2_18_19/src/server/qgsowsserver.h:84:40:
error: âQgsFeatureâ does not name a type
     static QString featureGmlId( const QgsFeature* f, const
QgsAttributeList& pkAttributes );
                                        ^~~~~~~~~~
/home/tomcat/software/30-qgis/QGIS-final-2_18_19/src/server/qgsowsserver.cpp:68:9:
error: prototype for âQString QgsOWSServer::featureGmlId(const QgsFeature*,
const QgsAttributeList&)â does not match any in class âQgsOWSServerâ
 QString QgsOWSServer::featureGmlId( const QgsFeature* f, const
QgsAttributeList& pkAttributes )
         ^~~~~~~~~~~~
In file included from
/home/tomcat/software/30-qgis/QGIS-final-2_18_19/src/server/qgsowsserver.cpp:18:0:
/home/tomcat/software/30-qgis/QGIS-final-2_18_19/src/server/qgsowsserver.h:84:20:
error: candidate is: static QString QgsOWSServer::featureGmlId(const int*,
const QgsAttributeList&)
     static QString featureGmlId( const QgsFeature* f, const
QgsAttributeList& pkAttributes );
                    ^~~~~~~~~~~~
src/server/CMakeFiles/qgis_server.dir/build.make:260: recipe for target
'src/server/CMakeFiles/qgis_server.dir/qgsowsserver.cpp.o' failed
make[2]: *** [src/server/CMakeFiles/qgis_server.dir/qgsowsserver.cpp.o]
Error 1
CMakeFiles/Makefile2:1829: recipe for target
'src/server/CMakeFiles/qgis_server.dir/all' failed
make[1]: *** [src/server/CMakeFiles/qgis_server.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

-----

I'm using libux debian 64 bit stretch.

Instead I have a succesful compile using the code branch 2_18 release 2.15

compile_log.zip (15 KB) aperi2007 -, 2018-05-01 10:05 AM

log_cmake.zip (923 Bytes) aperi2007 -, 2018-05-01 03:48 PM

History

#1 Updated by Jürgen Fischer almost 6 years ago

  • Affected QGIS version changed from 2.18.18 to 2.18.19

aperi2007 - wrote:

Hi,
I see the QGS-Server section of QGIS branch 2_18 release 2.19 or 2.18 don't compile at all.
It return this error log:

[...]

Compiles fine on stretch here - include a full log please.

#2 Updated by aperi2007 - almost 6 years ago

I try newly.

I download
https://github.com/qgis/QGIS/archive/final-2_18_19.tar.gz

After do these steps:

cd QGIS-final-2_18_19

rm -Rf build-master
mkdir build-master
cd build-master

ccmake \
    -DCMAKE_INSTALL_PREFIX="/usr/local" \
    -DENABLE_TESTS=FALSE \
    -DFCGI_INCLUDE_DIR="/usr/local/include" \
    -DFCGI_LIBRARY="/usr/lib/x86_64-linux-gnu/libfcgi.so" \
    -DMAPSERVER_SKIP_ECW=ON \
    -DGDAL_CONFIG="/usr/local/bin/gdal-config" \
    -DGDAL_INCLUDE_DIR="/usr/local/include" \
    -DGDAL_LIBRARY="/usr/local/lib/libgdal.so" \
    -DGEOS_CONFIG="/usr/local/bin/geos-config" \
    -DGEOS_INCLUDE_DIR="/usr/local/include" \
    -DGEOS_LIBRARY="/usr/local/lib/libgeos_c.so" \
    -DPEDANTIC=ON \
    -DPOSTGRES_CONFIG="/usr/local/pgsql/bin/pg_config" \
    -DPOSTGRES_CONFIG_PREFER_PATH="/bin" \
    -DPOSTGRES_INCLUDE_DIR="/usr/local/pgsql/include" \
    -DPOSTGRES_LIBRARY="/usr/local/pgsql/lib/libpq.so" \
    -DPROJ_INCLUDE_DIR="/usr/local/include" \
    -DPROJ_LIBRARY="/usr/local/lib/libproj.so" \
    -DTXT2TAGS_EXECUTABLE=OFF \
    -DWITH_APIDOC=OFF \
    -DWITH_ASTYLE=OFF \
    -DWITH_BINDINGS=OFF \
    -DWITH_DESKTOP=OFF \
    -DWITH_GLOBE=OFF \
    -DWITH_GRASS=OFF \
    -DWITH_GRASS7=OFF \
    -DWITH_INTERNAL_QEXTSERIALPORT=ON \
    -DWITH_INTERNAL_QWTPOLAR=ON \
    -DWITH_INTERNAL_SPATIALITE=OFF \
    -DWITH_SERVER=ON \
    -DWITH_SERVER_PLUGINS=OFF \
    -DWITH_ORACLE=OFF \
    -DWITH_POSTGRESQL=ON \
    -DWITH_PY_COMPILE=OFF \
    -DWITH_QSPATIALITE=OFF \
    -DWITH_QTMOBILITY=OFF \
    -DWITH_TOUCH=OFF \
    -SERVER_SKIP_ECW=ON \
    -DWITH_TXT2TAGS_PDF=OFF .. 

These are my usual settings used with qgis 2.14 I do some little change for 2.18 and the compile is ok with rel. 2.15
Now retry it with rel. 2.19

cd build-master
make >> compile_log.txt 2>&1

I post also the log .

#3 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Open to Feedback

Please also include the configuration step (esp. important as you are not using stretch's dependencies)

#4 Updated by aperi2007 - almost 6 years ago

The configuration are these:

After download the package:

I explode it in the QGIS-final-2_18_19 folder.

After I do:

cd QGIS-final-2_18_19
mkdir build-master
cd build-master

In that folder I call a script with these settings in it:

ccmake \
-DCMAKE_INSTALL_PREFIX="/usr/local" \
-DENABLE_TESTS=FALSE \
-DFCGI_INCLUDE_DIR="/usr/local/include" \
-DFCGI_LIBRARY="/usr/lib/x86_64-linux-gnu/libfcgi.so" \
-DMAPSERVER_SKIP_ECW=ON \
-DGDAL_CONFIG="/usr/local/bin/gdal-config" \
-DGDAL_INCLUDE_DIR="/usr/local/include" \
-DGDAL_LIBRARY="/usr/local/lib/libgdal.so" \
-DGEOS_CONFIG="/usr/local/bin/geos-config" \
-DGEOS_INCLUDE_DIR="/usr/local/include" \
-DGEOS_LIBRARY="/usr/local/lib/libgeos_c.so" \
-DPEDANTIC=ON \
-DPOSTGRES_CONFIG="/usr/local/pgsql/bin/pg_config" \
-DPOSTGRES_CONFIG_PREFER_PATH="/bin" \
-DPOSTGRES_INCLUDE_DIR="/usr/local/pgsql/include" \
-DPOSTGRES_LIBRARY="/usr/local/pgsql/lib/libpq.so" \
-DPROJ_INCLUDE_DIR="/usr/local/include" \
-DPROJ_LIBRARY="/usr/local/lib/libproj.so" \
-DTXT2TAGS_EXECUTABLE=OFF \
-DWITH_APIDOC=OFF \
-DWITH_ASTYLE=OFF \
-DWITH_BINDINGS=OFF \
-DWITH_DESKTOP=OFF \
-DWITH_GLOBE=OFF \
-DWITH_GRASS=OFF \
-DWITH_GRASS7=OFF \
-DWITH_INTERNAL_QEXTSERIALPORT=ON \
-DWITH_INTERNAL_QWTPOLAR=ON \
-DWITH_INTERNAL_SPATIALITE=OFF \
-DWITH_SERVER=ON \
-DWITH_SERVER_PLUGINS=OFF \
-DWITH_ORACLE=OFF \
-DWITH_POSTGRESQL=ON \
-DWITH_PY_COMPILE=OFF \
-DWITH_QSPATIALITE=OFF \
-DWITH_QTMOBILITY=OFF \
-DWITH_TOUCH=OFF \
-SERVER_SKIP_ECW=ON \
-DWITH_TXT2TAGS_PDF=OFF ..

It start and I press the "c" two times.
After the second time I press the "g" to generate and exit from cmake environment.

After I execute the

"make"

And have the error.

#5 Updated by Jürgen Fischer almost 6 years ago

aperi2007 - wrote:

The configuration are these:
After the second time I press the "g" to generate and exit from cmake environment.

run cmake instead of ccmake.

#6 Updated by aperi2007 - almost 6 years ago

done.
I attach the log result from cmake.

#7 Updated by Jürgen Fischer almost 6 years ago

Do you have qgis headers installed in /usr/local/include?

#8 Updated by aperi2007 - almost 6 years ago

When and if the compile is completed without error.
I can do the "make install"
After this I have in /usr/local/includeùa subfolder named "qgis" with its includes.

#9 Updated by Paul Blottiere over 5 years ago

I also tried to compile https://github.com/qgis/QGIS/archive/final-2_18_19.tar.gz on Debian Stretch and I didn't have any problems.

@aperi2007, do you still have your issue with the latest 2.18 release (2.18.24)?

#10 Updated by Jürgen Fischer over 5 years ago

Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.

#11 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to wontfix
  • Status changed from Feedback to Closed

Also available in: Atom PDF