I am doing gcov processing of code compiled using clang. But my report is getting generated using gcov4.6. And the developer told me GNU on FreeBSD stopped around 2012 when they upgraded their license to GPLv3. So how is it using gcov4.6 and not latest with freebsd 11.4.
I tried llvm-cov, but the generation keeps getting stuck and works perfectly with gcov4.6 tool.
The llvm-cov gcov tool reads code coverage data files and displays the coverage information for a specified source file. It is compatible with the gcov tool from version 4.2 of GCC and may also be compatible with some later versions of gcov.
This can be the reason why it is working with older version of gcov.
https://llvm.org/docs/CommandGuide/llvm-cov.html
Related
I need to use tools that depend on clang on a Unix machine I remote onto at work. Anything I install is locally installed onto ~/local. I do not have root permissions.
/usr is pretty outdated, with gcc being at version 4.4.7. clang requires gcc 4.7+
I read on linux from scratch that a gcc 6.1 installation requires 8.4 gb. This is not something I can do, because that's huge.
Can someone advise me on the best workaround to install up to date clang on my ~/local?
Please and thanks.
Edit:
Courtesy of Nishant, here is the short answer:
Set up a personal machine running the same linux distro and cross compile using gcc to your specific architecture. For me, I will run a Redhat 6.5 VM and compile using gcc an arm x64 binary. Thanks Nishant!
You can get pre-build binaries for Unix system from LLVM's release website: http://llvm.org/releases/
You can then put the binaries in any local folder you want and source it using the PATH variable, which can be done by modifying your ~/.bashrc file by appending:
export PATH=$PATH:<clang-binary-directory>
Now you will able to use clang from the command line terminal as if it was installed.
If you want to build from source only, you can get older source code of clang which will use gcc 4.4.7 and build it and then use clang to build clang. Or get the latest clang binary and use it to build latest clang.
I am trying to install dcmtk 3.6.0 on my linux system gcc version 4.8.2. But i get an error "Resize which is part of ofoset.h is not defined in this scope". Upon reading, i realized that this happens due to mismatch in the versions of the dcmtk and gcc version. But i am not able to find the right one for my complier.
Any help will be deeply appreciated.
gcc version 4.8.2 was not available when DCMTK 3.6.0 was released (see INSTALL file). So, you should download the latest development snapshot of the DCMTK: http://blog.jriesmeier.com/2013/11/how-to-get-the-current-development-version-of-the-dcmtk/
I am trying to install the Vision Workbench on my computer, following the instructions from this homepage: http://lunokhod.org/?p=13. I have installed all dependencies but I have libboost1.54-all-dev instead since I am using Mint 17 (Ubuntu 14.4).
After that I have created the config.options file I do ./autogen and ./configure.
However, I get the following in the logfile:
configure:20861: /usr/include/boost is missing these required libraries: BOOST_PROGRAM_OPTIONS BOOST_FILESYSTEM BOOST_THREAD
Checking for a boost in /usr/include/boost-*
Checking for a boost in /usr/local/cuda/include
Checking for a boost in /usr/local/cuda/include/boost-*
configure:20875: checking for package BOOST
HAVE_PKG_BOOST=no
However, in /usr/include/boost/ I have booth program_options, filesystem and thread.
The .so files are under /usr/lib/x86_64-linux-gnu/ for opencv, boost and flann, but somehow it can only find flann.
Does anyone have an idea about where the error might be?
EDIT: In the log-file I saw that the program looked for cxcore when it searched for opencv, but in the new version it is called opencv_core so I did a symbolic link from cxcore to opencv_core and then ./configure finds opencv. However, boost is still a problem and is necessary to build the program.
EDIT2:
I have now downloaded an earlier version of boost (1.42), and almost all boost programs are found except BOOST_THREAD. When I install the boost library I get the following messages:
error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
/ Erik
try running
./configure --with-boost="path/to/boost"
if you have more than one version of boost installed, you may need to also set environment variables
HAVE_PKG_BOOST=yes
PKG_BOOST_CPPFLAGS=/path/to/boost
PKG_BOOST_LDFLAGS=/path/to/boost
I've spent a lot of time setting up the CUDA toolchain on a machine running Ubuntu Linux (11.04). The rig has two NVIDIA Tesla GPUs, and I'm able to compile and run test programs from the NVIDIA GPU Computing SDK such as deviceQuery, deviceQueryDrv, and bandwidthTest.
My problems arise when I try to compile basic sample programs from books and online sources. I know you're supposed to compile with NVCC, but I get compile errors whenever I use it. Basically any sort of include statement involving CUDA libraries gives a missing file/library error. An example would be:
#include <cutil.h>
Do I need some sort of makefile to direct the compiler to these libraries or are there additional flags I need to set when compiling with NVCC?
I followed these guides:
http://hdfpga.blogspot.com/2011/05/install-cuda-40-on-ubuntu-1104.html http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Getting_Started_Linux.pdf
To fix the include problems add the cuda include directory to your compilation options (assuming it is /usr/local/cuda/include):
nvcc -I/usr/local/cuda/include -L/usr/local/cuda/lib test.cu -o test
cutil is not part of the CUDA toolkit. It's part of the CUDA SDK. So, assuming you have followed the instructions and you have added the PATH and LIB directories to your environment variables you still need to point to the CUDA SDK includes and libraries directories.
In order to include that lib manually you must pass the paths to the compiler:
nvcc -I/CUDA_SDK_PATH/C/common/inc -L/CUDA_SDK_PATH/C/lib ...
Although I personally prefer not to use the CUDA SDK libraries, you probably will find easier start a project from a CUDA SDK example.
I compiled the MongoDB C Drivers successfully and run the test scripts also but I am not able to compile the scripts which I am writing myself.
Following is the command and its error output.
$ gcc -Isrc --std=c99 ./src/*.c -I ./src/ tutorial.c -o tutorial -D_POSIX_C_SOURCE=200112L
./src/env_win32.c:27:53: fatal error: ws2tcpip.h: No such file or directory
compilation terminated.
I found that there is no file name ws2tcpip.h in /usr/include directory
Take out the ./src/*.c, that tells gcc to compile all of the c programs in the /src directory which includes some windows only programs.
What worked for me was to tell gcc to include the libmongoc.so that was built when the drivers were built.
The following command worked for me. My drivers are in directory "mongo-c-driver".
gcc --std=c99 -I mongo-c-driver/src -o tutorial tutorial.c mongo-c-driver/libmongoc.so
In my opinion the mongodb C API documentation is a little buggy in this area. Also, the latest header files don't match the source code shown in the tutorial. For example mongo-insert requires 4 parameters in the v0.6 headers, but the tutorial shows only 2 parameters.
In researching this problem and trying to recreate it by installing mongoDB and the C driver myself I have discovered that v0.6 of the driver broke compatibility with previous version of the API by adding support for write_concern which adds a 4th parameter to the mongo_insert function (which can be set to null). The example.c program provided in the docs/examples directory does not compile in v0.6. This bug is documented in patch CDRIVER-157 in github for the c-driver.