pytorch/multipy

Local build fails with relocation error

albanD opened this issue · 2 comments

A local build with latest PyTorch with a local build of CPython 3.11 leads to many errors similar to:

    /usr/bin/ld: libpython_multipy.a(abstract.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: libpython_multipy.a(boolobject.o): relocation R_X86_64_32S against symbol `_Py_TrueStruct' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: libpython_multipy.a(bytearrayobject.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: libpython_multipy.a(bytesobject.o): relocation R_X86_64_32S against symbol `_PyRuntime' can not be used when making a shared object; recompile with -fPIC

Any idea what could be the problem?

My bad, I'm indeed missing the --enable-shared argument when configuring my local CPython install.