MantisBT - System Administration | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0008794 | System Administration | public | 2009-03-25 13:06 | 2009-03-25 13:08 | |
| Reporter | Paul D | ||||
| Assigned To | |||||
| Priority | normal | Severity | major | Reproducibility | sometimes |
| Status | new | Resolution | open | ||
| Platform | OS | OS Version | |||
| Summary | 0008794: Compile error: long-long 64bit compatibility issue | ||||
| Description | It started with this. I was coaxing VTK onto my fresh new Intel Core i7 machine at work running 64bit Ubuntu 8.10. Wouldn't compile: /home/pd/Software/vtk-5.2.1/Common/vtkAbstractArray.cxx: In member function ‘virtual void vtkAbstractArray::PrintSelf(std::ostream&, vtkIndent)’: /home/pd/Software/vtk-5.2.1/Common/vtkAbstractArray.cxx:251: error: ambiguous overload for ‘operator<<’ in ‘std::operator<< [with _Traits = std::char_traits<char>](((std::basic_ostream<char, std::char_traits<char> >&)((std::ostream*)operator<<(((std::ostream&)((std::ostream*)os)), ((const vtkIndent&)((const vtkIndent*)(& indent)))))), ((const char*)"Size: ")) << ((vtkAbstractArray*)this)->vtkAbstractArray::Size’ /usr/include/c++/4.3/ostream:112: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>& (*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>] <near match> /usr/include/c++/4.3/ostream:121: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>] <near match> I tried nightly-CVS from March 23rd, flattening Ubuntu and putting on 9.04 alpha - still no go. After wrestling with it for a week, I noticed that CMake was determining that I did not have long-long support for istream/ostream. Despite this, it was trying to compile with VTK_USE_64BIT_IDS=ON (set automatically). This instance should trigger a warning or error. The use of "long long" types should probably be investigated. It appears to me that there might be issues related to its usage as compared to "long long int" or "long long signed int". The later might be more appropriate? I worked around the issue by setting vtkIdType to "long long int" and forcing VTK_[I/O]STREAM_SUPPORTS_LONG_LONG to 1 in CMakeCache.txt. I presume that this added a compile flag which enabled long long support. Compiled fine. As an added note, the next day I came into the office and tried another fresh build from fresh source. CMake detected long long istream/ostream support and VTK compiled just fine. Perhaps the previous build with forced long-long support actually enabled this support? (extremely puzzling to me) Hope this helps. | ||||
| Steps To Reproduce | |||||
| Additional Information | uname -a Linux cataclysm 2.6.28-11-generic 0000035-Ubuntu SMP Wed Mar 18 21:55:34 UTC 2009 x86_64 GNU/Linux gcc -v Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs [^] --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2009-03-25 13:06 | Paul D | New Issue | |||
| 2009-03-25 13:08 | Paul D | Note Added: 0015800 | |||
| Notes | |||||
|
|
|||||
|
|
||||