[Ves] Building VES for Android on Cygwin 1.7.x
Pat Marion
pat.marion at kitware.com
Thu Feb 23 13:03:21 EST 2012
I have not tried a mixed platform approach like that, but it seems to me
that it should work. The result of your linux build will be static vtk
libraries, vtk*.a, and static ves libraries libves.a and libkiwi.a, and
headers for kiwi, ves, and vtk. You may not need to include any vtk
headers in your app at all, you probably only need to work with headers
from src/ves and src/kiwi.
Take a look at Apps/Android/KiwiViewer/jni. You'll see there is a single
cpp file. That file is compiled and linked against ves & vtk to generate
the android jni library which will be part of your android APK. We use
cmake to compile this single cpp file, but you could instead write a very
simple Android.mk makefile and do that compiling on your Windows
environment.
Pat
On Thu, Feb 23, 2012 at 10:38 AM, Sishir Jain <sishirjain at gmail.com> wrote:
> Hi,
> Thanks for the prompt reply. We indeed are getting into more problems
> using cygwin.
>
> We are now going to follow these steps:
> 1. Build VES (and the dependencies) on Linux (Ubuntu 10.04). This should
> also generate an Eclips project.
> 2. Use the generated Eclips project in windows environment to develop our
> own android application on top of VES (kiwiviewer).
>
> Do you see any problems with these ?
>
> Regards,
> Sishir
> On Thu, Feb 23, 2012 at 8:35 PM, Pat Marion <pat.marion at kitware.com>wrote:
>
>> Hi Sishir,
>>
>> Your build is failing while compiling vtkmodular for cygwin host.
>> vtkmodular is the same as VTK proper, except it contains a major
>> refactoring of the build system. I suspect that the vtkmodular build
>> system does not yet support a cygwin environment. After correcting the
>> current problem, you may face additional hurdles.
>>
>> For me, not knowing anything about cygwin, the first thing I would try is
>> what the cmake output suggests, set CMAKE_LEGACY_CYGWIN_WIN32=1 But maybe
>> that will not help. I have to warn you that cygwin is an unsupported build
>> environment for VES. Is it possible to use Linux (perhaps with Virtualbox
>> on Windows) instead?
>>
>> Pat
>>
>>
>> Thu, Feb 23, 2012 at 1:14 AM, Sishir Jain <sishirjain at gmail.com> wrote:
>>
>>> Hi,
>>> I am trying to build VES for Android on Cygwin 1.7.x. The build is
>>> failing at vtkUnicodestring.cxx.
>>>
>>> Here is the snapshot:
>>> =======================================================================
>>> $ make -j4
>>>
>>> [ 0%] [ 24%] Performing update step (git fetch) for 'vtkmodular-host'
>>>
>>> Built target eigen
>>>
>>> HEAD is now at 135ce1c... Move vtkDelimitedTextReader and
>>> vtkStringToNumeric to IO/Core
>>>
>>> [ 24%] Performing configure step for 'vtkmodular-host'
>>>
>>> CMake Warning at /usr/share/cmake-2.8.4/Modules/Platform/CYGWIN.cmake:15
>>> (message):
>>>
>>> CMake no longer defines WIN32 on Cygwin!
>>>
>>> (1) If you are just trying to build this project, ignore this warning or
>>>
>>> quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
>>>
>>> the CMake cache. If later configuration or build errors occur then this
>>>
>>> project may have been written under the assumption that Cygwin is WIN32.
>>>
>>> In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.
>>>
>>> (2) If you are developing this project, add the line
>>>
>>> set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
>>>
>>> at the top of your top-level CMakeLists.txt file or set the minimum
>>>
>>> required version of CMake to 2.8.4 or higher. Then teach your project to
>>>
>>> build on Cygwin without WIN32.
>>>
>>> Call Stack (most recent call first):
>>>
>>> /usr/share/cmake-2.8.4/Modules/CMakeSystemSpecificInformation.cmake:36
>>> (INCLUDE)
>>>
>>> CMakeLists.txt:3 (project)
>>>
>>> About to assess all possible modules...
>>>
>>> -- Enabled:
>>> vtkCommonComputationalGeometry;vtkCommonCore;vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkFiltersCore;vtkFiltersGeneral;vtkFiltersGeometry;vtkFiltersSources;vtkIOCore;vtkIOGeometry;vtkIOImage;vtkIOPLY;vtkIOXML;vtkImagingCore
>>>
>>> -- Disabled:
>>> vtkFiltersExtraction;vtkFiltersParallelStatistics;vtkFiltersStatistics;vtkIOInfovis;vtkIOMySQL;vtkIONetCDF;vtkIOODBC;vtkIOPostgreSQL;vtkIOSQL;vtkInfovisCore;vtkParallelCore;vtkRenderingCore;vtkRenderingOpenGL;vtkWrappingPythonCore
>>>
>>> -- Enabled kwsys, needed by
>>> [vtkCommonCore;vtkCommonDataModel;vtkCommonSystem;vtkIOGeometry;vtkIOCore;vtkIOImage;vtkIOXML].
>>>
>>> -- Enabled vtkCommonCore, needed by
>>> [vtkFiltersCore;vtkCommonDataModel;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkFiltersGeometry;vtkCommonComputationalGeometry;vtkFiltersSources;vtkFiltersGeneral;vtkImagingCore;vtkIOGeometry;vtkIOImage;vtkIOPLY;vtkIOXML].
>>>
>>> -- Enabled vtkCommonMath, needed by
>>> [vtkCommonDataModel;vtkCommonMisc;vtkCommonTransforms;vtkFiltersCore;vtkCommonComputationalGeometry;vtkFiltersSources;vtkFiltersGeneral;vtkImagingCore;vtkIOImage].
>>>
>>> -- Enabled vtkCommonMisc, needed by
>>> [vtkCommonDataModel;vtkFiltersCore;vtkFiltersGeneral;vtkIOGeometry;vtkIOCore;vtkIOImage;vtkIOPLY;vtkIOXML].
>>>
>>> -- Enabled vtkCommonSystem, needed by
>>> [vtkCommonDataModel;vtkFiltersCore;vtkCommonComputationalGeometry;vtkFiltersGeneral;vtkImagingCore;vtkIOGeometry;vtkIOImage;vtkIOXML].
>>>
>>> -- Enabled vtkCommonTransforms, needed by
>>> [vtkCommonDataModel;vtkFiltersCore;vtkFiltersSources;vtkFiltersGeneral;vtkImagingCore;vtkIOImage].
>>>
>>> -- Enabled vtkCommonDataModel, needed by
>>> [vtkFiltersCore;vtkFiltersGeometry;vtkCommonComputationalGeometry;vtkFiltersSources;vtkFiltersGeneral;vtkImagingCore;vtkIOGeometry;vtkIOCore;vtkIOImage;vtkIOPLY;vtkIOXML].
>>>
>>> -- Enabled vtkCommonComputationalGeometry, needed by
>>> [vtkFiltersSources;vtkFiltersGeneral;vtkImagingCore].
>>>
>>> -- Enabled vtkFiltersCore, requested by Module_vtkFiltersCore.
>>>
>>> -- Enabled vtkFiltersGeneral, needed by [vtkFiltersSources].
>>>
>>> -- Enabled vtkFiltersGeometry, requested by Module_vtkFiltersGeometry.
>>>
>>> -- Enabled vtkFiltersSources, requested by Module_vtkFiltersSources.
>>>
>>> -- Enabled vtkzlib, needed by [vtkIOCore;vtkIOGeometry;vtkIOImage].
>>>
>>> -- Enabled vtkIOCore, needed by
>>> [vtkIOGeometry;vtkIOImage;vtkIOPLY;vtkIOXML].
>>>
>>> -- Enabled MaterialLibrary, needed by [vtkIOGeometry;vtkIOGeometry].
>>>
>>> -- Enabled vtkIOGeometry, requested by Module_vtkIOGeometry.
>>>
>>> -- Enabled DICOMParser, needed by [vtkIOImage].
>>>
>>> -- Enabled vtkfreetype, needed by [vtkIOImage].
>>>
>>> -- Enabled vtkjpeg, needed by [vtkIOImage].
>>>
>>> -- Enabled vtkmetaio, needed by [vtkIOImage].
>>>
>>> -- Enabled vtkoggtheora, needed by [vtkIOImage].
>>>
>>> -- Enabled vtkpng, needed by [vtkIOImage].
>>>
>>> -- Enabled vtktiff, needed by [vtkIOImage].
>>>
>>> -- Enabled vtkIOImage, requested by Module_vtkIOImage.
>>>
>>> -- Enabled vtkIOPLY, requested by Module_vtkIOPLY.
>>>
>>> -- Enabled vtkexpat, needed by [vtkIOXML].
>>>
>>> -- Enabled vtkIOXML, requested by Module_vtkIOXML.
>>>
>>> -- Enabled vtkImagingCore, requested by Module_vtkImagingCore.
>>>
>>> -- Configuring done
>>>
>>> -- Generating done
>>>
>>> -- Build files have been written to:
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Build/vtkmodular-host
>>>
>>> [ 24%] Performing build step for 'vtkmodular-host'
>>>
>>> [ 0%] [ 1%] [ 2%] Built target vtkMaterialLibraryConfiguredFiles
>>>
>>> Built target vtkzlib
>>>
>>> Built target vtksys
>>>
>>> [ 2%] Built target vtkDICOMParser
>>>
>>> [ 4%] [ 8%] Built target vtkfreetype
>>>
>>> [ 11%] Built target vtkjpeg
>>>
>>> [ 14%] Built target vtkmetaio
>>>
>>> Built target vtkoggtheora
>>>
>>> [ 14%] Built target vtkmkg3states
>>>
>>> [ 14%] Built target vtkexpat
>>>
>>> [ 14%] [ 14%] [ 14%] [ 15%] Building CXX object
>>> Common/Core/CMakeFiles/vtkCommonCore.dir/vtkUnicodeString.cxx.o
>>>
>>> Built target ProcessShader
>>>
>>> Building CXX object
>>> Common/Core/CMakeFiles/vtkCommonCore.dir/vtkUnsignedShortArray.cxx.o
>>>
>>> Built target vtkpng
>>>
>>> [ 15%]
>>> Building CXX object
>>> Common/Core/CMakeFiles/vtkCommonCore.dir/vtkVariantArray.cxx.o
>>>
>>> [ 19%] Built target vtktiff
>>>
>>> [ 20%]
>>> Building CXX object
>>> Common/Core/CMakeFiles/vtkCommonCore.dir/vtkVariant.cxx.o
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:
>>> In member function ‘vtkUnicodeString vtkUnicodeString::fold_case() const’:
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:382:5:
>>> error: expected primary-expression before ‘for’
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:382:5:
>>> error: expected ‘}’ before ‘for’
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:382:5:
>>> error: expected ‘,’ or ‘;’ before ‘for’
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:382:54:
>>> error: ‘i’ was not declared in this scope
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:382:60:
>>> error: expected ‘;’ before ‘)’ token
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:465:1:
>>> error: expected ‘}’ at end of input
>>>
>>> /cygdrive/d/vessource/Apps/Android/CMakeBuild/build/CMakeExternals/Source/vtkmodular/Common/Core/vtkUnicodeString.cxx:465:1:
>>> error: expected ‘}’ at end of input
>>>
>>> Common/Core/CMakeFiles/vtkCommonCore.dir/build.make:2309: recipe for
>>> target `Common/Core/CMakeFiles/vtkCommonCore.dir/vtkUnicodeString.cxx.o'
>>> failed
>>>
>>> make[5]: ***
>>> [Common/Core/CMakeFiles/vtkCommonCore.dir/vtkUnicodeString.cxx.o] Error 1
>>>
>>> make[5]: *** Waiting for unfinished jobs....
>>>
>>> CMakeFiles/Makefile2:993: recipe for target
>>> `Common/Core/CMakeFiles/vtkCommonCore.dir/all' failed
>>>
>>> make[4]: *** [Common/Core/CMakeFiles/vtkCommonCore.dir/all] Error 2
>>>
>>> Makefile:113: recipe for target `all' failed
>>>
>>> make[3]: *** [all] Error 2
>>>
>>> CMakeFiles/vtkmodular-host.dir/build.make:105: recipe for target
>>> `CMakeExternals/Stamp/vtkmodular-host/vtkmodular-host-build' failed
>>>
>>> make[2]: ***
>>> [CMakeExternals/Stamp/vtkmodular-host/vtkmodular-host-build] Error 2
>>>
>>> CMakeFiles/Makefile2:166: recipe for target
>>> `CMakeFiles/vtkmodular-host.dir/all' failed
>>>
>>> make[1]: *** [CMakeFiles/vtkmodular-host.dir/all] Error 2
>>>
>>> Makefile:72: recipe for target `all' failed
>>>
>>> make: *** [all] Error 2
>>>
>>> ========================================================
>>>
>>> Any help would be greatly appreciated.
>>>
>>> Regards,
>>>
>>> Sishir
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Ves mailing list
>>> Ves at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20120223/b0c64286/attachment-0001.html>
More information about the Ves
mailing list