symengine
symengine copied to clipboard
linker error for architecture arm64
Hello there,
I'm trying to use symengine on my MacBook. Installed it with conda install symengine. The cpp file is
#include <iostream>
#include <symengine/expression.h>
using SymEngine::Expression;
using SymEngine::Symbol;
int main() {
Expression e("e");
return 0;
};
when compiling with clang++ -std=c++11 random.cpp I get the following error
Undefined symbols for architecture arm64:
"Teuchos::RCPNodeHandle::unbindOne()", referenced from:
Teuchos::RCPNodeHandle::unbind() in random-99fbf7.o
"Teuchos::store_stacktrace()", referenced from:
Teuchos::debugAssertStrength(Teuchos::ERCPStrength) in random-99fbf7.o
"Teuchos::ActiveRCPNodesSetup::ActiveRCPNodesSetup()", referenced from:
___cxx_global_var_init in random-99fbf7.o
"Teuchos::ActiveRCPNodesSetup::~ActiveRCPNodesSetup()", referenced from:
___cxx_global_var_init in random-99fbf7.o
"Teuchos::TestForException_break(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
Teuchos::debugAssertStrength(Teuchos::ERCPStrength) in random-99fbf7.o
"Teuchos::TestForException_getThrowNumber()", referenced from:
Teuchos::debugAssertStrength(Teuchos::ERCPStrength) in random-99fbf7.o
"Teuchos::TestForException_incrThrowNumber()", referenced from:
Teuchos::debugAssertStrength(Teuchos::ERCPStrength) in random-99fbf7.o
"Teuchos::TestForException_getEnableStacktrace()", referenced from:
Teuchos::debugAssertStrength(Teuchos::ERCPStrength) in random-99fbf7.o
"SymEngine::Expression::Expression(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
_main in random-99fbf7.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm on a MacBook with Apple M! chip running macOS Ventura Version 13.1. I cannot deceiver what the linking problem is here....
This doesn't seem to be from using conda installed symengine.
I'm also getting this in my project. What workarounds are there?