[Paraview] ParaView 2 compile problems on x86_64

David Thompson dcthomp at speakeasy.net
Sun, 04 Apr 2004 13:38:44 -0700


--=-NsqPIIZ+n4JGE0z7N3rp
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

	I've made a couple changes to get ParaView compiling and running on a
Linux Athlon64 box with VTK_USE_64BIT_IDS turned on. I checked in one
obvious CMake error, but there are a couple of issues I'm less certain
about, so I'm attaching a patch in the hopes someone will tell me the
correct way to go about fixing things:

1. I had to add some member functions to vtkClientServerStream because
it wasn't including a 64-bit type (long long int as opposed to long int
on gcc 3.3.2). Should I be explicitly adding these
	VTK_CLIENT_SERVER_OPERATOR(long long)
	VTK_CLIENT_SERVER_OPERATOR(unsigned long long)
	VTK_TYPE_FROM_NATIVE(long long,vtkTypeInt64);
	VTK_TYPE_FROM_NATIVE(unsigned long long,vtkTypeUInt64)
	VTK_CSS_GET_ARGUMENT(long long)
	VTK_CSS_GET_ARGUMENT(unsigned long long)
or is that what the VTK_TYPE_INT64_NOT_STANDARD ifdef is supposed to
catch and it's just not being configured correctly? (I'm pretty sure
that just checking in the patch below will break builds on other systems
where sizeof(long) == sizeof(long long) or long long doesn't exist.

2. Is the patch below for handling a system-provided libz OK or will it
break other platforms?

3. The MPI library I used (from www.lam-mpi.org) defines
MPI_LONG_LONG_INT, not MPI_LONG_LONG (it appears that the MPI 1.1
standard calls out MPI_LONG_LONG_INT while MPI 2 calls out
MPI_LONG_LONG). This breaks the compile of
VTK/Parallel/vtkMPICommunicator.cxx. I haven't included a patch... I
just edited my mpi.h file, but it seems like we should check that one of
the two is defined (assuming all MPI implementations use macros to
define the constants).

	Thanks for any help,
	David

--=-NsqPIIZ+n4JGE0z7N3rp
Content-Disposition: attachment; filename=pv_x86_64.patch
Content-Type: text/x-patch; name=pv_x86_64.patch; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Index: Utilities/VTKClientServer/vtkClientServerStream.cxx
===================================================================
RCS file: /cvsroot/ParaView/ParaView/Utilities/VTKClientServer/vtkClientServerStream.cxx,v
retrieving revision 1.11
diff -r1.11 vtkClientServerStream.cxx
442a443
> VTK_CLIENT_SERVER_OPERATOR(long long)
448a450
> VTK_CLIENT_SERVER_OPERATOR(unsigned long long)
520a523
> VTK_CLIENT_SERVER_INSERT_ARRAY(long long)
525a529
> VTK_CLIENT_SERVER_INSERT_ARRAY(unsigned long long)
816a821
> VTK_CSS_GET_ARGUMENT(long long)
820a826
> VTK_CSS_GET_ARGUMENT(unsigned long long)
Index: Utilities/VTKClientServer/vtkClientServerStream.h
===================================================================
RCS file: /cvsroot/ParaView/ParaView/Utilities/VTKClientServer/vtkClientServerStream.h,v
retrieving revision 1.4
diff -r1.4 vtkClientServerStream.h
119a120
>   int GetArgument(int message, int argument, long long* value) const;
123a125
>   int GetArgument(int message, int argument, unsigned long long* value) const;
134a137
>   int GetArgument(int message, int argument, long long* value, vtkTypeUInt32 length) const;
138a142
>   int GetArgument(int message, int argument, unsigned long long* value, vtkTypeUInt32 length) const;
215a220
>   vtkClientServerStream& operator << (long long value);
220a226
>   vtkClientServerStream& operator << (unsigned long long value);
234a241
>   static vtkClientServerStream::Array InsertArray(const long long*, int);
239a247
>   static vtkClientServerStream::Array InsertArray(const unsigned long long*, int);
Index: Utilities/VTKClientServer/vtkTypeFromNative.h
===================================================================
RCS file: /cvsroot/ParaView/ParaView/Utilities/VTKClientServer/vtkTypeFromNative.h,v
retrieving revision 1.4
diff -r1.4 vtkTypeFromNative.h
88a89,91
> VTK_TYPE_FROM_NATIVE(long long,vtkTypeInt64);
> VTK_TYPE_FROM_NATIVE(unsigned long long,vtkTypeUInt64);
> 
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/ParaView/ParaView/CMakeLists.txt,v
retrieving revision 1.18
diff -r1.18 CMakeLists.txt
124,127c124,132
< SET(VTK_ZLIB_LIBRARIES vtkzlib)
< SET(VTK_ZLIB_INCLUDE_DIRS
<   ${ParaView_SOURCE_DIR}/VTK/Utilities/zlib
<   ${ParaView_BINARY_DIR}/VTK/Utilities/zlib)
---
> IF(VTK_USE_SYSTEM_ZLIB)
>   SET(VTK_ZLIB_LIBRARIES z)
> ELSE(VTK_USE_SYSTEM_ZLIB)
>   SET(VTK_ZLIB_LIBRARIES vtkzlib)
>   SET(VTK_ZLIB_LIBRARIES vtkzlib)
>   SET(VTK_ZLIB_INCLUDE_DIRS
>     ${ParaView_SOURCE_DIR}/VTK/Utilities/zlib
>     ${ParaView_BINARY_DIR}/VTK/Utilities/zlib)
> ENDIF(VTK_USE_SYSTEM_ZLIB)

--=-NsqPIIZ+n4JGE0z7N3rp--