[vtk-developers] Wrappers: incremental build rebuid everything

Francois Bertel francois.bertel at kitware.com
Mon Jul 5 14:00:13 EDT 2010


I think I found the issue: this is when VTK_USE_NVCONTROL is ON.

Linking CXX shared library ../bin/libvtkRendering.so
Hierarchy Wrapping - generating vtkRenderingHierarchy.txt
vtkWrapHierarchy: couldn't open file
vtk-build-tcl-no-para-no-qt-debug/Rendering/vtkRenderingHierarchy.txt
make[2]: *** [bin/libvtkRendering.so.5.7.0] Error 1
make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] Error 2

Under Ubuntu 10.04 x86_64, I did a clean build of VTK. The only
options I changed are:
BUILD_SHARED_LIBS ON
CMAKE_BUILD_TYPE Debug
VTK_DEBUG_LEAKS ON
VTK_WRAP_TCL ON
(by default VTK_USE_NVCONTROL is OFF)

The build was successful.

Then, I added
VTK_USE_NVCONTROL ON

I incrementally rebuild. The build was successful.

Then, I did make clean, make and I had the error I mentionned at the beginning:

Hierarchy Wrapping - generating vtkRenderingHierarchy.txt
vtkWrapHierarchy: couldn't open file
vtk-build-tcl-no-para-no-qt-debug/Rendering/vtkRenderingHierarchy.txt

VTK/Rendering/CMakeLists.txt has:

if(VTK_USE_NVCONTROL)
 # NVCONTROL depends on X11. We solve that by making KIT_LIBS depending on
 # vtkRendering, as vtkRendering depends on X11 on Unix.
 set(KIT_LIBS ${KIT_LIBS} ${NVCtrlLib_LIBRARY} vtkRendering)
 include_directories(${NVCtrlLib_INCLUDE_DIR})
endif(VTK_USE_NVCONTROL)

Any idea how to fix this?

