Skip to content

ctranslate import error on modern Linux #253

@Keridos

Description

@Keridos

I installed via install CPU script (commit 91f1c3a. Installation works fine.
However ctranslate fails to be imported on my arch linux machine.
Googling the error lead to whisperx related posts mentioning glibc (my version: 2.41+r48+g5cb575ca9a3d-2) had a change that broke ctranslate.
Downgrading glibc is a surefire way to brick your system, so I did not do that.
Providing a dockerfile for CPU could probably enable it to work properly.

Below the call of the script and the error trace

(.venv) nico@leviathan src % python UltraSinger.py -i NWLN.mp3                                                                                                              [0]
2025-06-09 22:56:15.282529: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2025-06-09 22:56:15.288958: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1749502575.296038  121125 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1749502575.298151  121125 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
W0000 00:00:1749502575.304236  121125 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1749502575.304243  121125 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1749502575.304244  121125 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
W0000 00:00:1749502575.304246  121125 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.
2025-06-09 22:56:15.306098: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI AVX512_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
/home/nico/Nextcloud/git/Privat/UltraSinger/.venv/lib/python3.10/site-packages/librosa/util/files.py:10: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import resource_filename
Traceback (most recent call last):
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/src/UltraSinger.py", line 12, in <module>
    from modules.init_interactive_mode import init_settings_interactive
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/src/modules/init_interactive_mode.py", line 3, in <module>
    from Settings import Settings  
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/src/Settings.py", line 6, in <module>
    from modules.Speech_Recognition.Whisper import WhisperModel
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/src/modules/Speech_Recognition/Whisper.py", line 5, in <module>
    import whisperx
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/.venv/lib/python3.10/site-packages/whisperx/__init__.py", line 1, in <module>
    from .transcribe import load_model
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/.venv/lib/python3.10/site-packages/whisperx/transcribe.py", line 10, in <module>
    from .asr import load_model
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/.venv/lib/python3.10/site-packages/whisperx/asr.py", line 6, in <module>
    import ctranslate2
  File "/home/nico/Nextcloud/git/Privat/UltraSinger/.venv/lib/python3.10/site-packages/ctranslate2/__init__.py", line 21, in <module>
    from ctranslate2._ext import (
ImportError: libctranslate2-d3638643.so.4.4.0: cannot enable executable stack as shared object requires: Invalid argument

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions