[vtkusers] VTK 7.1.1 iOS build

Brooksby, Glen W (GE Global Research, US) brooksby at ge.com
Fri May 26 15:37:17 EDT 2017


After several more attempts to build VTK for IOS I've come to the conclusion that the build for IOS is simply broken for my OS and compiler version combination.

I've tried both GUI and command line CMake; both Unix makefiles and Ninja build files.  I've made sure I'm using the exact same commit of VTK (5f0d335) that shows as green on the dashboard, with the exact same options. Nothing helps.

Setup:
OS: MacOS v10.12.4 - Sierra
Xcode: v8.3.1 (8E1000a)
       The C compiler identification is AppleClang 8.1.0.8020041
       The CXX compiler identification is AppleClang 8.1.0.8020041

I'd be interested in hearing if anyone out there has had different luck.
In the meantime I can try upgrading to Xcode 8.3.2 to see if that helps.

I've included the tail end of my build outputs below in case it's helpful.

Glen

==== End of Ninja build ====
...
-- Looking for off_t
-- Looking for off_t - not found
-- Looking for size_t
-- Looking for size_t - not found
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/System/Library/Frameworks/OpenGLES.framework  
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    VTKCompileTools_DIR


-- Build files have been written to: /Users/200005229/vtkbin/CMakeExternals/Build/vtk-ios-simulator
ninja: build stopped: subcommand failed.


==== End of Unix makefiles build ====
...
-- Group Web modules: vtkWebCore;vtkWebPython;vtkWebGLExporter
-- Backend OpenGL2 modules: vtkDomainsChemistryOpenGL2;vtkImagingOpenGL2;vtkRenderingContextOpenGL2;vtkRenderingLICOpenGL2;vtkRenderingOculus;vtkRenderingOpenGL2;vtkRenderingOpenVR;vtkRenderingVolumeOpenGL2
-- Backend OpenGL modules: vtkRenderingContextOpenGL;vtkRenderingLIC;vtkRenderingOpenGL;vtkRenderingVolumeOpenGL
-- Enabled 0 modules:
CMake Warning at CMake/vtkModuleTop.cmake:311 (message):
  No modules enabled!
Call Stack (most recent call first):
  CMakeLists.txt:511 (include)


-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    VTKCompileTools_DIR
    VTK_USE_64BIT_IDS


