how to build, so that auditwheel can bundle dependencies

Aperta
#1,892 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
cmake, cpp, python

Direzione di ricerca

Inizia riproducendo la configurazione CMake mostrata e compilando il wheel in python/dist, quindi esegui auditwheel show sul wheel ctranslate2 generato. Traccia come libctranslate2.so e le sue dipendenze vengono installati e individuati durante l’ispezione del wheel. Il lavoro è completato quando il wheel risultante contiene le dipendenze incluse previste e auditwheel riporta il tag di compatibilità atteso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When build like this, and then install, and make the python wheel,

cmake \
    -DCMAKE_PREFIX_PATH=/opt/intel/oneapi/mkl/latest \
    -DWITH_MKL=ON \
    -DBLA_VENDOR=Intel \
    -DMKL_INCLUDE_DIR=/opt/intel/oneapi/mkl/latest/include \
    -DMKL_LIBRARY_DIR=/opt/intel/oneapi/mkl/latest/lib \
    -DCMAKE_INSTALL_PREFIX=$PWD/install \
    -DBUILD_TESTS=OFF \
    -DWITH_DNNL=OFF \
    -DWITH_CUDA=ON \
    -DWITH_CUDNN=ON \
    -DCUDA_ARCH_LIST=Common \
    -DWITH_OPENBLAS=OFF \
    -DCUDA_DYNAMIC_LOADING=OFF \
    ..

auditwheel does not see the dependencies (libctranslate2.so specially), and so does not bundle them:

~/ai/CTranslate2/python$ auditwheel show dist/ctranslate2-4.6.0-cp311-cp311-linux_x86_64.whl 

ctranslate2-4.6.0-cp311-cp311-linux_x86_64.whl is consistent with the
following platform tag: "linux_x86_64".

The wheel references external versioned symbols in these
system-provided shared libraries: libgcc_s.so.1 with versions
{'GCC_3.0'}, libc.so.6 with versions {'GLIBC_2.4', 'GLIBC_2.34',
'GLIBC_2.14', 'GLIBC_2.32', 'GLIBC_2.2.5'}, libstdc++.so.6 with
versions {'CXXABI_1.3.9', 'GLIBCXX_3.4.14', 'GLIBCXX_3.4.9',
'GLIBCXX_3.4.11', 'CXXABI_1.3', 'CXXABI_1.3.13', 'CXXABI_1.3.11',
'CXXABI_1.3.2', 'GLIBCXX_3.4.18', 'CXXABI_1.3.5', 'GLIBCXX_3.4.19',
'GLIBCXX_3.4', 'GLIBCXX_3.4.15', 'GLIBCXX_3.4.20', 'GLIBCXX_3.4.29',
'GLIBCXX_3.4.21', 'CXXABI_1.3.3'}

This constrains the platform tag to "manylinux_2_34_x86_64". In order
to achieve a more compatible tag, you would need to recompile a new
wheel from source on a system with earlier versions of these
libraries, such as a recent manylinux image.

What should I do to resolve this please?

Lingua principale
C++
Stelle
4.8k
Fork
557
Merge medio
1g 6h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenNMT/CTranslate2

Tutte le issue di OpenNMT/CTranslate2

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.