Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libffpack.so.1: undefined symbol #398

Open
JianjianSha opened this issue Jul 6, 2024 · 0 comments
Open

libffpack.so.1: undefined symbol #398

JianjianSha opened this issue Jul 6, 2024 · 0 comments

Comments

@JianjianSha
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant