How to build libclang release 6.0 - llvm

I'm trying to build libclang for the latest release 6.0.
As I understand I need to clone llvm repository and then to clone clang repository under tools/clang directory, run cmake command and then build libclang with make liblcang
during the build I get the following error :
llvm/tools/clang/lib/Lex/PTHLexer.cpp:339:12: error: ‘HashString’ is
not a member of ‘llvm’
it seems that there is some kind of version mismatch
I checked out release_60 branch for both repositories
Looked in LLVM and clang documentation and could not find how to match the versions.

issue resolved.
I had to pull again to the latest commit

Related

Cmake doesn't find boost windows

I'm trying to run this code:
https://github.com/snukky/news-translit-nmt
I've installed boost and got the following messages:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\Program Files\boost\boost_1_67_0
The following directory should be added to linker library paths:
C:\Program Files\boost\boost_1_67_0\stage\lib
By the comment of #kenba I've added the following environment variables:
Try 1
When I try to run the following cmd:
cmake .. -DCMAKE_BUILD_TYPE=Release
I get:
-- Could NOT find Boost (missing: timer iostreams filesystem system chrono) (found version "1.67.0")
CMake Error at CMakeLists.txt:290 (message):
Cannot find Boost libraries. Terminating.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!
See also "D:/ThesisResources/previous_works/news-translit-nmt-master/tools/marian-dev/build/CMakeFiles/CMakeOutput.log".
Try 2
When I try to give a custom boost by this ref
https://marian-nmt.github.io/docs/#custom-boost:
I run the following cmd:
cmake .. -DBOOST_ROOT="C:\Program Files\boost\boost_1_67_0"
I get the same error.
I've also tried working with Linux WSL (But problems with CUDA installation overthere, their team is working on it), Linux VirtualBox (Not enough resources), and Ubuntu 17.10 I have installed (But Cuda requires Ubuntu 16.04 / 18.04)
What am I missing here? I'm trying any suggestion, stuck on it for a few days. Thanks!
Edit:
I reinstalled Ubuntu 16.04 and the problem was solved. Still don't know how to solve it in windows, but i'll continue use Ubuntu 16.04.
I had this problem earlier while trying to build the Windows version of Marian NMT (the same component that you're having trouble with). I can't remember the exact steps to solve the problem, but the root cause is that the Marian NMT build for Windows does not work with newer versions of Boost, since the source code uses some deprecated calling conventions for timer and chrono libraries (maybe some others as well).
The error message kind of confirms this: it can't find Boost, but on the other hand it says it finds your version 1.67.0. The solution is to use an older version of boost, I've confirmed that it works with 1.60.0.
If you just require a Marian NMT decoder that works in Windows, a project I work on has released a plugin for the Trados Studio translation tool, which contains a compiled marian-decoder executable for Windows: https://object.pouta.csc.fi/fiskmo/TradosStudio/FiskmoTranslationProvider.sdlplugin. You can access the executable by unzipping the sdlplugin file, the StartMtPipe.bat shows how to use the decoder.

How to install GDB in windows when building shogun from source?

I tried compiling shogun from source in windows but after writing
cmake [options] ..
command i get this error:
-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.15063.
-- Could NOT find GDB (missing: GDB_COMMAND GDB_VERSION)
CMake Error at src/shogun/CMakeLists.txt:57 (MESSAGE):
Shogun can only be built with GPL codes if the source files are in
C:/Users/user/Desktop/shogun/src/gpl. Please download or disable with
LICENSE_GPL_SHOGUN=OFF.
I tried installing GDB from MinGW but it didn't worked
how to proceed further ?
That's one of the first results when googling for the error so I'll post an answer here and link to relevant websites.
Shogun uses submodules to separate the main BSD (Berkeley Software Distribution) licensed library from the GPL (GNU General Public Licence) licensed files (for the difference between those see an example article here). After cloning the repository you'll need to invoke git submodule update --init comand as specified in the documentation which will pull shogun-gpl repository (among others) into shogun-gpl directory. See also this GitHub issue.

Tensorflow and Bazel c++

I'm trying to build tensorflow C++ from sources but no success. I followed different tutorials, but each time, there is a different error.
What I want to do is to create a library so I can use it with Qt. I followed this tutorial because it was exactly what I wanted:
https://tuatini.me/building-tensorflow-as-a-standalone-project/
(build on Ubuntu, not on raspberry)
It works fine until I have to use babel.
The tutorial says I have to run this command:
bazel build -c opt --verbose_failures //tensorflow:libtensorflow_cc.so
but it always fails with the error:
ERROR: /home/default/.cache/bazel/_bazel_default/045e1c5e9b482c7b029d706e128fc7e7/external/io_bazel_rules_closure/closure/stylesheets/closure_css_library.bzl:27:13: name 'set' is not defined
I have no idea where I'm supposed to define 'set' (I remove the .cache/bazel folder)
Other tutorials I followed gave me errors such as bazel needs to be > 0.4.3, found 0.13.1 as if it was strings instead of numbers...
Any idea on how to make it work?
Do you need to build Tensorflow 1.3.0? There's an old version of TF that can only be built with Bazel 0.5.1, according to the tutorial. You have Bazel 0.13.1, which doesn't support the keyword set in the build scripts. The latest version of TF is buildable with Bazel 0.13.1.
If you need to build 1.3.0, install an older version of Bazel (e.g. 0.5.4) from https://github.com/bazelbuild/bazel/tags?before=0.4.3.
To be exact, this error comes from one of the dependencies of TF, and not TF itself.

vcpkg setup errors on command line

I am trying to compile dlib 19.4 using the vcpkg tool
since I am having trouble compiling CMAKE and working with Boost.Python
to fix compiler issues for dlib.
Though I am having problems even running the basic steps
to get the vcpkg package to work:
(I also downloaded Visual Studio 2017 for this tool)
Looking at executed command (git init), you initialized empty git repository for vcpkg - that is likely wrong. This bootstrap.ps1 script fails internally when trying to fetch existing revisions. vcpkg doesn't want to reside in just any git repository, it wants "its" git repository. vcpkg uses git as a distribution platform and later to perform updates.
So instead, you should clone vcpkg repository to some directory, e.g.:
C:\test>git clone https://github.com/Microsoft/vcpkg.git vcpkg_test
Cloning into 'vcpkg_test'...
...
Checking out files: 100% (876/876), done.
C:\test>cd vcpkg_test
C:\test\vcpkg_test>powershell -exec bypass scripts\bootstrap.ps1
https://github.com/Microsoft/vcpkg/
Additionally I see errors regarding VS2017 C++ support. VS2017 is an IDE with multiple optionally supported languages (i.e. you could have only C# support installed). Please make sure you have "Desktop development with C++" workload installed - as vcpkg is for C++. You can update the installation at any time by running installer again (Modify).
https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio

Building z3 on mac os x

I'm trying to build Z3 on mac os x.
Following README file, I just executed
autoconf
./configure
make
to get an error "omp.h" file not found.
I copied the omp.h file from /usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include to lib directory to solve this issue.
Then, I got lib/buffer.h:243:13: error: use of undeclared identifier 'push_back' error in building the code.
What could be the solution? I have gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) on Mac OS X 10.7.5.
The next release (Z3 v4.3.2) will have better support for OSX, clang, and older versions of gcc.
You should be able to compile the release candidate using the following instructions. rc is the branch that contains the current release candidate.
git clone https://git01.codeplex.com/z3 -b rc
cd z3
python scripts/mk_make.py
cd build
make
BTW, the link http://z3.codeplex.com/releases/view/95640 does not contain the latest release (Z3 v4.3.1). We don't create zip files with source code anymore because codeplex automatically generates them for any version. See this link for additional details.
EDIT
on February 2013, we started to provide nightly builds for all major platforms (including OSX). Here are instruction on how to download these pre-compiled binaries.
END EDIT
Alternatively, you can use Homebrew:
> brew install z3