Bug report #2411
FTBFS: qgsgrass.cpp + old grasses on Debian/Lenny
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | |||
Category: | Build/Install | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Debian | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 12471 |
Description
Hi,
I'm still trying to compile trunk on Debian/Lenny using the supplied debian/control.lenny + debuild. (thanks for fixing #2400)
Now I'm getting this error:
[ 68%] Building CXX object src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.cpp.o In file included from /usr/local/src/qgis/svn/trunk/src/providers/grass/qgsgrass.cpp:37: /usr/lib/grass/include/grass/version.h:1: warning: deprecated conversion from string constant to 'char*' /usr/lib/grass/include/grass/version.h:2: warning: deprecated conversion from string constant to 'char*' /usr/lib/grass/include/grass/version.h:3: warning: deprecated conversion from string constant to 'char*' /usr/lib/grass/include/grass/version.h:4: warning: deprecated conversion from string constant to 'char*' /usr/local/src/qgis/svn/trunk/src/providers/grass/qgsgrass.cpp: In static member function 'static void [[QgsGrass]]::setLocation(QString, QString)': /usr/local/src/qgis/svn/trunk/src/providers/grass/qgsgrass.cpp:342: error: invalid conversion from 'const char*' to 'char*' /usr/local/src/qgis/svn/trunk/src/providers/grass/qgsgrass.cpp:342: error: initializing argument 2 of 'int G+setenv(char*, char*)' /usr/local/src/qgis/svn/trunk/src/providers/grass/qgsgrass.cpp:344: error: invalid conversion from 'const char*' to 'char*' /usr/local/src/qgis/svn/trunk/src/providers/grass/qgsgrass.cpp:344: error: initializing argument 2 of 'int G+setenv(char*, char*)' maker3: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.cpp.o] Error 1 maker3: Leaving directory @/usr/local/src/qgis/svn/trunk/debian/build' maker2: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/all] Error 2 maker2: Leaving directory @/usr/local/src/qgis/svn/trunk/debian/build' maker1: *** [all] Error 2 maker1: Leaving directory @/usr/local/src/qgis/svn/trunk/debian/build' make: *** [build-stamp] Error 2 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
I have made these modifications to debian/rules:
$ svn diff trunk/debian/rules Index: trunk/debian/rules =================================================================== --- trunk/debian/rules (revision 12870) +++ trunk/debian/rules (working copy) @@ -22,7 +22,7 @@ CMAKE_OPTS := \\ -Wno-dev \\ - -D GRASS_PREFIX=/usr/lib/grass64 \\ + -D GRASS_PREFIX=/usr/local/src/grass/svn/grass65 \\ -D CMAKE_INSTALL_PREFIX=/usr \\ -D CMAKE_SKIP_RPATH=TRUE \\ -D BINDINGS_GLOBAL_INSTALL=TRUE \\ @@ -147,12 +147,12 @@ dh_installmime -pqgis dh_link if which dh_lintian >/dev/null; then dh_lintian; fi - dh_strip + #dh_strip dh_compress --exclude=pdf dh_fixperms dh_makeshlibs dh_installdeb - LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/usr/lib/grass/lib:/usr/lib/grass64/lib dh_shlibdeps + LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/usr/local/src/grass/svn/grass65/dist.x86_64-unknown-linux-gnu/lib dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb
the standard Debian/stable grass-dev package is installed (6.2.3-2.1) which is why /usr/lib/grass/include/grass/version.h is found. (in addition to about 5-6 other self-contained versions of grass on that machine)
How to get cmake to respect GRASS_PREFIX= for the include path as well as the library path?
thanks,
Hamish
History
#1
Updated by hamish - over 14 years ago
ah, trunk/debian/build/CMakeCache.txt:
//Path to a file. GRASS_INCLUDE_DIR:PATH=/usr/lib/grass/include //Path to GRASS base directory GRASS_PREFIX:PATH=usr/local/src/grass/svn/grass65
(that base dir is supposed to be the installed ($GISBASE) dir not the source code base I guess)
with debian/rules changed to:
- -D GRASS_PREFIX=/usr/lib/grass64 \\ + -D GRASS_PREFIX=/usr/local/src/grass/svn/grass65/dist.x86_64-unknown-linux-gnu \\ + -D GRASS_INCLUDE_DIR=/usr/local/src/grass/svn/grass65/dist.x86_64-unknown-linux-gnu/include \\
and also to build for GRASS 6.5 I needed to make this symlink:
cd trunk/src/plugins/grass/ ln -s modules-6.4 modules-6.5
after fixing all that, I now get this error:
[ 93%] Building CXX object src/plugins/grass/CMakeFiles/grassplugin.dir/qgsgrassshell.cpp.o /usr/local/src/qgis/svn/trunk/src/plugins/grass/qgsgrassshell.cpp: In constructor 'QgsGrassShell::QgsGrassShell(QgsGrassTools*, QTabWidget*, const char*)': /usr/local/src/qgis/svn/trunk/src/plugins/grass/qgsgrassshell.cpp:69: error: 'class QStringList' has no member named 'length' maker3: *** [src/plugins/grass/CMakeFiles/grassplugin.dir/qgsgrassshell.cpp.o] Error 1 maker3: Leaving directory @/usr/local/src/qgis/svn/trunk/debian/build' maker2: *** [src/plugins/grass/CMakeFiles/grassplugin.dir/all] Error 2 maker2: Leaving directory @/usr/local/src/qgis/svn/trunk/debian/build' maker1: *** [all] Error 2 maker1: Leaving directory @/usr/local/src/qgis/svn/trunk/debian/build' make: *** [build-stamp] Error 2 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
progress, only 7% to go! :)
Hamish
#2
Updated by hamish - over 14 years ago
this seems to fix the 'class QStringList' has no member named 'length'
error:
Index: src/plugins/grass/qgsgrassshell.cpp =================================================================== --- src/plugins/grass/qgsgrassshell.cpp (revision 12941) +++ src/plugins/grass/qgsgrassshell.cpp (working copy) @@ -66,7 +66,7 @@ { QString line = buf; QStringList kv = line.split ( ':' ); - if ( kv.length() == 2 && kv.at(0) == "GRASS_GUI" ) + if ( kv.size() == 2 && kv.at(0) == "GRASS_GUI" ) { oldGui = kv.at(1).trimmed (); break;
and now it fails with:
dh_testdir dh_testroot dh_installchangelogs [[ChangeLog]] dh_installdocs dh_installexamples dh_install --sourcedir=debian/tmp cp: cannot stat @debian/tmp/usr/lib/libqgis_core.so.QGIS_ABI': No such file or directory dh_install: command returned error code 256 make: *** [binary-arch] Error 1 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
trunk$ ls -l debian/tmp/usr/lib/libqgis_core.* lrwxrwxrwx ... 21 ... debian/tmp/usr/lib/libqgis_core.so -> libqgis_core.so.1.5.0 -rw-r--r-- ... 6457442 ... debian/tmp/usr/lib/libqgis_core.so.1.5.0
so apparently the "libqgis_core.so.QGIS_ABI" macro isn't being expanded?
Hamish
#3
Updated by hamish - over 14 years ago
ok, I ran 'debuild clean' and then 'svn status' to identify and clean out a few files in debian/ that it missed', and reran 'debuild binary'. This time it failed a little differently:
dh_install --sourcedir=debian/tmp dh_install: Compatibility levels before 4 are deprecated. cp: @debian/tmp//usr/bin/qgis_help' and @debian/tmp//usr/bin/qgis_help' are the same file dh_install: command returned error code 256 make: *** [binary-arch] Error 1 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
?
thanks,
Hamish
ps- these files should be cleaned but are not:
trunk/debian$ svn status ? libqgis1.5.0.install ? libqgis{QGIS_ABI} ? python-qgis.install ? libqgis1.5.0.lintian-overrides ? python-qgis.lintian-overrides ? qgis-plugin-grass.install ? libqgis{QGIS_ABI}.debhelper.log ? libqgis1.5.0.symbols ? python-qgis.symbols ? debhelper.log ? qgis-plugin-grass.symbols ? libqgis1.5.0 ? qgis.sh ? compat ? libqgis1.5.0-dev.install
and it is a bit annoying to have to copy debian/control.lenny back over the top of debian/control every single time you do anything.
#4
Updated by hamish - over 14 years ago
same debian/lenny. after svn up & rebuild:
$ debuild binary [...] dh_testdir dh_testroot dh_installchangelogs [[ChangeLog]] dh_installdocs dh_installexamples dh_install --sourcedir=debian/tmp cp: cannot stat @debian/tmp/usr/lib/libqgis_core.so.QGIS_ABI': No such file or directory dh_install: command returned error code 256 make: *** [binary-arch] Error 1 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
{QGIS_ABI} should be replaced by 1.5.0 by rules
, but for some reason is not.
ls -1 debian/tmp/usr/lib/libqgis_core.* debian/tmp/usr/lib/libqgis_core.so@ debian/tmp/usr/lib/libqgis_core.so.1.5.0
?,
Hamish
#5
Updated by Paolo Cavallini over 14 years ago
Is this still valid? Does it make sense to support Lenny, as our minimum requirements are getting higher, and release of Squeeze approaches?
#6
Updated by hamish - over 14 years ago
Replying to [comment:5 pcav]:
Is this still valid?
Yes, as of latest d5bbb37b (SVN r13427).
Today I didn't get as far as the linking-
I edited debian/rules to turn off spatialite, and CMakeLists.txt too just in case.
But it still dies:
$ cp debian/control.lenny debian/control $ debuild binary ... [ 40%] Building CXX object src/app/CMakeFiles/qgis.dir/qgsnewspatialitelayerdialog.cpp.o In file included from /home/hamish/dev/qgis/svn/trunk/src/app/qgsnewspatialitelayerdialog.cpp:22: /home/hamish/dev/qgis/svn/trunk/src/app/qgsnewspatialitelayerdialog.h:30:24: error: spatialite.h: No such file or directory /home/hamish/dev/qgis/svn/trunk/src/app/qgsnewspatialitelayerdialog.cpp: In member function 'bool [[QgsNewSpatialiteLayerDialog]]::apply()': /home/hamish/dev/qgis/svn/trunk/src/app/qgsnewspatialitelayerdialog.cpp:297: error: 'spatialite_init' was not declared in this scope maker3: *** [src/app/CMakeFiles/qgis.dir/qgsnewspatialitelayerdialog.cpp.o] Error 1 maker3: Leaving directory @/home/hamish/dev/qgis/svn/trunk/debian/build' maker2: *** [src/app/CMakeFiles/qgis.dir/all] Error 2 maker2: Leaving directory @/home/hamish/dev/qgis/svn/trunk/debian/build' maker1: *** [all] Error 2 ...
missing #ifdef in the .cpp or CMakeLists.txt rule?
(fwiw I'm not a cmake expert)
Does it make sense to support Lenny,
Yes please, it does. For work reasons etc. not everyone has the luxury (or desire) to change OSs on the shared machines they need to work on, to the latest-greatest testing release.. especially when it is just for one app.
I would accept using an older version on an older OS, but so far the most modern version I can build for Lenny is 1.2.0. :-/
thanks,
Hamish
#7
Updated by Jürgen Fischer over 14 years ago
Did you add a changelog entry stating that you are building for lenny? otherwise it falls back to sid.
#8
Updated by hamish - over 14 years ago
Replying to [comment:7 jef]:
Did you add a changelog entry stating that you are building for
lenny? otherwise it falls back to sid.
I hadn't, but I had edited the rules file to set to FALSE even in that sid+= logic. (everywhere grep could find it being set to TRUE)
Now changed to:
--- debian/changelog (revision 13427) +++ debian/changelog (working copy) @@ -1,4 +1,4 @@ -qgis (1.5.0) UNRELEASED; urgency=low +qgis (1.5.0.lenny) stable; urgency=low
but it still ignores WITH_SPATIALITE=FALSE & dies in the same place.
thanks,
Hamish
#9
Updated by Jürgen Fischer over 14 years ago
Replying to [comment:8 hamish]:
but it still ignores WITH_SPATIALITE=FALSE & dies in the same place.
The default is to build with internal spatialite when not building for sid. Anything wrong with that? Otherwise you also need to tweak the .install files and apply the hardy patches to get the grass plugin compiled with GRASS 6.2.
Still spatialite should be optional: fixed in e7ded48b (SVN r13430).
#10
Updated by Jürgen Fischer over 14 years ago
Replying to [comment:4 hamish]:
{QGIS_ABI} should be replaced by 1.5.0 by
rules
, but for some reason is not.
You're supposed to add a changelog entry with distribution lenny (not stable) and the rules will rebuild control from control.lenny replacing {QGIS_ABI} (and {GRASS_ABI}).
#11
Updated by hamish - over 14 years ago
Replying to [comment:9 jef]:
Still spatialite should be optional: fixed in e7ded48b (SVN r13430).
great, I get past that .cpp file now, thanks.
Replying to [comment:10 jef]:
You're supposed to add a changelog entry with distribution lenny
(not stable)
"supposed"? as in specific to the qgis build scripts, right? for previous backports of other software I've used the unstable/ testing/ stable/ old-stable names without problem.
and the rules will rebuild control from control.lenny replacing {QGIS_ABI} (and {GRASS_ABI}).
ok, done that. Now it gets past the main build but I get a weird linking error I've not seen before. Here's the end of it:
... - _ZThn8_N20QgsMapOverviewCanvasD0Ev@Base 1.5.0 - _ZThn8_N20QgsMapOverviewCanvasD1Ev@Base 1.5.0 - _ZThn8_N21QgsDetailedItemWidgetD0Ev@Base 1.5.0 - _ZThn8_N21QgsDetailedItemWidgetD1Ev@Base 1.5.0 - _ZThn8_N21QgsEncodingFileDialogD0Ev@Base 1.5.0 - _ZThn8_N21QgsEncodingFileDialogD1Ev@Base 1.5.0 - _ZThn8_N21QgsProjectionSelectorD0Ev@Base 1.5.0 - _ZThn8_N21QgsProjectionSelectorD1Ev@Base 1.5.0 - _ZThn8_N28QgsGenericProjectionSelectorD0Ev@Base 1.5.0 - _ZThn8_N28QgsGenericProjectionSelectorD1Ev@Base 1.5.0 + _ZThn40_N19QgsCredentialDialog7requestE7QStringRS0_S1_S0_@Base 1.5.0.lenny + _ZThn40_N19QgsCredentialDialogD0Ev@Base 1.5.0.lenny + _ZThn40_N19QgsCredentialDialogD1Ev@Base 1.5.0.lenny +#MISSING: 1.5.0.lenny# _ZThn8_N12QgsMapCanvasD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N12QgsMapCanvasD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N14QgsColorButtonD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N14QgsColorButtonD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N15QgsComposerViewD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N15QgsComposerViewD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N15QgsFileDropEditD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N15QgsFileDropEditD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N16QgsMessageViewerD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N16QgsMessageViewerD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N16QgsPanningWidgetD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N16QgsPanningWidgetD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N20QgsMapOverviewCanvasD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N20QgsMapOverviewCanvasD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N21QgsDetailedItemWidgetD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N21QgsDetailedItemWidgetD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N21QgsEncodingFileDialogD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N21QgsEncodingFileDialogD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N21QgsProjectionSelectorD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N21QgsProjectionSelectorD1Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N28QgsGenericProjectionSelectorD0Ev@Base 1.5.0 +#MISSING: 1.5.0.lenny# _ZThn8_N28QgsGenericProjectionSelectorD1Ev@Base 1.5.0 _ZZN11QMetaTypeIdI19QgsDetailedItemDataE14qt_metatype_idEvE11metatype_id@Base 1.5.0 + _ZZN11QMetaTypeIdI5QListIP7QWidgetEE14qt_metatype_idEvE11metatype_id@Base 1.5.0.lenny + _ZdlPvS_@Base 1.5.0.lenny + _Zeq5QCharS_@Base 1.5.0.lenny + _ZeqN7QString4NullERKS_@Base 1.5.0.lenny + _ZeqPKcRK7QString@Base 1.5.0.lenny + _ZmiRK6QPointS1_@Base 1.5.0.lenny + _ZmiRK7QPointFS1_@Base 1.5.0.lenny + _ZneRK5QSizeS1_@Base 1.5.0.lenny + _ZnwmPv@Base 1.5.0.lenny + _ZorN11QMessageBox14StandardButtonES0_@Base 1.5.0.lenny + _ZorN16QDialogButtonBox14StandardButtonES0_@Base 1.5.0.lenny + _ZorN17QAbstractItemView11EditTriggerES0_@Base 1.5.0.lenny + _ZorN2Qt13AlignmentFlagES0_@Base 1.5.0.lenny + _ZorN2Qt8ItemFlagES0_@Base 1.5.0.lenny + _ZorN2Qt9MatchFlagES0_@Base 1.5.0.lenny _ZplPKcRK7QString@Base 1.5.0 + _ZplRK7QPointFS1_@Base 1.5.0.lenny + _ZplRK7QString5QChar@Base 1.5.0.lenny _ZplRK7QStringPKc@Base 1.5.0 + _ZplRK7QStringS1_@Base 1.5.0.lenny capture_point_cursor@Base 1.5.0 cross_hair_cursor@Base 1.5.0 identify_cursor@Base 1.5.0 dh_makeshlibs: command returned error code 256 make: *** [binary-arch] Error 1 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
Apparently errors >3000 lines long so the start of it is beyond my terminal buffer. I can rerun tee'ing stderr to a file if it helps.
thanks,
Hamish
#12
Updated by Jürgen Fischer over 14 years ago
Replying to [comment:11 hamish]:
Replying to [comment:10 jef]:
You're supposed to add a changelog entry with distribution lenny
(not stable)
"supposed"? as in specific to the qgis build scripts, right? for previous backports of other software I've used the unstable/ testing/ stable/ old-stable names without problem.
Right. The distribution name in the changelog determines which template files are used to build the package...
ok, done that. Now it gets past the main build but I get a weird linking error I've not seen before. Here's the end of it:
That's not a link error. dh_makeshlibs complains about missing symbols in the shared library. But that's just due to the different Qt version in lenny. I dropped that altogether in 8d892722 (SVN r13439).
#13
Updated by Jürgen Fischer about 14 years ago
Replying to [comment:12 jef]:
That's not a link error. dh_makeshlibs complains about missing symbols in the shared library. But that's just due to the different Qt version in lenny. I dropped that altogether in 8d892722 (SVN r13439).
Hamish, did that work for you, too?
#14
Updated by hamish - about 14 years ago
Replying to [comment:14 jef]:
Replying to [comment:12 jef]:
That's not a link error. dh_makeshlibs complains about missing symbols in the shared library. But that's just due to the different Qt version in lenny. I dropped that altogether in 8d892722 (SVN r13439).
Hamish, did that work for you, too?
nope, I still get the error shown in comment:11. I've attached to this ticket the current svn diff from latest trunk needed to start the build on Debian/Lenny + GRASS 6.5svn.
thanks,
Hamish
#15
Updated by hamish - about 14 years ago
attached debuild log showing dh_makeshlibs error to ticket. see:
dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see diff output below dpkg-gensymbols: warning: some symbols disappeared in the symbols file: see diff output below dpkg-gensymbols: warning: debian/libqgis1.5.0/DEBIAN/symbols doesn't match completely debian/libqgis1.5.0.symbols [...] dh_makeshlibs: command returned error code 256 make: *** [binary-arch] Error 1 debuild: fatal error at line 1301: couldn't exec fakeroot debian/rules:
#16
Updated by Jürgen Fischer about 14 years ago
Replying to [comment:16 hamish]:
attached debuild log showing dh_makeshlibs error to ticket. see:
Remove the symbol files - those are leftovers created from templates, that have been removed in 8d892722 (SVN r13439).
#17
Updated by hamish - about 14 years ago
- Status changed from Open to Closed
- Resolution set to fixed
ok, I had run "debuild clean" but I guess it missed those old files.
"svn status" showed that debian/qgis-plugin-grass.symbols, libqgis1.5.0.symbols, python-qgis.symbols were extra so I removed those and restored the missing debian/qgis-plugin-grass-common.install file.
after that, tried rebuilding the package and it worked. hurray!
so svn trunk now builds + installs .debs on Lenny. test of loading shapefile, geotiff, and PostGIS db worked. closing bug.
thanks for your help,
Hamish