These are chat archives for symengine/symengine

26th
Dec 2014
Sushant Hiray
@sushant-hiray
Dec 26 2014 03:48
@shivamvats can you post the error?
Shivam Vats
@shivamvats
Dec 26 2014 06:44
/tmp/cc9NFCFD.o: In function `test_monomial_mul()':
eg.cpp:(.text+0x1f4): undefined reference to `CSymPy::monomial_mul(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >&)'
/tmp/cc9NFCFD.o: In function `test_expand()':
eg.cpp:(.text+0x437): undefined reference to `CSymPy::Symbol::Symbol(std::string const&)'
eg.cpp:(.text+0x4c6): undefined reference to `CSymPy::Symbol::Symbol(std::string const&)'
eg.cpp:(.text+0x55e): undefined reference to `CSymPy::Symbol::Symbol(std::string const&)'
eg.cpp:(.text+0x5f6): undefined reference to `CSymPy::Symbol::Symbol(std::string const&)'
eg.cpp:(.text+0x665): undefined reference to `CSymPy::Integer::Integer(int)'
eg.cpp:(.text+0x70f): undefined reference to `CSymPy::add(CSymPy::RCP<CSymPy::Basic const> const&, CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x72f): undefined reference to `CSymPy::add(CSymPy::RCP<CSymPy::Basic const> const&, CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x74f): undefined reference to `CSymPy::add(CSymPy::RCP<CSymPy::Basic const> const&, CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x76f): undefined reference to `CSymPy::pow(CSymPy::RCP<CSymPy::Basic const> const&, CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x7dd): undefined reference to `CSymPy::expand(CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x825): undefined reference to `CSymPy::add(CSymPy::RCP<CSymPy::Basic const> const&, CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x83e): undefined reference to `CSymPy::expand(CSymPy::RCP<CSymPy::Basic const> const&)'
eg.cpp:(.text+0x8cd): undefined reference to `CSymPy::Integer::Integer(int)'
eg.cpp:(.text+0x928): undefined reference to `CSymPy::Integer::Integer(int)'
eg.cpp:(.text+0x983): undefined reference to `CSymPy::Integer::Integer(int)'
eg.cpp:(.text+0x9de): undefined reference to `CSymPy::Integer::Integer(int)'
eg.cpp:(.text+0xb02): undefined reference to `CSymPy::expr2poly(CSymPy::RCP<CSymPy::Basic const> const&, std::unordered_map<CSymPy::RCP<CSymPy::Basic const>, CSymPy::RCP<CSymPy::Number const>, CSymPy::RCPBasicHash, CSymPy::RCPBasicKeyEq, std::allocator<std::pair<CSymPy::RCP<CSymPy::Basic const> const, CSymPy::RCP<CSymPy::Number const> > > >&, std::unordered_map<std::vector<int, std::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, CSymPy::vec_int_hash, CSymPy::vec_int_eq, std::allocator<std::pair<std::vector<int, std::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > >&)'
eg.cpp:(.text+0xb1f): undefined reference to `CSymPy::expr2poly(CSymPy::RCP<CSymPy::Basic const> const&, std::unordered_map<CSymPy::RCP<CSymPy::Basic const>, CSymPy::RCP<CSymPy::Number const>, CSymPy::RCPBasicHash, CSymPy::RCPBasicKeyEq, std::allocator<std::pair<CSymPy::RCP<CSymPy::Basic const> const, CSymPy::RCP<CSymPy::Number const> > > >&, std::unordered_map<std::vector<int, std::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, CSymPy::vec_int_hash, CSymPy::vec_int_eq, std::allocator<std::pair<std::vector<int, std::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > >&)'
eg.cpp:(.text+0xb61): undefined reference to `CSymPy::poly_mul(std::unordered_map<std::vector<int, std::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, CSymPy::vec_int_hash, CSymPy::vec_int_eq, std::allocator<std::pair<std::vector<int, std::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > > const&, std::unordered_map<std::vector<int, std::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, CSymPy::vec_int_hash, CSymPy::vec_int_eq, std::allocator<std::pair<std::vector<int, std::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > > const&, std::unordered_map<std::vector<int, std::allocator<int> >, __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, CSymPy::vec_int_hash, CSymPy::vec_int_eq, std::allocator<std::pair<std::vector<int, std::allocator<int> > const, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> > > >&)'
/tmp/cc9NFCFD.o: In function `main':
eg.cpp:(.text+0x1050): undefined reference to `CSymPy::print_stack_on_segfault()'
/tmp/cc9NFCFD.o: In function `__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr()':
eg.cpp:(.text._ZN10__gmp_exprIA1_12__mpz_structS1_EC2Ev[_ZN10__gmp_exprIA1_12__mpz_structS1_EC5Ev]+0x14): undefined reference to `__gmpz_init'
/tmp/cc9NFCFD.o: In function `__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::~__gmp_expr()':
eg.cpp:(.text._ZN10__gmp_exprIA1_12__mpz_structS1_ED2Ev[_ZN10__gmp_exprIA1_12__mpz_structS1_ED5Ev]+0x14): undefined reference to `__gmpz_clear'
/tmp/cc9NFCFD.o: In function `__gmp_expr<__mpz_struct [1], __mpz_struct [1]>::operator=(int)':
eg.cpp:(.text._ZN10__gmp_exprIA1_12__mpz_structS1_EaSEi[_ZN10__gmp_exprIA1_12__mpz_structS1_EaSEi]+0x20): undefined reference to `__gmpz_set_si'
collect2: error: ld returned 1 exit status
I was trying to run the test_poly.cpp test (in basic).
Shivam Vats
@shivamvats
Dec 26 2014 06:51
I installed csympy with almost all cmake preferences as On.
And then also did sudo make install. I'm not too handy with cpp libraries, so I might be making a silly mistake.