[vtkusers] Re: IRIX compilation errors cont'd

Michael Rice MichaelARice at knology.net
Tue Feb 10 00:06:22 EST 2004


On 2/9/2004 6:45 PM, vtkusers-request at vtk.org wrote:

>Message: 1
>Date: Mon, 09 Feb 2004 13:41:35 -0500
>From: Joshua A Foster <jafoster at uncc.edu>
>To: vtkusers at vtk.org
>Subject: [vtkusers] IRIX compilation errors cont'd
>
>Thanks for all the suggestions... I turned off VTK_USE_ANSI_STDLIB,
>added -LANG:std and -n32 as CXX flags.  Now the build gets a little
>farther, but won't compile vtkInteractorStyleUnicam:
>
>---------------------------------------------------------------
>
>/var/tmp/VTK/build/Rendering> make VERBOSE=1
>         make  cmake.depends
>`cmake.depends' is up to date.
>         make  cmake.check_depends
>`cmake.check_depends' is up to date.
>         make  -f cmake.check_depends
>`cmake.depends' is up to date.
>         make  all
>Building object file vtkInteractorStyleUnicam.o...
>         CC -o vtkInteractorStyleUnicam.o -IvtkRendering_EXPORTS
>-LANG:std -n32    -I/var/tmp/VTK/Rendering -I/var/tmp/VTK/build
>-I/var/tmp/VTK/Parallel -I/var/tmp/VTK/Hybrid -I/var/tmp/VTK/Patented
>-I/var/tmp/VTK/Rendering -I/var/tmp/VTK/IO -I/var/tmp/VTK/Imaging
>-I/var/tmp/VTK/Graphics -I/var/tmp/VTK/Filtering -I/var/tmp/VTK/Common
>-I/var/tmp/VTK/Common/Testing/Cxx -I/var/tmp/VTK/build/Utilities/zlib
>-I/var/tmp/VTK/Utilities/zlib -I/var/tmp/VTK/build/Utilities/jpeg
>-I/var/tmp/VTK/Utilities/jpeg -I/var/tmp/VTK/build/Utilities/png
>-I/var/tmp/VTK/Utilities/png -I/var/tmp/VTK/build/Utilities/tiff
>-I/var/tmp/VTK/Utilities/tiff -I/var/tmp/VTK/build/Utilities/expat
>-I/var/tmp/VTK/Utilities/expat
>-I/var/tmp/VTK/build/Utilities/DICOMParser
>-I/var/tmp/VTK/Utilities/DICOMParser
>-I/var/tmp/VTK/Utilities/freetype/include
>-I/var/tmp/VTK/build/Utilities/freetype
>-I/var/tmp/VTK/Utilities/ftgl/src -I/var/tmp/VTK/build/Utilities/ftgl
>-I/afs/uncc/cs/irix/apps/languages/tcltk-8.3/include
>-I/var/tmp/VTK/build/Rendering    -c
>/var/tmp/VTK/Rendering/vtkInteractorStyleUnicam.cxx
>cc-1132 CC: ERROR File = /usr/include/sys/types.h, Line = 535
>   The namespace "std" has no member "time_t".
>
>   __SGI_LIBC_USING_FROM_STD(time_t)
>   ^
>
>cc-1132 CC: ERROR File = /usr/include/sys/types.h, Line = 536
>   The namespace "std" has no member "clock_t".
>
>   __SGI_LIBC_USING_FROM_STD(clock_t)
>   ^
>
>cc-1132 CC: ERROR File = /usr/include/internal/time_core.h, Line = 221
>   The namespace "std" has no member "time_t".
>
>   extern int cftime(char *, char *, const
>__SGI_LIBC_NAMESPACE_QUALIFIER time_t *);
>
>  ^
>
>cc-1132 CC: ERROR File = /usr/include/internal/time_core.h, Line = 231
>   The namespace "std" has no member "time_t".
>
>   extern char *ctime_r(const __SGI_LIBC_NAMESPACE_QUALIFIER time_t *,
>char *);
>                                                             ^
>
>cc-1132 CC: ERROR File = /usr/include/internal/time_core.h, Line = 232
>   The namespace "std" has no member "time_t".
>
>   extern struct tm *gmtime_r(const __SGI_LIBC_NAMESPACE_QUALIFIER
>time_t *,
>                                                                   ^
>
>cc-1132 CC: ERROR File = /usr/include/internal/time_core.h, Line = 234
>   The namespace "std" has no member "time_t".
>
>   extern struct tm *localtime_r(const __SGI_LIBC_NAMESPACE_QUALIFIER
>time_t *,
>                                                                      ^
>
>cc-1132 CC: ERROR File = /usr/include/time.h, Line = 7
>   The namespace "std" has no member "clock_t".
>
>   __SGI_LIBC_USING_FROM_STD(clock_t)
>   ^
>
>cc-1132 CC: ERROR File = /usr/include/time.h, Line = 8
>   The namespace "std" has no member "time_t".
>
>   __SGI_LIBC_USING_FROM_STD(time_t)
>   ^
>
>8 errors detected in the compilation of
>"/var/tmp/VTK/Rendering/vtkInteractorStyleUnicam.cxx".
>*** Error code 2 (bu21)
>*** Error code 1 (bu21)
>
>-----------------------------------------------------------------
>
>I would be grateful for any suggestions.
>
>  - Joshua Foster
>
>
>  
>

Joshua -

Are you building using MIPSpro 7.4 or 7.4.1 (check the output of CC 
-version)? If it is 7.4, I would suggest you upgrade if at all possible. 
There are some serious issues with the 7.4 C++ compiler.

Also, are you building static or dynamic libs?

As for your particular errors shown above, instead of adding the 
"-LANG:std" option, try instead adding only "-D_STANDARD_C_PLUS_PLUS" to 
the CXX compiler flags.

As a point of interest, I was able to successfully build VTK 4.4.0 
64-bit libs on my IRIX 6.5.22 + MIPSpro 7.4.1 system. The only issues 
were a few 32-bit/64-bit incompatibility warnings with file offsets and 
pointer sizes when building the tiff library. I'm building the 32-bit 
libs now.

The following is my /etc/compiler.defaults file:
-DEFAULT:abi=n32:isa=mips4:proc=r10k

The default abi=n32 is overridden by the '-64' flag shown below.

Excerpts from VTKConfig.cmake:

# VTK Configuration options.
SET(VTK_BUILD_SHARED_LIBS "OFF")
SET(VTK_DEBUG_LEAKS "OFF")
SET(VTK_DISABLE_TK_INIT "OFF")
SET(VTK_HAVE_VG500 "")
SET(VTK_HAVE_VP1000 "")
SET(VTK_USE_MANGLED_MESA "OFF")
SET(VTK_MPIRUN_EXE "")
SET(VTK_MPI_MAX_NUMPROCS "")
SET(VTK_MPI_POSTFLAGS "")
SET(VTK_MPI_PREFLAGS "")
SET(VTK_OPENGL_HAS_OSMESA "OFF")
SET(VTK_USE_64BIT_IDS "OFF")
SET(VTK_USE_ANSI_STDLIB "ON")
SET(VTK_USE_CARBON "OFF")
SET(VTK_USE_COCOA "OFF")
SET(VTK_USE_HYBRID "ON")
SET(VTK_USE_MATROX_IMAGING "OFF")
SET(VTK_USE_MPI "OFF")
SET(VTK_USE_PARALLEL "OFF")
SET(VTK_USE_PATENTED "ON")
SET(VTK_USE_RENDERING "ON")
SET(VTK_USE_VIDEO_FOR_WINDOWS "OFF")
SET(VTK_USE_VOLUMEPRO "OFF")
SET(VTK_USE_GL2PS "OFF")
SET(VTK_USE_X "ON")
SET(VTK_WRAP_JAVA "OFF")
SET(VTK_WRAP_PYTHON "OFF")
SET(VTK_WRAP_TCL "OFF")
SET(TCL_TK_STATIC "")
SET(TK_RESOURCE_FILE "")

# The names of utility libraries used by VTK.
SET(VTK_PNG_LIBRARIES "vtkpng")
SET(VTK_ZLIB_LIBRARIES "vtkzlib")
SET(VTK_JPEG_LIBRARIES "vtkjpeg")
SET(VTK_TIFF_LIBRARIES "vtktiff")
SET(VTK_EXPAT_LIBRARIES "vtkexpat")


Excerpt from VTKBuildSettings.cmake:

SET(CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION "1")
SET(CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION "8")
SET(CMAKE_BUILD_SETTING_PROJECT_NAME "VTK")

SET(CMAKE_BUILD_SETTING_C_COMPILER "/usr/bin/cc")
SET(CMAKE_BUILD_SETTING_C_FLAGS "-64")
SET(CMAKE_BUILD_SETTING_C_FLAGS_DEBUG "-g")
SET(CMAKE_BUILD_SETTING_C_FLAGS_RELEASE "-O2")
SET(CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL "-Os")
SET(CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO "-O2 -g")

SET(CMAKE_BUILD_SETTING_CXX_COMPILER "/usr/bin/CC")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS "-64")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG "-g")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE "-O2")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL "-Os")
SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

SET(CMAKE_BUILD_SETTING_BUILD_TYPE "Release")
SET(CMAKE_BUILD_SETTING_BUILD_TOOL "/usr/freeware/bin/gmake")




More information about the vtkusers mailing list