LibrePhotos / librephotos-linux

Here you can find the installation script for a local Linux install.
MIT License
47 stars 15 forks source link

cannot allocate memory in static TLS block #40

Closed byrongamatos closed 2 years ago

byrongamatos commented 2 years ago

I tried using the installer, after a long time i got the following stacktrace and the installation stopped.

ImportError: /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/librephotos/backend/api/models/__init__.py", line 1, in <module>
    from api.models.album_auto import AlbumAuto
  File "/usr/lib/librephotos/backend/api/models/album_auto.py", line 6, in <module>
    from api.models.photo import Photo
  File "/usr/lib/librephotos/backend/api/models/photo.py", line 22, in <module>
    from api.thumbnails import (
  File "/usr/lib/librephotos/backend/api/thumbnails.py", line 4, in <module>
    import pyvips
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/pyvips/__init__.py", line 71, in <module>
    vips_lib = ffi.dlopen(_vips_libname)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/cffi/api.py", line 150, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/cffi/api.py", line 832, in _make_ffi_library
    backendlib = _load_backend_lib(backend, libname, flags)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/cffi/api.py", line 827, in _load_backend_lib
    raise OSError(msg)
OSError: cannot load library 'libvips.so.42': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'libvips.so.42'
/usr/lib/librephotos/.local/lib/python3.8/site-packages/torchvision/io/image.py:11: UserWarning: Failed to load image Python extension:
  warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/pyvips/__init__.py", line 19, in <module>
    import _libvips
ImportError: /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/librephotos/backend/api/models/__init__.py", line 1, in <module>
    from api.models.album_auto import AlbumAuto
  File "/usr/lib/librephotos/backend/api/models/album_auto.py", line 6, in <module>
    from api.models.photo import Photo
  File "/usr/lib/librephotos/backend/api/models/photo.py", line 22, in <module>
    from api.thumbnails import (
  File "/usr/lib/librephotos/backend/api/thumbnails.py", line 4, in <module>
    import pyvips
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/pyvips/__init__.py", line 71, in <module>
    vips_lib = ffi.dlopen(_vips_libname)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/cffi/api.py", line 150, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/cffi/api.py", line 832, in _make_ffi_library
    backendlib = _load_backend_lib(backend, libname, flags)
  File "/usr/lib/librephotos/.local/lib/python3.8/site-packages/cffi/api.py", line 827, in _load_backend_lib
    raise OSError(msg)
OSError: cannot load library 'libvips.so.42': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'libvips.so.42'

Trying to run the install script again stops at this point

+ which vips
/usr/local/bin/vips
+ echo 'VIPS allready found on the system'
VIPS allready found on the system
+ echo 'Sometimes older vips can cause problems.'
Sometimes older vips can cause problems.
+ read -t 5 -p 'If librephotos-backend not starting, try to uninstall vips and recompile again'
If librephotos-backend not starting, try to uninstall vips and recompile again
Seneliux commented 2 years ago

librephotos-linux is for amd64 architecture. For ARM please look Discord: https://discord.com/channels/784619049208250388/794163017071722527 @derneuere this can be closed. I have updated compatibility info and added CPU architecture. No more misleads :)

byrongamatos commented 2 years ago

The discord link is invalid. Is there an arm version of the install script available or do I have to run the docker container?

Seneliux commented 2 years ago

Discord librephotos I recommend to cleanup system