Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom GRASS location not found, wrong GRASS_PREFIX (6) used #21117

Closed
qgib opened this issue Jun 28, 2015 · 3 comments
Closed

Custom GRASS location not found, wrong GRASS_PREFIX (6) used #21117

qgib opened this issue Jun 28, 2015 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@qgib
Copy link
Contributor

qgib commented Jun 28, 2015

Author Name: William Kyngesburye (@kyngchaos)
Original Redmine Issue: 13043
Affected QGIS version: master
Redmine category:build/install


This is a combination of an old issue and the recent split GRASS 6/7 build mechanism.

When configuring QGIS for GRASS 6 on OS X, I use a custom GRASS prefix for a custom build to bundle with the app. I also have the GRASS app installed. Configure uses the custom GRASS_PREFIX yet finds the app (one of the default search paths for GRASS) for the GRASS_INCLUDE_DIR, but this has not been a problem in the past because my app and custom builds were the same version so the app's includes worked. If I rename the GRASS app, FindGRASS does not find GRASS at all, even from my custom path.

The new wrinkle added by the split GRASS 6/7 configuring is that the GRASS plugin and provider cmakelists don't appear to use the right GRASS_PREFIX for GRASS 6. FindGRASS sets GRASS_PREFIX${GRASS_CACHE_VERSION} where GRASS_CACHE_VERSION is empty for G6 to keep the old variable name. But the ADD_GRASSLIB macros for the GRASS provider and plugin use the GRASS_BUILD_VERSION passed to them to get the GRASS_PREFIX${GRASS_BUILD_VERSION}, but GRASS_PREFIX6 is not set, it's GRASS_PREFIX. And the build fails because headers are not found. The workaround is to specify both GRASS_PREFIX and GRASS_PREFIX6.

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2015

Author Name: William Kyngesburye (@kyngchaos)


Ugh, and somehow it's still linking the GRASS.app libraries. So it's not using any prefix I set to find the GRASS libraries, but I can't check it since I don't see any GRASS_LIBRARY* variables in the cmakecache.

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2015

Author Name: Radim Blazek (@blazek)


Sorry for the troubles. I have also GRASS 6 and 7 in custom paths and configure can find them, tested on Linux and Windows. I don't have GRASS package in standard path however. Can we start first fixing the problem when you remove GRASS app in standard path and you use the custom build only?

The GRASS_PREFIX6 is set in FindGRASS.cmake

          IF(GRASS_FIND_VERSION EQUAL 6)
            # Set also normal variable with number
            SET(GRASS_INCLUDE_DIR${GRASS_FIND_VERSION} ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}})
            SET(GRASS_PREFIX${GRASS_FIND_VERSION} ${G_PREFIX})
          ENDIF(GRASS_FIND_VERSION EQUAL 6)

so even if it is configured with GRASS_PREFIX (for GRASS 6), the GRASS_PREFIX6 variable should be available everywhere in cmake build system.

@qgib
Copy link
Contributor Author

qgib commented Jun 30, 2015

Author Name: William Kyngesburye (@kyngchaos)


Argh! I'm an idiot. Somehow my custom GRASS build lost its headers. Works now. Sorry for the noise. But I do need to fix the Mac bundling to account for the new GRASS build stuff.


  • resolution was changed from to invalid
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

1 participant