Sorry, the line numbers of the last two links in the last email were off
by one.
Regarding my proposal to move these requires source files to header
files and installing them:
Am I right in thinking that most registries are essentially header files?
e.g.,
https://github.com/UCL/STIR/blob/master/src/IO/IO_registries.cxx
Likely I am missing some insight here.
Ash
--
Ashley Gillman, BEng (Hons), BIT
PhD Candidate
Australian e-Health Research Centre, CSIRO
School of Medicine, University of Queensland
E [log in to unmask] M +61 404 085 204
Level 5 UQ Health Science Building 901/16
Royal Brisbane and Women's Hospital
Herston, QLD 4029
Australia
www.csiro.au | http://www.aehrc.com/biomedical_imaging/
PLEASE NOTE
The information contained in this email may be confidential or
privileged. Any unauthorised use or disclosure is prohibited. If you
have received this email in error, please delete it immediately and
notify the sender by return email. Thank you. To the extent permitted
by law, CSIRO does not represent, warrant and/or guarantee that the
integrity of this communication has been maintained or that the
communication is free of errors, virus, interception or interference.
On 03/07/18 08:56, Gillman, Ashley (H&B, Herston - RBWH) wrote:
> I am hesitant to send this because of the Nix stuff - I hope not to
> confuse you. Feel free to ignore.
>
> This is how I solved in Nix:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/stir/default.nix
>
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/sirf/default.nix
>
>
> NB: Ignore the mess here:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/stir/default.nix#L23-L40
>
> That's pulled from the standard Nix installer to find the downloaded
> source from GitHub.
>
> The language is a little confusing, but essentially just calls `cmake
> $cmakeFlags` then `make` then `make install`. There are some default
> flags for CMake and Make, then everything in the .nix file augments on
> top of this.
> You can see which cmake flags I add here:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/stir/default.nix#L48-L57
>
>
> The main change was the three lines here:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/stir/default.nix#L42-L46
>
> I copy the STIR source to the install location, and install from there.
> I later delete temporary build files here:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/stir/default.nix#L64
>
> I had to do this because as Kris mentioned, the registries are needed at
> runtime, so I had to install these - since Nix, like Conda (presumably?
> I haven't used it) removes the temporary files including source.
> Otherwise, I ended up with STIRConfig.cmake setting the source directory
> to a no longer existing temp dir. Perhaps an appropriate location to
> install to would be /usr/share/stir/src
>
> NB: You may also have to install the scripts to the output /bin or
> /usr/bin like here:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/stir/default.nix#L59-L61
>
>
> Finally, as Kris suggests, you can just point to the location of
> STIRConfig.cmake:
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/sirf/default.nix#L32
>
> And the rest should go as planned.
>
> I also had to manually move the $CMAKE_INSTALL_DIR/python to
> $CMAKE_INSTALL_DIR/lib/python3.x/site-packages
> https://github.com/ashgillman/SIRF-NixBuild/blob/master/pkgs/sirf/default.nix#L35-L41
>
>
> Hope this is helpful, Not sure how much translates to Conda package manager
> Ash
>
>
########################################################################
To unsubscribe from the CCP-PETMR-DEVEL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=CCP-PETMR-DEVEL&A=1
|