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

Update a LLVM version check #1242

Merged
merged 2 commits into from Apr 5, 2017
Merged

Conversation

jppelteret
Copy link
Contributor

Update the LLVM version check in llvm_double.h to accommodate v4.0

@isuruf
Copy link
Member

isuruf commented Apr 4, 2017

Thanks. Can you apply the following diff for formatting?
https://travis-ci.org/symengine/symengine/jobs/218484998#L415-L427

Did you run the tests with 4.0?

@jppelteret
Copy link
Contributor Author

@isuruf No, I haven't run the tests. I'm haven't yet been able to link to LLVM outside of spack. I'll let you know when I've done so.

@jppelteret
Copy link
Contributor Author

The appending of further LLVM components was suggested by @isuruf in an offline discussion. Without them, test_lambda_double would not link on MacOS. Many thanks for your help @isuruf!

Configure options:

cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DINTEGER_CLASS:STRING=boostmp \
-DBoost_INCLUDE_DIR=$SPACK_VIEW_DIR/include \
-DWITH_LLVM=ON \
-DWITH_COTIRE=OFF \
-DBUILD_SHARED_LIBS:BOOL=on \
-DCMAKE_INSTALL_PREFIX=../install \
../symengine

Original link error:

[ 99%] Linking CXX executable test_finitediff
[ 99%] Built target test_finitediff
[100%] Linking CXX executable test_lambda_double
Undefined symbols for architecture x86_64:
  "llvm::EngineBuilder::selectTarget()", referenced from:
      llvm::EngineBuilder::create() in test_lambda_double.cpp.o
  "llvm::EngineBuilder::create(llvm::TargetMachine*)", referenced from:
      llvm::EngineBuilder::create() in test_lambda_double.cpp.o
  "llvm::EngineBuilder::EngineBuilder(std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module> >)", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::EngineBuilder::~EngineBuilder()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createGVNPass(bool)", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)", referenced from:
      llvm::SmallVectorTemplateCommon<llvm::AttributeSet, void>::grow_pod(unsigned long, unsigned long) in test_lambda_double.cpp.o
  "llvm::createMemCpyOptPass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createLoadCombinePass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createReassociatePass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createAggressiveDCEPass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::DisableABIBreakingChecks", referenced from:
      llvm::VerifyDisableABIBreakingChecks in test_lambda_double.cpp.o
  "llvm::createBitTrackingDCEPass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)", referenced from:
      llvm::User::operator delete(void*, unsigned int) in test_lambda_double.cpp.o
  "llvm::createCFGSimplificationPass(int, std::__1::function<bool (llvm::Function const&)>)", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createInstructionCombiningPass(bool)", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createInstructionSimplifierPass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createMergedLoadStoreMotionPass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
  "llvm::createPartiallyInlineLibCallsPass()", referenced from:
      SymEngine::LLVMDoubleVisitor::init(std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&, std::__1::vector<Teuchos::RCP<SymEngine::Basic const>, std::__1::allocator<Teuchos::RCP<SymEngine::Basic const> > > const&) in test_lambda_double.cpp.o
ld: symbol(s) not found for architecture x86_64

Build and test status after application of d6bcf67:

$ make -j4 install && make test
...
[100%] Linking CXX executable test_lambda_double
[100%] Built target test_lambda_double
Install the project...
...
      Start 31: test_lambda_double
31/35 Test #31: test_lambda_double ...............   Passed    0.04 sec.
...
100% tests passed, 0 tests failed out of 35

@isuruf isuruf merged commit 7790ba5 into symengine:master Apr 5, 2017
isuruf added a commit to isuruf/symengine that referenced this pull request Aug 4, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants