Hi

The attached updated fix-llvm-build.patch fixes the build almost everywhere by adding LLVMCoverage to OPTIONAL_LIBS.

The build now fails on i386 with the following:

In file included from /usr/lib/llvm-3.9/include/llvm/Target/TargetOptions.h:20:0, from /usr/lib/llvm-3.9/include/llvm/Target/TargetMachine.h:22, from /usr/lib/llvm-3.9/include/llvm/ExecutionEngine/ExecutionEngine.h:28, from /<<BUILDDIR>>/freemat-4.2+dfsg1/libs/libMatC/CJitFuncClang.hpp:8, from /<<BUILDDIR>>/freemat-4.2+dfsg1/libs/libMatC/JITFactory.cpp:2: /usr/lib/llvm-3.9/include/llvm/MC/MCAsmInfo.h:39:6: error: expected identifier before ‘,’ token
   X86,     /// Windows x86, uses no CFI, just EH tables
      ^
/usr/lib/llvm-3.9/include/llvm/MC/MCAsmInfo.h: In member function ‘bool llvm::MCAsmInfo::usesWindowsCFI() const’: /usr/lib/llvm-3.9/include/llvm/MC/MCAsmInfo.h:555:58: error: expected unqualified-id before ‘)’ token
             WinEHEncodingType != WinEH::EncodingType::X86);
                                                          ^

Regards
Graham

Description: Fix build failure with default LLVM 3.9
Author: Graham Inggs <[email protected]>
Last-Update: 2017-01-04
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -258,7 +258,7 @@
   link_directories(${LLVM_LIBRARY_DIRS})
   llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES executionengine option IRReader lto interpreter nativecodegen asmparser bitreader bitwriter codegen ipo linker selectiondag instrumentation)
   
-  set(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${CLANG_LIBRARIES};clang;clangAnalysis;clangApplyReplacements;clangARCMigrate;clangAST;clangASTMatchers;clangBasic;clangCodeGen;clangDriver;clangDynamicASTMatchers;clangEdit;clangFormat;clangFrontend;clangFrontendTool;clangIndex;clangLex;clangParse;clangQuery;clangRename;clangRewrite;clangRewriteFrontend;clangSema;clangSerialization;clangStaticAnalyzerCheckers;clangStaticAnalyzerCore;clangStaticAnalyzerFrontend;clangTidy;clangTidyGoogleModule;clangTidyLLVMModule;clangTidyMiscModule;clangTidyReadability;clangTidyUtils;clang ${CLANG_LIBS} ${REQ_LLVM_LIBRARIES})
+  set(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${CLANG_LIBRARIES};clang;clangAnalysis;clangApplyReplacements;clangARCMigrate;clangAST;clangASTMatchers;clangBasic;clangCodeGen;LLVMCoverage;clangDriver;clangDynamicASTMatchers;clangEdit;clangFormat;clangFrontend;clangFrontendTool;clangIndex;clangLex;clangParse;clangQuery;clangRename;clangRewrite;clangRewriteFrontend;clangSema;clangSerialization;clangStaticAnalyzerCheckers;clangStaticAnalyzerCore;clangStaticAnalyzerFrontend;clangTidy;clangTidyGoogleModule;clangTidyLLVMModule;clangTidyMiscModule;clangTidyReadabilityModule;clangTidyUtils;clang ${CLANG_LIBS} ${REQ_LLVM_LIBRARIES})
 ENDIF()
 
 ##############################################################################
--- a/libs/libMatC/CJitFuncClang.cpp
+++ b/libs/libMatC/CJitFuncClang.cpp
@@ -17,9 +17,8 @@
 
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
-#include "llvm/Config/config.h"
+#include "llvm/Config/llvm-config.h"
 #include "llvm/ADT/SmallString.h"
-#include "llvm/Config/config.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 #include "llvm/ExecutionEngine/GenericValue.h"
 #include "llvm/Support/ManagedStatic.h"
-- 
debian-science-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to