Error: identifier “cout” is undefined

I ran across the following issue when trying to compile my AztecOO source code outside of Trilinous.

example/AztecOO/adapt_main.cpp(94): error: identifier "cout" is undefined
cout << comm << endl;
^
example/AztecOO/adapt_main.cpp(94): error: identifier "endl" is undefined
cout << comm << endl;
^
example/AztecOO/adapt_main.cpp(96): error: identifier "cerr" is undefined
if(argc != 2) cerr << "error: enter name of data file on command line" << endl;

Fix
The compiler doesn’t recognize that these methods come from the standard library. Therefore, I must tell it with the following commands:

using std::cout;
using std::endl;
using std::cerr;

Credit goes to http://stackoverflow.com/questions/13208547/the-includeiostream-exists-but-i-get-an-error-identifier-cout-is-undefine.

AztecOO catastrophic error: cannot open source file “Epetra_Map.h”

A while back I was trying to compile the AztecOO library outside of Trilinous. See this early post for more details. In doing so, I received the following error:

catastrophic error: cannot open source file "Epetra_Map.h"

Solution
Aztec requires quite a few of the additional tilinous header files. I copied a couple addition src directories from trilinous to my Aztec src folder. The list below shows everything I copied into source. I recommend you keep your AztecOO src directory organized and make folders for the external libraries. Also make sure to have correctly included directories with –I in the compile statement to ensure that the compiler looks into the Aztec src directory for the correct files.

Directories I copied:
trilinos-11.10.1-Source/packages/epetra/src
trilinos-11.10.1-Source/packages/teuchos/core/src
trilinos-11.10.1-Source/packages/teuchos/comm/src
trilinos-11.10.1-Source/packages/teuchos/parameterlist /src
trilinos-11.10.1-Source/packages/epetraext/src

Files
trilinos-11.10.1-Source/packages/triutils/src/Trilinos_Util.h
trilinos-11.10.1-Source/packages/triutils/src/Trilinos_Util_ReadMatrixMarket2Epetra.h
trilinos-11.10.1-Source/packages/epetraext/src/inout/EpetraExt_OperatorOut.h
trilinos-11.10.1-Source/packages/epetraext/src/EpetraExt_ConfigDefs.h

I also copied the additional files from the build version of trilinous (these files are generated upon ‘make’ in Trilinous).

trilinos.build/packages/epetra/src/Epetra_config.h
trilinos.build/packages/epetra/src/Epetra_DLLExportMacro.h
trilinos.build>/packages/teuchos/core/src/Teuchos_config.h
trilinos.build/Trilinos_version.h
trilinos.build/packages/triutils/src/Triutils_config.h
trilinos.build/packages/teuchos/core/src/Teuchos_config.h

I also had to remove some directories
aztecoo/example

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.