View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014493VTK(No Category)public2013-12-28 18:392014-01-13 10:34
ReporterOrion Poplawski 
Assigned ToDave DeMarle 
PriorityhighSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version6.1.rc 
Summary0014493: Cannot build 6.1.0 (paraview 4.1.0) with gcc 4.8.2
DescriptionIn file included from /usr/include/c++/4.8.2/deque:64:0,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Common/DataModel/vtkPixelExtent.h:31,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/LIC/vtkSurfaceLICComposite.h:28,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.h:26,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx:15:
/usr/include/c++/4.8.2/bits/stl_deque.h: In instantiation of 'void std::deque<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = vtkPixelBufferObject*; _Alloc = std::allocator<vtkPixelBufferObject*>]':
/usr/include/c++/4.8.2/bits/stl_deque.h:908:55: required from 'std::deque<_Tp, _Alloc>::deque(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = int; _Tp = vtkPixelBufferObject*; _Alloc = std::allocator<vtkPixelBufferObject*>; std::deque<_Tp, _Alloc>::allocator_type = std::allocator<vtkPixelBufferObject*>]'
/builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx:1275:60: required from here
/usr/include/c++/4.8.2/bits/stl_deque.h:1631:26: error: invalid conversion from 'int' to 'std::deque<vtkPixelBufferObject*>::value_type {aka vtkPixelBufferObject*}' [-fpermissive]
    _M_fill_initialize(__x);
                          ^
In file included from /usr/include/c++/4.8.2/deque:66:0,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Common/DataModel/vtkPixelExtent.h:31,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/LIC/vtkSurfaceLICComposite.h:28,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.h:26,
                 from /builddir/build/BUILD/ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx:15:
/usr/include/c++/4.8.2/bits/deque.tcc:350:5: error: initializing argument 1 of 'void std::deque<_Tp, _Alloc>::_M_fill_initialize(const value_type&) [with _Tp = vtkPixelBufferObject*; _Alloc = std::allocator<vtkPixelBufferObject*>; std::deque<_Tp, _Alloc>::value_type = vtkPixelBufferObject*]' [-fpermissive]
     deque<_Tp, _Alloc>::
     ^
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Filespatch file icon paraview-cstddef.patch [^] (1,032 bytes) 2014-01-01 10:32 [Show Content]

 Relationships

  Notes
(0032095)
Burlen (developer)
2013-12-30 16:06
edited on: 2013-12-30 22:29

looks like we may need to include <cstddef> where null is used, and maybe cast explicitly?

(0032098)
Orion Poplawski (reporter)
2013-12-31 00:00

This fixes it for me:

diff -up ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx.cstddeff ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx
--- ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx.cstddeff 2013-12-24 19:17:44.000000000 -0700
+++ ParaView-v4.1.0-RC2/VTK/Rendering/ParallelLIC/vtkPSurfaceLICComposite.cxx 2013-12-30 15:19:14.469386213 -0700
@@ -33,6 +33,7 @@
 #include "vtkgl.h"
 #include "vtkMPI.h"
 
+#include <cstddef>
 #include <list>
 #include <deque>
 #include <vector>

Thanks!
(0032101)
Orion Poplawski (reporter)
2013-12-31 16:38

Actually, no, that doesn't do it. Apparently this is a 32-bit only issue, so an explicit cast may be needed in that case.
(0032102)
Orion Poplawski (reporter)
2014-01-01 10:32

Static cast is needed - that is what is done elsewhere in the code. Attached patch fixes.
(0032110)
Burlen (developer)
2014-01-02 13:40

The issue is strange, I have gcc 4.8.2 on Fedora 19 and it doesn't affect me. However, your patch looks good to me. I applied it and put it on gerrit.

http://review.source.kitware.com/#/t/3795/ [^]
(0032111)
Orion Poplawski (reporter)
2014-01-02 13:46

To be explicit - this was in Fedora rawhide - so perhaps some other change is the culprit.
(0032117)
Burlen (developer)
2014-01-02 17:06

Oh, then it may indeed be a unstable rawhide gcc thing. I don't think the cast hurts... I'm not sure we should be chasing rawhide either... I'd like to hear Dave's opinion on this.

before you mentioned about rawhide I was looking into the possibility that this is because of some new c++11 requirement. but it seems that initializing pointers with NULL should be OK, even though it's deprecated.

http://en.wikipedia.org/wiki/C%2B%2B11#Null_pointer_constant [^]

note that I experimented with the new nullptr constant but it wasn't supported on my system, at least not with the default compiler options.

maybe I'm being too literal reading your comment about it being a 32bit issue, when you say that, do you mean that you're cross compiling with -m32 on a 64 bit system? I'm curious since on a 32 bit system int and void* should be the same size and not be an issue. Obviously not the case on a 64bit system, so I'm guessing that you're actually on a 64bit system doing a 64bit build? If that's not the case then it's an important clue. :-)
(0032119)
Orion Poplawski (reporter)
2014-01-02 17:33

It only occurred on the true 32-bit builds (which are done in 32-bit chroots). But the static_cast<> is used everywhere else in VTK so this seems like the thing to do.
(0032120)
Burlen (developer)
2014-01-02 17:52

OK obviously static cast has to be used in this case. I amended the commit message, should be good to go.
(0032172)
Burlen (developer)
2014-01-13 10:34

reporter patch was merged

 Issue History
Date Modified Username Field Change
2013-12-28 18:39 Orion Poplawski New Issue
2013-12-30 12:27 Dave DeMarle Assigned To => Dave DeMarle
2013-12-30 12:27 Dave DeMarle Status backlog => active development
2013-12-30 16:06 Burlen Note Added: 0032095
2013-12-30 22:29 Burlen Note Edited: 0032095
2013-12-31 00:00 Orion Poplawski Note Added: 0032098
2013-12-31 16:38 Orion Poplawski Note Added: 0032101
2014-01-01 10:32 Orion Poplawski File Added: paraview-cstddef.patch
2014-01-01 10:32 Orion Poplawski Note Added: 0032102
2014-01-02 13:40 Burlen Note Added: 0032110
2014-01-02 13:46 Orion Poplawski Note Added: 0032111
2014-01-02 17:06 Burlen Note Added: 0032117
2014-01-02 17:33 Orion Poplawski Note Added: 0032119
2014-01-02 17:52 Burlen Note Added: 0032120
2014-01-13 10:34 Burlen Note Added: 0032172
2014-01-13 10:34 Burlen Status active development => closed
2014-01-13 10:34 Burlen Resolution open => fixed
2014-01-13 10:34 Burlen Fixed in Version => 6.1.rc


Copyright © 2000 - 2018 MantisBT Team