On Mon, Jul 5, 2010 at 10:54 AM, Francois Bertel
<francois.bertel at kitware.com> wrote:
> Hello,
>
> You can see on the dashboard that arkadia now fails since July 3rd with:
>
> http://www.cdash.org/CDash/viewBuildError.php?buildid=655864
>
> Linking CXX shared library ../bin/libvtkRendering.so
> Hierarchy Wrapping - generating vtkRenderingHierarchy.txt
> vtkWrapHierarchy: couldn't open file
> /.../vtk-build-all-debug/Rendering/vtkRenderingHierarchy.txt
>
> make[2]: *** [bin/libvtkRendering.so.5.7.0] Error 1
>
> make[2]: Target `Rendering/CMakeFiles/vtkRendering.dir/build' not
> remade because of errors.
>
> I attached the CMakeLists.txt file if it can help.
>
>
> On Fri, Jul 2, 2010 at 2:02 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> On Fri, Jul 2, 2010 at 11:45 AM, David Cole <david.cole at kitware.com> wrote:
>>> Make sure that full paths are used in expressing custom command
>>> dependencies. Otherwise, you will see differences in rebuild behavior
>>> depending on what version of CMake you're using.
>>
>> I think I've done this throughout, but since there are rebuild
>> problems I'd better double-check.
>>
>> My difficulty with getting dependencies right is that each "hierarchy"
>> file actually depends on the hierarchy files of all kits that its kit
>> depends on.  Because CMake cannot handle file dependencies between
>> sibling directories, I make it depend on the kit libraries instead.
>> Then there is the rebuild-only-if-changed trick, and the fake target
>> trick, which are supposed to keep the everything from rebuilding like
>> Francois is seeing.
>>
>> If worse come to worst, I can temporarily turn off the hierarchy stuff
>> and cut the dependencies.  But I would like to continue poking at it
>> at least for today.
>>
>>   David
>>
>>> I'm pretty confident that using full paths everywhere to express OUTPUT and
>>> DEPENDS eliminates this problem. (Assuming there are no other mistakes in
>>> the code...)
>>> Sounds like things depending on vtkRendering are the bits that are
>>> re-building. Perhaps there's a conditional rule in an
>>> "if(VTK_USE_RENDERING)" block...?
>>>
>>>
>>> Just some thoughts,
>>> David
>>>
>>> On Fri, Jul 2, 2010 at 1:31 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>>
>>>> I'm using CMake 2.6.4 and don't see this issue.  But I can offer some
>>>> clues.  Here are how the dependencies are set up, with respect to the
>>>> new vtkWrapHierarchy tool.
>>>>
>>>> The hierarchy files like vtkFilteringHierarchy.txt are built by a
>>>> CMAKE_CUSTOM_COMMAND as a pre-build step for each kit library.  The
>>>> wrappers, of course, depend on this Hierarchy.txt file.
>>>>
>>>> My vtkWrapHierarchy.exe very specifically pre-reads the kit's
>>>> Hierarchy.txt file it and only re-writes it if the hierarchy has
>>>> changed.  This is done specifically to avoid the wrapper re-builds
>>>> like you are seeing.  For me, this works like a charm.
>>>>
>>>> I have another CMAKE_CUSTOM_COMMAND that builds a fake target for the
>>>> kit hierarchy file (see CMake/vtkWrapHierarchy.cmake).  It does the
>>>> following:
>>>>
>>>> OUTPUTS: vtkFilteringHierarchy.target vtkFilteringHierarchy.txt
>>>> DEPENDS: vtkFiltering
>>>> COMMAND: touch vtkFilteringHierarchy.target
>>>>
>>>> So the trick is: the wrappers require vtkFilteringHierarchy.txt, which
>>>> depends on vtkFiltering, but the timestamp for
>>>> vtkFilteringHierarchy.txt is only ever updated when the header files
>>>> are changed sufficiently to change the hierarchy.  Hence,
>>>> wrapper-rebuilds are only forced if the hierarchy changes.  For you it
>>>> seems to be short-circuiting and rebuilding the wrappers whenever the
>>>> kit library is rebuilt.
>>>>
>>>> This could reflect changes in the way that CMake handles dependencies,
>>>> or it could depend on the build tool that you use.  I always use make
>>>> and nmake, and I haven't tried a devenv build to see what devenv does.
>>>>
>>>>   David
>>>>
>>>> On Fri, Jul 2, 2010 at 11:15 AM, Francois Bertel
>>>> <francois.bertel at kitware.com> wrote:
>>>> > Hello,
>>>> >
>>>> > I'm facing a very annoying issue with VTK git master.
>>>> >
>>>> > Each time I type "make", without modifying any file in the source
>>>> > tree, the Tcl wrappers are regenerated and recompiled for Rendering,
>>>> > VolumeRendering, Hybrid, Parallel, Widgets, Infovis, Views,
>>>> > Charts/Geovis.
>>>> >
>>>> > Does anybody has a clue?
>>>> > Does anybody else have this issue?
>>>> >
>>>> > PS: I'm using cmake 2.8.2
>>>> >
>>>> > --
>>>> > François Bertel, PhD  | Kitware Inc. Suite 204
>>>> > 1 (518) 371 3971 x113 | 28 Corporate Drive
>>>> >                      | Clifton Park NY 12065, USA
>>>> > _______________________________________________
>>>> > Powered by www.kitware.com
>>>> >
>>>> > Visit other Kitware open-source projects at
>>>> > http://www.kitware.com/opensource/opensource.html
>>>> >
>>>> > Follow this link to subscribe/unsubscribe:
>>>> > http://www.vtk.org/mailman/listinfo/vtk-developers
>>>> >
>>>> >
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>>
>>>
>>>
>>
>
>
>
> --
> François Bertel, PhD  | Kitware Inc. Suite 204
> 1 (518) 371 3971 x113 | 28 Corporate Drive
>                      | Clifton Park NY 12065, USA
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtk-developers mailing list