Source: freemat
Version: 4.2+dfsg1-1
Severity: wishlist
Tags: patch
Hi Maintainer
Freemat currently FTBFS with LLVM 3.8, although LLVM 3.8 is not yet
the default in Sid.
I made the following minor changes:
In libs/libMatC/CJitFuncClang.cpp, include llvm/Config/llvm-config.h
instead of llvm/Config/config.h and remove the second include of
llvm/Config/config.h.
In CMakeLists.txt, link with clangTidyReadabilityModule instead of
clangTidyReadability.
I attempted to produce a patch against
debian/patches/12_update_clang_deps.patch but the result was not very
clear and the differing line endings made it difficult. Attached is a
patch that should be applied after applying
debian/patches/12_update_clang_deps.patch.
Not being familiar with freemat, I was not able to do extensive
testing, but the package built and installed and I was able to open
the freemat gui and perform some basic operations.
LLVM 3.8 is already the default in Ubuntu and I would like to apply
this patch there, but I would appreciate it if you would please review
it first.
Regards
Graham
--- 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;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"