bloomberg / bloomberg/bde_verify
Building bde_verify on vanilla Centos 6.6
- Dominant language
- C++
- Stars
- 45
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
I used the following process to build and run bde_verify (commit 95368483732586c033931e61763ada9bc02da833) on a vanilla Centos 6.6 machine (equivalent to RHEL 6).
- Problem: No pre-installed clang 3.6 (duh).
So, I download and build clang:
```
$ git clone http://llvm.org/git/llvm.git
$ cd llvm
$ git checkout release_36
$ cd tools
$ git clone http://llvm.org/git/clang.git
$ cd clang
$ git checkout release_36
```
- Problem: GCC toolchain (4.4.7) insufficient to build clang -> install devtoolset 1.1, which provides gcc 4.7.2
I followed the instructions in http://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos, and put the toolchain in `/opt/centos`. Now we can pick up gcc-4.7.2 with:
```
$ export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/g++
$ export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
```
Follow the configuration instructions in `README.md` to configure and build clang.
- Problem: GCC toolchain (4.7.2) insufficient to build bde_verify -> use newly-built clang instead.
- Problem: The bde_verify Makefile variable `GCCDIR` (which identifies the location of the standard library that will be used to build bde_verify) assumes that the library is installed side-by-side with `$CXX`. Not true for clang++, so change `:=` to `?=` on the lines that set `GCCDIR`, and provide an external value for the variable. (Future: rename the variable to STDLIBDIR?)
```
export GCCDIR=/opt/centos/devtoolset-1.1/root/usr
```
- Problem: Documentation of bde_verify Makefiles is inaccurate. The variables you are told to set in the two Makefiles do not exist. Instead, set and export the following variables before running the `make`:
```
$ export CXX=/opt/llvm36/bin/clang++
$ export CC=/opt/llvm36/bin/clang
$ export LLVMDIR=/opt/llvm36
$ export PREFIX=/opt/bde_verify
```
...with the appropriate changes to the paths to fit your system.
- Problem: The bde_verify script '#!' line is wrong for a standard system. Change to:
```
#!/usr/bin/env perl
```
- Problem: The bde_verify script is a perl script that uses `DateTime`. Install `perl-DateTime`, if it is not already present on your system.
```
# yum install perl-DateTime
```
Contributor guide
Research direction
Start with README.md and the bde_verify Makefile to compare the documented variables with the actual build configuration on CentOS 6.6 using clang and the devtoolset toolchain. Then inspect the bde_verify script and its Perl dependency; done means the documented build completes and the installed script runs with the stated prerequisites.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- centos, cpp, linux, perl
- Domain
- build-system, documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100