[ITK] [ITK-users] ITK emscripten compilation

Juan Carlos Prieto juanprietob at gmail.com
Wed Oct 28 15:26:57 EDT 2015


Hi Matt,

> Are you using the Docker image?

Yes, I tried with the Docker image and also I tried building it in my
system with the same results.

> What version of Emscripten are you using?

In my system I'm using emscripten tag-1.35.4

> What is CMAKE_SYSTEM?

In the docker image CMAKE_SYSTEM = Emscripten-1
In my system CMAKE_SYSTEM = Darwin-14.5.0


I also noticed the code block in the file
https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c#L136-L148

If H5_HAVE_FSEEKO64 is  undefined, the compilation is successful.


I'll try with the example and see if I am able to read the images.

Best,

Juan



On Wed, Oct 28, 2015 at 2:53 PM, Matt McCormick <matt.mccormick at kitware.com>
wrote:

> Hi Juan,
>
> > I have build ITK as described in post 912
> > http://www.kitware.com/blog/home/post/912
> >
> > However, I did not use ninja and I added the flag
> -D_LARGEFILE64_SOURCE=1,
> > i.e.,
> >
> > flags=' -Wno-warn-absolute-paths --memory-init-file 0 -s
> > DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1
> > -D_LARGEFILE64_SOURCE=1'
> >
> > cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \
> >   "-DCMAKE_CXX_FLAGS=$flags" "-DCMAKE_C_FLAGS=$flags" \
> >   -DBUILD_EXAMPLES=OFF \
> >
> >     ../ITK
> >
> >
> > make
> >
> >
> > This flag is needed to avoid the error while compiling itkhdf5:
> >
> >
> > /usr/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c:192:5:
> > error: use of undeclared identifier 'off64_t'
> >
> >
> > After I added the flag, the compilation is successful.
>
> This is interesting.  Are you using the Docker image? What version of
> Emscripten are you using? This is supposed to avoided with this code
> block:
>
>
> https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake#L294-L304
>
> What is CMAKE_SYSTEM?
>
>
>
> > Now, I'm trying to build a project using ITK.
> >
> >
> > The cmake configuration process is similar to ITK, and the compilation is
> > also successful. The javascript file is generated as expected.
>
> Cool.
>
>
> > However, the execution produces the following error while on the docker
> > machine:
> >
> >
> > Could not create IO object for reading file someImage.nrrd
> > The file doesn't exist.
> > Filename = someImage.nrrd
> >
> >
> > The image file is in the same built directory (not a problem of
> read-write
> > permissions).
>
> You'll need to mount directories from the local filesystem that you
> want the Javascript code to see with NODEFS [1].  See how we do it for
> the ITK test driver [2].
>
> HTH,
> Matt
>
>
> [1]
> https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#file-systems
>
> [2]
> http://itk.org/gitweb?p=ITK.git;a=commit;h=0c82b97b749cea9f409aba99c918b94295ed24c7
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20151028/1de4eeed/attachment-0001.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

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

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list