-- Build files have been written to: /Users/200005229/vtkbin/CMakeExternals/Build/vtk-ios-device-armv7
[ 40%] Performing build step for 'vtk-ios-device-armv7'
Scanning dependencies of target VTKData
Built target VTKData
[ 42%] Performing install step for 'vtk-ios-device-armv7'
make[3]: *** No rule to make target `install'.  Stop.
make[2]: *** [CMakeExternals/Prefix/vtk-ios-device-armv7/src/vtk-ios-device-armv7-stamp/vtk-ios-device-armv7-install] Error 2
make[1]: *** [CMakeFiles/vtk-ios-device-armv7.dir/all] Error 2
make: *** [all] Error 2

________________________________________
From: Ken Martin [ken.martin at kitware.com]
Sent: Wednesday, May 24, 2017 12:22 PM
To: Brooksby, Glen W (GE Global Research, US)
Cc: vtkusers at vtk.org
Subject: EXT: Re: [vtkusers] VTK 7.1.1 iOS build

Nothing comes to mind - Ken

On Wed, May 24, 2017 at 12:10 PM, Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>> wrote:
So I’ve moved to building from the master branch.  I note that in CMake there is now no option for building with ES3 or ES2, so I’m presuming that is handled properly internally now. But now I’m getting the following failure:

[ 85%] Linking C static library ../../../lib/libvtkglew-8.1.a
[ 85%] Built target vtkglew
make[5]: *** No rule to make target `/Users/200005229/VTK-master/Rendering/OpenGL2/vtkEncodeString', needed by `Rendering/OpenGL2/vtkTextureObjectVS.cxx'.
make[5]: Target `Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/depend' not remade because of errors.
make[4]: *** [Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all] Error 2
Scanning dependencies of target vtkRenderingVolume
[ 85%] Building CXX object Rendering/Volume/CMakeFiles/vtkRenderingVolume.dir/vtkDirectionEncoder.cxx.o

Any thoughts?

Glen

From: Ken Martin [mailto:ken.martin at kitware.com<mailto:ken.martin at kitware.com>]
Sent: Wednesday, May 24, 2017 10:02 AM
To: Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>>
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: EXT: Re: [vtkusers] VTK 7.1.1 iOS build

The nightly iOS build is off VTK master and I know the examples have been tested fairly recently so that may be the way to go. I know folks are using it on an iOS based project so maybe give master a shot.

On Wed, May 24, 2017 at 9:58 AM, Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>> wrote:
Thanks again Ken.  I agree that ES2 should be removed because it is not only present, but it’s the default.
However, the 7.1.1 iOS build is still broken.

The problems are indicated in this stackoverflow<https://stackoverflow.com/questions/41001334/missing-opengl-extension-items-when-compiling-vtk-for-ios> post from December.  I see from the current master branch that the misnamed variable ‘multisample’ has been fixed by changing to ‘multisampling’. Simple enough.  However, there is still the issue of GL_MULTISAMPLE being undefined.

I can see it is defined in the following files:

ThirdParty/glew/vtkglew/include/GL/glew.h
Utilities/ParseOGLExt/headers/GL3/gl3.h
Utilities/ParseOGLExt/headers/glext.h

but with it in 3 locations I can’t tell how it is supposed to properly make its way into the Rendering/OpenGL2/*.

Is your working build from the master branch?  I’m wondering if I should abandon hope with 7.1.1 and go to 8.x.

Suggestions?

Glen

From: Ken Martin [mailto:ken.martin at kitware.com<mailto:ken.martin at kitware.com>]
Sent: Wednesday, May 24, 2017 8:06 AM
To: Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>>
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: EXT: Re: [vtkusers] VTK 7.1.1 iOS build

We no longer support ES2 (I should remove that option) so ES3 is definitely a good step.

On Tue, May 23, 2017 at 5:03 PM, Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>> wrote:
Thanks for the prompt reply Ken.  I’ll give it another go.  The only difference I see between your build and mine is OPENGL_ES_VERSION=3.0, and BUILD_EXAMPLES=ON, whereas I had ES=2.0 and examples off. I’ll make the change and see what happens.

Glen

From: Ken Martin [mailto:ken.martin at kitware.com<mailto:ken.martin at kitware.com>]
Sent: Tuesday, May 23, 2017 3:58 PM
To: Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>>
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: EXT: Re: [vtkusers] VTK 7.1.1 iOS build

The ios build of VTK starts at the top where it sets up subdirectories and then recursively calls cmake on VTK for those subdirectories with specific options. So the return at the top is correct. When the build process is building the subdirectories it will process that same file with different settings where it will get to those later if statements.

Also you can look at

https://open.cdash.org/viewNotes.php?buildid=4909344

which shows how the nightly dashboard is setup for iOS.


Hope that helps!
Ken

On Tue, May 23, 2017 at 3:38 PM, Brooksby, Glen W (GE Global Research, US) <brooksby at ge.com<mailto:brooksby at ge.com>> wrote:
I’m attempting to build VTK (v7.1.1) for iOS and I’ve run into problems.  In looking at the top level CMakeLists.txt file I see a stanza that says:

option(VTK_IOS_BUILD "Build vtk.framework for iOS" OFF)
if (VTK_IOS_BUILD)
  include(vtkiOS)
  return()
endif()

The only instructions I see for building VTK for iOS are here<https://blog.kitware.com/building-vtk-for-mobile-architectures/>. These instructions say to set VTK_IOS_BUILD=ON and a few other variables.
However, if VTK_IOS_BUILD=ON, the stanza above causes CMake to “return”, or quit processing the top-level CMakeLists.txt file.  Yet further down in the same CMakeLists.txt file I see:

if (ANDROID OR APPLE_IOS) …

and

if (APPLE_IOS)…

These two conditionals seem to be targeting iOS, but will never be reached if VTK_IOS_BUILD=ON.  I see nowhere where APPLE_IOS is set, nor instructions to set it.

For my case I changed the first stanza to:

option(VTK_IOS_BUILD "Build vtk.framework for iOS" OFF)
if (VTK_IOS_BUILD)
include(vtkiOS)
SET (APPLE_IOS 1)
  #return()
endif()

Configure, generate, and the build seems to get much further, but the build still breaks when building for the simulator (in vtkGL2PSExporter.cxx because it’s not finding vtk_gl2ps.h).

A framework is produced, but it appears to be incomplete.  Specifically, vtkInteractorStyleMultiTouchCamera.h is not included, which may be caused by APPLE_IOS being set.  Because of this the iOS example GLPaint cannot be built.

Is there anyone who is having success building VTK 7.1.1 for iOS who can shed some light on this or provide more thorough instructions? Would a different version have more success?  A VTK Framework does appear to have been produced.

For reference I’m building VTK 7.1.1, using CMake version 3.8.0.  I’m building on a Macbook air running MacOS 10.12.4 (Sierra), with Xcode 8.3.1.

Thanks,

Glen Brooksby


_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.


More information about the vtkusers mailing list