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

[Bug] 3 of 7,659 GRASS 8 generic weekly for Linux -- startup error around grass 8 raster lib #2192

Closed
isaacullah opened this issue Feb 11, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@isaacullah
Copy link

isaacullah commented Feb 11, 2022

Describe the bug
trying to get GRASS 8 running on my laptop (Pop!_OS 20.10) and trying the generic 64-bit Linux binaries. Made sure all dependencies are installed, etc., (done this many times before), but getting a new error upon start up. Splash screen goes, and then I get the following before the new GUI can load:

Launching <wxpython> GUI in the background, please wait...
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

GRASS world_latlong_wgs84/PERMANENT:~ > Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/core.py", line 3282, in <lambda>
    lambda event: event.callable(*event.args, **[event.kw](http://event.kw/)) )
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/gui/wxpython/wxgui.py", line 86, in show_main_gui
    from lmgr.frame import GMFrame
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/gui/wxpython/lmgr/frame.py", line 45, in <module>
    from gui_core.preferences import MapsetAccess, PreferencesDialog
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/gui/wxpython/gui_core/preferences.py", line 52, in <module>
    from gui_core.dialogs import SymbolDialog, DefaultFontDialog
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/gui/wxpython/gui_core/dialogs.py", line 44, in <module>
    from gui_core.gselect import (
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/gui/wxpython/gui_core/gselect.py", line 62, in <module>
    from grass.pygrass.utils import decode
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/etc/python/grass/pygrass/utils.py", line 9, in <module>
    import grass.lib.raster as libraster
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/etc/python/grass/lib/raster.py", line 30, in <module>
    _libs["grass_raster.8.0"] = load_library("grass_raster.8.0")
  File "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/etc/python/grass/lib/ctypes_loader.py", line 89, in __call__
    raise ImportError("Could not load %s." % libname)
ImportError: Could not load grass_raster.8.0.
^C
GRASS world_latlong_wgs84/PERMANENT:~ > exit
exit
WARNING: Failed to start shell '/bin/bash'
Cleaning up default sqlite database ...
Cleaning up temporary files...
Done.

Goodbye from GRASS GIS

To Reproduce
Steps to reproduce the behavior:

1.start GRASS on Linux as above.

Expected behavior
GRASS GUI should launch.
Screenshots
If applicable, add screenshots to help explain your problem.

System description (please complete the following information):

  • Linux - Pop!_OS 20.10
  • GRASS GIS version 8

Additional context
This looks like something caused by ctypesgen failing to find the grass_raster.8.0 library.

@isaacullah isaacullah added the bug Something isn't working label Feb 11, 2022
@nilason
Copy link
Contributor

nilason commented Feb 12, 2022

Could you try to manually add the following upstream commit:
ctypesgen/ctypesgen@cdaafb3#diff-17a4efa31a51f3ee59a2353e378ed70bdd6d88b09b098206cc37787abea59175

to this file locally : python/libgrass_interface_generator/ctypesgen/libraryloader.py
Then make distclean before start compiling again.

@ninsbl
Copy link
Member

ninsbl commented Feb 12, 2022

Another option might be that "/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/lib" is not part of your LD_LIBRARY_PATH. Maybe it should be set by the startup script?

Could you try:

export LD_LIBRARY_PATH="/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/lib:$LD_LIBRARY_PATH"
grass

@isaacullah
Copy link
Author

isaacullah commented Feb 12, 2022 via email

@nilason
Copy link
Contributor

nilason commented Feb 12, 2022

I'm trying to avoid compilation from source since it takes some time (a resource I'm perennially short on these days), but will try the upstream fix if I can get a moment next week to try to compile

You can also apply the same commit on
/usr/local/grass8.0.1dev-x86_64-pc-linux-gnu-11_02_2022/etc/python/grass/lib/ctypes_loader.py
which is the same, just post-compile file name. No need to compile, really.

petrasovaa added a commit that referenced this issue Feb 13, 2022
Replaces pygrass.utils.decode as not needed here, grass.utils.decode was internally called anyway.
This should prevent that gui crashes when loading C libraries fails, see #2192.
petrasovaa added a commit that referenced this issue Feb 13, 2022
Replaces pygrass.utils.decode as not needed here, grass.utils.decode was internally called anyway.
This should prevent that gui crashes when loading C libraries fails, see #2192.
@isaacullah
Copy link
Author

Reporting back that neither workaround suggested by @ninsbl nor the upstream replacement of the ctypes loader suggest by @nilason has worked. HOWEVER, I am able to successfully launch and use the same version of the Generic 64bit linux binary on my lab computers, which have the same OS and version (Pop!_OS 20.10). I am now thinking it might be something related to my python installation on my laptop? Is there any known issues, for example, due to previous installations of python libraries via pip versus apt? For example, if I have previously installed numpy or scipy via pip, will that conflict with the search path for these libraries that is in the grass generic binary?

@isaacullah
Copy link
Author

I installed 8.0.1 generic 64-bit binary today, and it is now working fine. I am marking this issue closed.

ninsbl pushed a commit to ninsbl/grass that referenced this issue Oct 26, 2022
Replaces pygrass.utils.decode as not needed here, grass.utils.decode was internally called anyway.
This should prevent that gui crashes when loading C libraries fails, see OSGeo#2192.
ninsbl pushed a commit to ninsbl/grass that referenced this issue Feb 17, 2023
Replaces pygrass.utils.decode as not needed here, grass.utils.decode was internally called anyway.
This should prevent that gui crashes when loading C libraries fails, see OSGeo#2192.
neteler pushed a commit to nilason/grass that referenced this issue Nov 7, 2023
Replaces pygrass.utils.decode as not needed here, grass.utils.decode was internally called anyway.
This should prevent that gui crashes when loading C libraries fails, see OSGeo#2192.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants