[Paraview] ParaView 2 compile problems on x86_64

Brad King brad.king at kitware.com
Mon, 05 Apr 2004 09:39:56 -0400


Brad King wrote:
> David Thompson wrote:
> 
>> 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.
> 
> 
> As you guessed, this change will break elsewhere, but a modified version 
> may be needed.  Exactly one of the following should be true:
> 
>   - sizeof(long) == 8
>   - VTK_TYPE_INT64_NOT_STANDARD is defined
> 
> I suspect that the problem is that the type "long" is really 64-bit, but 
> vtkIdType is defined to "long long", which is also 64-bit.  Since "long" 
> provides the 64-bit type for vtkClientServerStream, it doesn't bother 
> adding the "long long" overloads.  Then code that uses vtkIdType breaks. 
>  I'll work on fixing this case soon.

I've committed a fix, but I'm unable to test it.  Please update 
Utilities/VTKClientServer and try the build again.  Be sure to remove 
your changes or you'll get conflicts when you update.

Thanks,
-Brad