Open main menu

Changes

m
added missing word
The [[Gr-smart meters Setup Guide]] describes how to build the gr-smart meters setup on Ubuntu. This page documents how to do so on other Linux distributions. Note that the patches applied (<code>pull_23</code> for <code>gr-pdu_utils</code> and <code>pull_9</code> for <code>gr-timing_utils</code>) apply pull requests that have not yet been accepted into the respective Sandia Labs repositories. If and when they are ever merged into the main line code, these patches will no longer be necessary. Also note that with these patches applied, it is no longer necessary to build or use the <code>gr-sandia_utils</code> code. For each distribution below, what is shown is a container file (for use with Docker or Podman) that shows how to build the relevant modules within a container based on the relevant distro. This is done to both make it absolutely clear which steps need to be done and which order, and also to provide a convenient way to test and these recipes to other Linux distributions. To run these commands on a real distribution (that is, not in a container), you can simply execute each "RUN" command exactly as it appears and then substitute `cd` commands for the "WORKDIR" lines (or use <code>pushd</code>/<code>popd</code> pairs as shown in the example below). You can ignore the "FROM" line. You will want to adjust the directories for your own computer. So for example, for Arch one could use the following commands: <syntaxhighlight lang="bash">mkdir FHSS_Utilscd FHSS_Utilspacman --noconfirm -Sy git make cmake gcc gnuradio boost doxygen graphviz pybind11git clone https://github.com/sandialabs/gr-pdu_utils.gitgit clone https://github.com/sandialabs/gr-timing_utils.gitgit clone https://github.com/sandialabs/gr-fhss_utils.gitfor fn in * ; do pushd $fn && git checkout maint-3.10 && popd ; donepushd gr-pdu_utilsgit fetch origin refs/pull/23/head:pull_23git checkout pull_23cmake -B build && cmake --build build -t installpopdpushd gr-timing_utilsgit fetch origin refs/pull/9/head:pull_9git checkout pull_9cmake -B build && cmake --build build -t installpopdpushd gr-fhss_utilsRUN cmake -B build && cmake --build build -t installpopd</syntaxhighlight> Note too, that you may need to use <code>sudo</code> to install. If that's the case, you can replace this:<syntaxhighlight lang="bash">cmake -B build && cmake --build build -t install</syntaxhighlight>with this:<syntaxhighlight lang="bash">cmake -B build cmake --build buildsudo cmake --build build -t install</syntaxhighlight> It's recommended to build an ordinary user and only use <code>sudo</code> for installing, as shown above. To speed up compiling on multicore machines, you can append <code>-j</code> to build commands as in <code>cmake --build build -j</code>. These notes generally apply to all of the distributions listed below.
== Arch ==
This is a container file (for use with Docker or Podman) that shows how to build the relevant modules under Arch Linux.
```<syntaxhighlight lang="docker">
FROM archlinux:base-20240101.0.204074
RUN mkdir -p /tmp/work
WORKDIR /tmp/work/gr-fhss_utils
RUN cmake -B build && cmake --build build -t install
``` To run these commands on a real distribution (that is, not in a container), you can simply execute each "RUN" command exactly as it appears and then substitute `cd` commands for the "WORKDIR" lines. You can ignore the "FROM" line. You will want to adjust the directories for your own computer.</syntaxhighlight>