linbox-team / fflas-ffpack

FFLAS-FFPACK - Finite Field Linear Algebra Subroutines / Package
http://linbox-team.github.io/fflas-ffpack/
GNU Lesser General Public License v2.1
56 stars 23 forks source link

libffpack.so.1: undefined symbol #398

Open JianjianSha opened 4 months ago

JianjianSha commented 4 months ago

OS: ubuntu

ImportError: libffpack.so.1: undefined symbol: _ZN5FFLAS7fscalinIN6Givaro15ModularBalancedIfEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm

libffpack.so.1 is used by sagemath, and libffpack.so.1 is installed via pip install sagemath-standard.

After installing fflas-ffpack from souce code, it seems that fflas-ffpack is a header-only library, and the function is located in fflas-ffpack/fflas/fflas-ffcal.inl

template<class Field>
inline void
fscalin (const Field& F, const size_t m , const size_t n,
         const typename Field::Element a,
         typename Field::Element_ptr A, const size_t lda)
{
    if (F.isOne(a)) {
        return ;
    }
    else if (F.isZero(a)) {
        fzero(F,m,n,A,lda);
    }
    else if (F.isMOne(a)) {
        fnegin(F,m,n,A,lda);
    }
    else {
        if (lda == n) {
            fscalin(F,n*m,a,A,1);
        }
        else {
            for (size_t i = 0 ; i < m ; ++i)
            {
                fscalin(F,n,a,A+i*lda,1);
            }
        }

        return;
    }
}

but how to build libffpack.so? On my machine, I find that

$ ldd -r  libffpack.so.1
...
undefined symbol: _ZN5FFLAS7fscalinIN6Givaro15ModularBalancedIfEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm      (./libffpack.so.1)
undefined symbol: _ZN5FFLAS7fscalinIN6Givaro15ModularBalancedIlEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm      (./libffpack.so.1)
undefined symbol: _ZN5FFLAS7fscalinIN6Givaro7ModularIddvEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm     (./libffpack.so.1)
undefined symbol: _ZN5FFLAS7fscalinIN6Givaro7ModularIllvEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm     (./libffpack.so.1)
undefined symbol: _ZN5FFLAS7fscalinIN6Givaro15ModularBalancedIdEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm      (./libffpack.so.1)
undefined symbol: _ZN5FFLAS7fscalinIN6Givaro7ModularIffvEEEEvRKT_mmNS4_7ElementENS4_11Element_ptrEm     (./libffpack.so.1)