<div dir="ltr">Thanks for this. It compiles and the assert is gone. <div><br></div><div>To be clear, here's what I did:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>git clone <a href="https://github.com/Kitware/maptk.git">https://github.com/Kitware/maptk.git</a></div><div><div>cd .\maptk</div></div><div><div>git fetch origin pull/88/head:dev/camera-pass-by-reference</div></div><div><div>git checkout dev/camera-pass-by-reference</div></div><div><div>cmake -G "NMake Makefiles" -DBOOST_ROOT=C:\dev\fletch\install -DEIGEN3_INCLUDE_DIR="C:\Program Files (x86)\Eigen\include\eigen3"</div></div><div><div>nmake</div></div><div><div>nmake install</div></div><div><br></div></blockquote><div><div>Is there a simple workflow you can pass that will demonstrate use of some of the utilities. For example, suppose I have a collection of overlapping images, what can I do with them?</div></div><div><br></div><div>msr</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 10:36 AM, Matthew Leotta <span dir="ltr"><<a href="mailto:matt.leotta@kitware.com" target="_blank">matt.leotta@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Michael,<div><br></div><div>Thank you for reporting this issue. I’ll be upfront and warn you that I’m not a Windows developer and MAP-Tk is currently better tested on Linux and Mac. That said, we are working toward getting things better running on Windows more reliably.</div><div><br></div><div>In this case, the issues are related to Eigen byte-alignment issues as explained on the Eigen website linked from your error message:</div><div><br></div><div><a href="http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" target="_blank">http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html</a></div><div><br></div><div>I have read this page before, and expected I would need to make changes at some point to work around these issues, but until now I had not come across a compiler that exhibited these symptoms. We should probably try to get a VisualStudio 2012 build up on our dashboard so I can work through those issues properly. I expect that will take some time. A shorter term solution is to try to disable alignment in your build. Can you try the solutions described at the bottom of the page at the above URL? In the "I don't care about vectorization, how do I get rid of that stuff?” section it suggests defining some macros to disable alignment. Let me know if that works.</div><div><br></div><div>In the meantime, I can at least work around that pass-by-value build issue. That function is pass-by-value because we intentionally want to make a local copy of the camera object to modify. However, I can explicitly make that copy inside the function instead. I’ve done this on the release branch of MAP-Tk and made a pull request (<a href="https://github.com/Kitware/maptk/pull/88" target="_blank">https://github.com/Kitware/maptk/pull/88</a>). Can you try to build this branch and verify that it at least builds for you?</div><div><br></div><div>git fetch origin pull/88/head:dev/camera-pass-by-reference</div><div>git checkout dev/camera-pass-by-reference</div><div><br></div><div>If that works, I’ll merge this change into the release and master branches. Also let me know if the solution on the Eigen page helps.</div><div><br></div><div>—Matt</div><div><br></div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Oct 5, 2015, at 1:24 PM, Michael Rosen <<a href="mailto:michael.rosen@gmail.com" target="_blank">michael.rosen@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><div>Hello Kwiver-folk,</div><div><br></div>I'm building MapTK on Windows 7/64 using VStudio 12 and having two immediate difficulties: a compilation problem and a runtime assert.<div><br></div><div>MapTK is version 0.6.0, Eigen is 3.2.6<br><div><br></div><div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">I've worked through getting Boost and Eigen built. When I compile maptk, the first problem is this:</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> [ 98%] Building CXX object tools/CMakeFiles/maptk_pos2krtd.dir/pos2krtd.cxx.obj</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> pos2krtd.cxx</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> C:\dev\maptk\tools\pos2krtd.cxx(220) : error C2719: 'base_camera': formal parameter with __declspec(align('16')) won't</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> be aligned</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> C:\dev\maptk\tools\pos2krtd.cxx(238) : error C2719: 'base_camera': formal parameter with __declspec(align('16')) won't</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> …</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">I fixed these compilation errors by changing the signature of the offending function from pass-by-value to pass-by-reference:</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> /// Convert a POS file to a KRTD file</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> bool convert_pos2krtd(const maptk::path_t& pos_filename,</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> const maptk::path_t& krtd_filename,</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> maptk::local_geo_cs& cs,</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> maptk::camera_d& base_camera, // msr. was pass-by-value</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> maptk::rotation_d const& ins_rot_offset = maptk::rotation_d())</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">That allows everything to compile and link. The next problem was that I got an Eigen Assert when I run any of the executables:</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">C:\Program Files (x86)\MAPTK\bin>maptk_analyze_tracks.exe</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">...</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">Assertion failed: (reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " "<a href="http://eigen.tuxfamily.org/d" target="_blank"><span style="color:purple">http://eigen.tuxfamily.org/d</span></a></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">ox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****", file c:\program files (x86)\eigen\include\eigen</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">3\eigen\src/Core/DenseStorage.h, line 86</span></p><div><span style="font-size:11pt;font-family:Calibri,sans-serif"> </span><br></div><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif">The web page says that classes which contain certain Eigen data structures as members need to use the</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"> EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro to override the "new" operator so that those members will be 16-byte aligned. I've done that but am still seeing the assert.</span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:Calibri,sans-serif"><br></span></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">Can anyone offer insight into any of this?</span></font></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px">msr</span></font></p><p class="MsoNormal"><font face="Calibri, sans-serif"><span style="font-size:14.6667px"><br></span></font></p></div></div></div></div></div>
_______________________________________________<br>Kwiver-users mailing list<br><a href="mailto:Kwiver-users@public.kitware.com" target="_blank">Kwiver-users@public.kitware.com</a><br><a href="http://public.kitware.com/mailman/listinfo/kwiver-users" target="_blank">http://public.kitware.com/mailman/listinfo/kwiver-users</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div>