Compiling ParaView v4.1.0 CMake Error: The following variables are used in this project…

Error

I received the following error while configuring ParaView v4.1.0 with ccmake from source.

CMake Error: The following variables are used in this project, 
but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly 
in the CMake files:
GLUT_Xi_LIBRARY (ADVANCED)
     linked by target "icetTests_mpi" in directory 
     ...ParaView-v4.1.0/ThirdParty/IceT/vtkicet/tests
GLUT_Xmu_LIBRARY (ADVANCED)
     linked by target "icetTests_mpi" in directory 
     ...ParaView-v4.1.0/ThirdParty/IceT/vtkicet/tests

ParaView Compile Error

Solution

To fix this, I set the GLIT_Xi_Library and GLUT_Xmu_LIBRARY variables to the correct libXi and libXmu shared libraries.

ParaView Compile Error

Compiling Mesa 7.9.1 Error: brw_program.c:39:20: error: talloc.h: No such file or directory

Error

I received the following error while configuring mesa version 7.9.1 from its source code (running ./configure).

Error: “brw_program.c:39:20: error: talloc.h: No such file or directory”

Mesa compile error
Solution

To solve this issue, I added a statement to the ./configure line that added talloc’s include directory into the CPPFLAGS.

CPPFLAGS="-I<PATH TO TALLOC INCLUDE DIRECTORY>" ./configure

Make sure to keep the “-I” before the path with no spaces between them. I had talloc installed in a unique location, with a different prefix than the norm. Mesa wasn’t looking in the right places for it. To provide mesa with the correct path, I added it into CPPFLAGS. These flags are used to define include directory paths for the compiler.

Compiling ParaView v4.1.0 Error: libXi.so undefined reference to `_XGetRequest’

Error

While compiling ParaView from the source files, I ran into the following error while running the ‘make’ command.

…libXi.so undefined reference to `_XGetRequest'
make[2]: *** [bin/icetTests_mpi] Error 1
[ThirdParty/IceT/vtkicet/tests/CMakeFiles/
icetTests_mpi.dir/all] Error2

Solution

In my case, the X11 libraries were installed separately and were located in custom directory locations that differed from the default. I fixed this error by checking and correcting the paths for my X11 libraries and include directories within the ccmake configuration menu. The error was then fixed during the next ‘make.’

Compiling ParaView v4.1.0 Error: couldn’t connect to server

Error

I received the following error while trying to compile ParaView from source.

http://www.vtk.org/files/ExternalData/MD5/
7dc839fb2825efa8c55e4275fee02a75 ("couldn't connect to server")

ParaView Compile Error

For some reason, the requested files could not be pulled from the server. You may have proxy issues or restricted internet access.

Solution

Manually download all MD5 files from http://www.vtk.org/files/ExternalData/MD5/ and place into your ExternalData/Objects/ within the build directory.

Compiling ParaView v4.1.0 Error: error: X11/SM/SMlib: error: X11/StringDefs.h: No such file or directory

Error

After using ccmake to configure ParaView options, I received the following errors while running ‘make.’

In file included from ...X11/Shell.h:51:26: error: X11/SM/SMlib.h: 
No such file or directory

and

...VTK/Rendering/OpenGL/vtkXRenderWindowInteractor.h:39:73: 
error: X11/Intrinsic.h: No such file or directory

and

In file included from ...Wrapping/ClientServer/
vtkXRenderWindowInteractorClientServer.cxx:6:
VTK/Rendering/OpenGL/vtkXRenderWindowInteractor.h:38:74: 
error: X11/StringDefs.h: No such file or directory
VTK/Rendering/OpenGL/vtkXRenderWindowInteractor.h:39:73: 
error: X11/Intrinsic.h: No such file or directory
In file included from ...Wrapping/ClientServer/
vtkXRenderWindowInteractorClientServer.cxx:6:

ParaView Error: Missing header

Solution

These issues were due to my libraries being installed in custom locations. Double check all paths supplied in the ccmake configuration and try copying the libxt (X11/all file contents), ICE (X11/ICE), SM (X11/SM) library directories into VTK/Rendering/OpenGL/X11 within your build directory. The error occurred because the compiler could not find the requested libraries.

Linux – Compiling Downloaded Source Code with Make’s 101

I’ve been doing quite a bit of source code compiling using the “make” command and figured I provide a brief primer on how to compile.

DISCLAIMER – Not all source codes are the same, some may/may not follow this structure.

First step, download the source code you wish to compile. For this example, I will download cmake 3.0. The tool can be downloaded from: http://www.cmake.org/files/v3.0/cmake-3.0.0.tar.gz.

Untar the file, the following command will work when executed from the same directory the tar file is located.

tar -xvf cmake-3.0.0.tar.gz
Screen Shot 2014-07-28 at 9.50.37 PM

Next, change directories into the newly tar-ed folder (the source code directory).

cd cmake-3.0.0

The following commands need to be executed within the source directory. Some source codes have and autogen.sh file. If this exists, run it to auto generate the correct configure.

./autogen.sh

However, if there is already a configure file (note this is not configure.<EXTENSION>), run that to check and setup your environment.

./configure

The command

./configure --help

will show you the manner different setup variables you can assign values. For example, if you do not want the source code to be compiled in default directories, add the –prefix flag to specify another directory.

./configure –prefix=<DIRECTORY FOR INSTALL>
Screen Shot 2014-07-28 at 9.52.33 PM

Some sources require you to run

make

first to run/setup default variables. However, I normal just run

make install
Screen Shot 2014-07-28 at 9.58.47 PM

in most instances, after configuring.

That’s pretty much it! It is compiled and ready to go. Happy coding!