<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Moritz Schaar !<br>
      <br>
      Better late than never to thank you for that kind email !<br>
      <br>
      Thanks for spotting all these errors. We will fix them in the next
      release which we are currently preparing.<br>
      I think that nobody never used ROOT with CASToR under Windows ...<br>
      <br>
      I personally use the mingw-w64 cross compiler to compile CASToR
      for Windows 64 bits from a linux distribution.<br>
      We thought about distributing these binaries for Windows users.<br>
      Finally, the datafile are now managed using file mapping so
      reconstructing huge files without much memory won't be a problem
      anymore.<br>
      <br>
      If I may ask, for what purpose are you using CASToR ? Whatever the
      reason, thanks for using it !<br>
      <br>
      Best<br>
      Simon<br>
      <br>
      <br>
      Le 02/02/2018 à 11:53, Moritz Schaar a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:9adf57a3f5d84ea89f60235505a9eaa5@mail2013.imt.uni-luebeck.de">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:76362331;
        mso-list-type:hybrid;
        mso-list-template-ids:-1605081800 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi CASToR users and developers,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I recently started working with CASToR and
          managed to compile it for Ubuntu and Windows. As I am forced
          to work with Windows, this was my primary targeted platform
          (Ubuntu VM just for cross-checks).<o:p></o:p></p>
        <p class="MsoNormal">However, I managed to build a 32bit release
          with Windows 7 64bit, Visual Studio 2017 (v15.5.5), CMake
          3.9.6 and pre-compiled ROOT binaries for Visual Studio 2013
          (“root_v5.34.36.win32.vc12.zip”).<o:p></o:p></p>
        <p class="MsoNormal">During this journey I discovered a couple
          of errors with CASToR’s (CMake) configuration files which I
          would to draw your attention to.<o:p></o:p></p>
        <p class="MsoNormal">This is probably not the right place to
          submit this, but I could not find any bug tracker or
          repository to issue cases.<o:p></o:p></p>
        <p class="MsoNormal">Due to my limited knowledge with CMake I
          just mention issues here instead of offering true solutions.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">My issues:<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">1)<span style="font:7.0pt
              "Times New Roman"">     
            </span></span><!--[endif]-->The default <span
            style="color:black">CMakeLists.txt of CASToR provides two
            forks, one for “win32” and one for unix-based system.</span><o:p></o:p></p>
        <p class="MsoListParagraph"><span style="color:black">Whereas
            the unix fork cares for flags as
            “CASToR_BUILD_GATE_UTILITIES” and checks if “CASToR_ROOT” is
            set (which is required to read ROOT files), the win32 fork
            does not check this.<o:p></o:p></span></p>
        <p class="MsoListParagraph"><span style="color:black">Hence, the
            build will fail due to missing ROOT libraries.<o:p></o:p></span></p>
        <p class="MsoListParagraph"><span style="color:black">My
            solution to this was to copy the parts from the unix part to
            the corresponding win32 section and it worked. Maybe this is
            not the way it is supposed to be, please check.</span><o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">2)<span style="font:7.0pt
              "Times New Roman"">     
            </span></span><!--[endif]-->ROOT for Windows can only be
          built in 32bit mode, as the 64bit version would require a lot
          of changes to ROOT and the underlying libraries (see
          <a
            href="https://root-forum.cern.ch/t/native-windows-64-bit-build/9102/27"
            moz-do-not-send="true">https://root-forum.cern.ch/t/native-windows-64-bit-build/9102/27</a>).<o:p></o:p></p>
        <p class="MsoListParagraph">Therefore, whenever a windows
          platform is detected, the compiler should be force to 32bit
          mode and the CASToR build as well (see variable
          “CASToR_64bits”).<o:p></o:p></p>
        <p class="MsoListParagraph">At least some prominent error should
          be displayed if this is easier to implement.<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">3)<span style="font:7.0pt
              "Times New Roman"">     
            </span></span><!--[endif]-->The “FindROOT.cmake” file you
          provide in “cmake-modules” only works for unix-systems.<o:p></o:p></p>
        <p class="MsoNormal"
          style="margin-left:18.0pt;text-indent:18.0pt">Here, the calls
          to ${ROOT_CONFIG_EXECUTABLE} in the “execute_process”
          instructions do not work for windows as the “root-config” file
          cannot be executed.<o:p></o:p></p>
        <p class="MsoNormal"
          style="margin-left:18.0pt;text-indent:18.0pt">I adjusted this
          section by borrowing parts from here:
          <a
href="https://git.fangmeier.tech/caleb/TTTT/src/master/cmake/FindROOT.cmake"
            moz-do-not-send="true">https://git.fangmeier.tech/caleb/TTTT/src/master/cmake/FindROOT.cmake</a><o:p></o:p></p>
        <p class="MsoNormal"
          style="margin-left:18.0pt;text-indent:18.0pt">Again, I do not
          know if this is the way to go but it works for me.<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">4)<span style="font:7.0pt
              "Times New Roman"">     
            </span></span><!--[endif]-->When using CASToR_ROOT and
          building in 32bit mode using Visual Studio 2017, this still
          fails due to some weird error namely:<o:p></o:p></p>
        <p class="MsoListParagraph">path_to_my_root_build\include\tvirtualx.h(183):
          error C2059: syntax error : 'constant'<o:p></o:p></p>
        <p class="MsoListParagraph">I nailed this down to a ROOT bug
          submitted several years ago:<o:p></o:p></p>
        <p class="MsoListParagraph"><a
            href="https://sft.its.cern.ch/jira/browse/ROOT-3158"
            moz-do-not-send="true">https://sft.its.cern.ch/jira/browse/ROOT-3158</a><o:p></o:p></p>
        <p class="MsoListParagraph">The solution is to add the line
          “#include "Windows4Root.h" right before “#include "TCanvas.h"
          in the file:<o:p></o:p></p>
        <p class="MsoListParagraph"><span style="color:black">castor_v1.2_0\source\include\management\gDataConversionUtilities.hh<o:p></o:p></span></p>
        <p class="MsoListParagraph"><span style="color:black">I do not
            know what consequences this has.<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">5)<span style="font:7.0pt
              "Times New Roman"">     
            </span></span><!--[endif]-->One small cosmetic issue (maybe
          it is a real issue but I did not have an problems with this):<o:p></o:p></p>
        <p class="MsoListParagraph">Probably both lines of
          “add_definitions( /DCASTOR_ROOT )” in the unix-fork of the
          CMakeLists.txt should be replaced with the hyphenated version
          (-DCASTOR_ROOT).<o:p></o:p></p>
        <p class="MsoListParagraph">At least this is the case for all
          other flags (-DCASTOR_MPI, -DCASTOR_VERBOSE et.c) in this
          section. Maybe the compiler will also handle the slash
          version.<o:p></o:p></p>
        <p class="MsoListParagraph"><o:p> </o:p></p>
        <p class="MsoNormal">Long story short, the build now works and
          the results of the executables look promising. Nevertheless,
          due to the 32bit memory restrictions, this CASToR build is
          suboptimal.<o:p></o:p></p>
        <p class="MsoNormal">I now plan on using a 32bit release to
          convert my GATE geometry data and the corresponding ROOT
          simulation files into CASToR data files.<o:p></o:p></p>
        <p class="MsoNormal">In addition, I’m going to build a 64bit
          release as well and develop my own stuff.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Bottom line: You guys did an amazing job
          and I really like what v1.2 offers. Keep up the good work!<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><b><span style="color:#145A6E">Yours
              sincerely,<o:p></o:p></span></b></p>
        <p class="MsoNormal"><b><span style="color:#145A6E">Moritz
              Schaar<o:p></o:p></span></b></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Castor-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Castor-users@lists.castor-project.org">Castor-users@lists.castor-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.castor-project.org/listinfo/castor-users">http://lists.castor-project.org/listinfo/castor-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>