[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [help] How to build library and python module correctly



On Tue, 05 Jan 2021 10:05:08 +0100
Gard Spreemann <gspr@nonempty.org> wrote:

> 
> Kentaro Hayashi <kenhys@xdump.org> writes:
> 
> > Hi,
> >
> > I want to solve the following bug when import library 
> > from python, but I'm not sure how to do it yet.
> > So, I want to know correct way to fix it. [1]
> >
> > The problem is:
> >
> > import sentencepiece raise "undefined symbol" - 
> > python3-sentencepiece: undefined symbol _ZN13sentencepiece4util6StatusD1Ev
> >
> > There is a bit differ from other python3 module package because
> > python3-sentencepiece must be built from sentencepiece source package
> > with libsentencepiece at the same time.
> >
> > More details:
> >
> > Undefined symbol _ZN13sentencepiece4util6StatusD1Ev means
> > sentencepiece::util::Status::~Status().
> >
> > Then, checked whether the symbol is exported or not.
> >
> > $ nm -D /usr/lib/x86_64-linux-gnu/libsentencepiece.so.0.0.0 | grep
> > _ZN13sentencepiece4util6StatusD1Ev
> > 000000000008e6b0 T _ZN13sentencepiece4util6StatusD1Ev
> >
> > Thus, it seems that libsentencepiece is built as expectedly.
> 
> Hi,
> 
> If python3-sentencepiece needs symbols from libsentencepiece0, should it
> not depend on it?
> 

Thank you comment.


Yes, as far as I know, ${*:Depends} does it, but actually 
it does not work as expected. even though explicitly specified,
the situation is not changed.


% LANG=C apt depends python3-sentencepiece
python3-sentencepiece
  Depends: libc6 (>= 2.14)
  Depends: libgcc-s1 (>= 3.0)
  Depends: libstdc++6 (>= 5.2)
  Depends: python3 (<< 3.10)
  Depends: python3 (>= 3.9~)
  Depends: <python3:any>
    python3


Regards,


Reply to: