[Paraview] Conflict with stddef.h when compiling PV on Intel Mac

Romy Schneider romy at tacc.utexas.edu
Wed Jul 19 11:36:40 EDT 2006


Hello,

I am having issues compiling paraview on an Intel MacBook Pro  
(10.4.7).  I am trying to the compile the latest release (2.4.4) with  
cmake 2.2 (also tried cmake 2.4).  I have been following the  
instructions and tips from other posts on this listing about  
compiling and installing PV on an intel mac, in particular I've tried  
these configurations:

http://www.paraview.org/Wiki/ 
ParaView:FAQ#How_do_I_compile_ParaView_for_Mac_OS_X.3F (general mac  
configuration)

http://public.kitware.com/pipermail/paraview/2006-March/002717.html  
(Ivan Guajan's configuration, seems to be similar to general mac config)

http://public.kitware.com/pipermail/paraview/2006-May/002982.html  
(Randy Hudson's configuration)

I appear to be having a compile error that no one else has run into,  
or at least posted about.  The error is:

(14:10)/Users/romy/sw/paraview-2.4.4_BIN: make
-- Found existing Tcl, not rebuilding
-- Found existing Tk, not rebuilding
Building C object VTK/Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/var.o
In file included from /Users/romy/sw/paraview-2.4.4/VTK/Utilities/ 
vtknetcdf/nc.h:14,
                  from /Users/romy/sw/paraview-2.4.4/VTK/Utilities/ 
vtknetcdf/var.c:7:
/usr/lib/gcc/i686-apple-darwin8/4.0.1/include/stddef.h:152: error:  
two or more data types in declaration specifiers
make[2]: *** [VTK/Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/var.o]  
Error 1
make[1]: *** [VTK/Utilities/vtknetcdf/CMakeFiles/vtkNetCDF.dir/all]  
Error 2
make: *** [all] Error 2

A sampling of code in this system file (stddef.h) is here:

..........

/* Define this type if we are doing the whole job,
    or if we want this type in particular.  */
#if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
#ifndef _PTRDIFF_T      /* in case <sys/types.h> has defined it. */
#ifndef _T_PTRDIFF_
#ifndef _T_PTRDIFF
#ifndef __PTRDIFF_T
#ifndef _PTRDIFF_T_
#ifndef _BSD_PTRDIFF_T_
#ifndef ___int_ptrdiff_t_h
#ifndef _GCC_PTRDIFF_T
#define _PTRDIFF_T
#define _T_PTRDIFF_
#define _T_PTRDIFF
#define __PTRDIFF_T
#define _PTRDIFF_T_
#define _BSD_PTRDIFF_T_
#define ___int_ptrdiff_t_h
#define _GCC_PTRDIFF_T
#ifndef __PTRDIFF_TYPE__
#define __PTRDIFF_TYPE__ long int
#endif
typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif /* _GCC_PTRDIFF_T */
#endif /* ___int_ptrdiff_t_h */
#endif /* _BSD_PTRDIFF_T_ */
#endif /* _PTRDIFF_T_ */
#endif /* __PTRDIFF_T */
#endif /* _T_PTRDIFF */
#endif /* _T_PTRDIFF_ */
#endif /* _PTRDIFF_T */

/* If this symbol has done its job, get rid of it.  */
#undef  __need_ptrdiff_t

#endif /* _STDDEF_H or __need_ptrdiff_t.  */

.......

(the line in blue is line #152)

Just to check, I tried pointing to the stddef.h in my /usr/include  
directory (which is slightly different, I'm thinking it's the cc  
version), and I get the same error.  My initial guess is that  
ptrdiff_t is being defined somewhere else, I suppose in Paraview, and  
therefore it's failing when it tries to redefine it here.  I have  
compiled other programs with this gcc, so I don't think its a problem  
with that, but I am confused as to why no one else has run into this  
problem compiling PV on an Intel Mac.  I am using the gcc (and cc)  
that came with the developer tools kit on the disc distributed with  
my mac, it appears to be version 4.0.1.

Any help or suggested fixes would be greatly appreciated, as I am stuck.

Thank you,
Romy Schneider

romy at tacc.utexas.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20060719/8263f1ae/attachment.htm


More information about the ParaView mailing list