<div dir="ltr"><div><span style="font-size:12.8px">Hi Matt, </span></div><div><span style="font-size:12.8px"><br></span></div><span style="font-size:12.8px">> Are you using the Docker image?</span><br><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Yes, I tried with the Docker image and also I tried building it in my system with the same results. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">What version of </span><span style="font-size:12.8px">Emscripten are you using?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">In my system I'm using emscripten </span>tag-1.35.4</div><div><br></div><div>> <span style="font-size:12.8px">What is CMAKE_SYSTEM?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">In the docker image CMAKE_SYSTEM = </span>Emscripten-1</div><div>In my system <span style="font-size:12.8px">CMAKE_SYSTEM = </span>Darwin-14.5.0</div>
<div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I also noticed the code block in the file </span></div><div><a href="https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c#L136-L148">https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c#L136-L148</a></div><div><br></div><div>If <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.8px;white-space:pre;background-color:rgb(248,238,199)">H5_HAVE_FSEEKO64 </span>is undefined, the compilation is successful. </div><div><br></div><div><br></div><div>I'll try with the example and see if I am able to read the images.</div><div><br></div><div>Best,</div><div><br></div><div>Juan</div>
<div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 28, 2015 at 2:53 PM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Juan,<br>
<span class=""><br>
> I have build ITK as described in post 912<br>
> <a href="http://www.kitware.com/blog/home/post/912" rel="noreferrer" target="_blank">http://www.kitware.com/blog/home/post/912</a><br>
><br>
> However, I did not use ninja and I added the flag -D_LARGEFILE64_SOURCE=1,<br>
> i.e.,<br>
><br>
> flags=' -Wno-warn-absolute-paths --memory-init-file 0 -s<br>
> DISABLE_EXCEPTION_CATCHING=0 -s ALLOW_MEMORY_GROWTH=1<br>
> -D_LARGEFILE64_SOURCE=1'<br>
><br>
> cmake -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \<br>
> "-DCMAKE_CXX_FLAGS=$flags" "-DCMAKE_C_FLAGS=$flags" \<br>
> -DBUILD_EXAMPLES=OFF \<br>
><br>
> ../ITK<br>
><br>
><br>
> make<br>
><br>
><br>
> This flag is needed to avoid the error while compiling itkhdf5:<br>
><br>
><br>
> /usr/src/ITK/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5FDstdio.c:192:5:<br>
> error: use of undeclared identifier 'off64_t'<br>
><br>
><br>
> After I added the flag, the compilation is successful.<br>
<br>
</span>This is interesting. Are you using the Docker image? What version of<br>
Emscripten are you using? This is supposed to avoided with this code<br>
block:<br>
<br>
<a href="https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake#L294-L304" rel="noreferrer" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/2f2ae65eec72701b0fc69c07b59453cc6ac2e575/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake#L294-L304</a><br>
<br>
What is CMAKE_SYSTEM?<br>
<span class=""><br>
<br>
<br>
> Now, I'm trying to build a project using ITK.<br>
><br>
><br>
> The cmake configuration process is similar to ITK, and the compilation is<br>
> also successful. The javascript file is generated as expected.<br>
<br>
</span>Cool.<br>
<span class=""><br>
<br>
> However, the execution produces the following error while on the docker<br>
> machine:<br>
><br>
><br>
> Could not create IO object for reading file someImage.nrrd<br>
> The file doesn't exist.<br>
> Filename = someImage.nrrd<br>
><br>
><br>
> The image file is in the same built directory (not a problem of read-write<br>
> permissions).<br>
<br>
</span>You'll need to mount directories from the local filesystem that you<br>
want the Javascript code to see with NODEFS [1]. See how we do it for<br>
the ITK test driver [2].<br>
<br>
HTH,<br>
Matt<br>
<br>
<br>
[1] <a href="https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#file-systems" rel="noreferrer" target="_blank">https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#file-systems</a><br>
<br>
[2] <a href="http://itk.org/gitweb?p=ITK.git;a=commit;h=0c82b97b749cea9f409aba99c918b94295ed24c7" rel="noreferrer" target="_blank">http://itk.org/gitweb?p=ITK.git;a=commit;h=0c82b97b749cea9f409aba99c918b94295ed24c7</a><br>
</blockquote></div><br></div>