# Configuration/compiler does not persist after system reboot

**URL:** <https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055>\
**Category:** Users\
**Created:** [December 11, 2022, 2:53am UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055 "2022-12-11T02:53:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlzambr2](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/vlzambr2/32/362_2.png) [@vlzambr2](https://chapel.discourse.group/u/vlzambr2)\
**Post date:** [December 11, 2022, 2:53am UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055/1 "2022-12-11T02:53:52Z")

</div>

Hello! I am very new to Chapel and was hoping to get some context / solutions on a behavior I am observing with the Chapel compiler on Linux, specifically on some Raspberry Pis.

Every time I log in to my Pi after rebooting, the Chapel environment variables are reset to their defaults, the $CHPL\_HOME variable is not set, and I have to re enter my desired configuration details and perform `./configure` and `make install` again to be able to use the Chapel compiler.

I'm sure I'm missing something obvious in the build process to ensure that my compiler builds persist past the session they're built in.

Also, as a side question, is there an argument I can supply to the `chpl` command to specify the output directory of the generated executable? I looked at the command [manpage](https://chapel-lang.org/docs/main/usingchapel/man.html?) but I didn't see something like that.  
I want to be able to do this so that executables are automatically made present in my cluster's shared filesystem.

---

<div class="post-metadata">

**Author:** ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)\
**Post date:** [December 11, 2022, 3:34am UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055/2 "2022-12-11T03:34:55Z")

</div>

In the compiler installation still there on reboot?

If that exists in some location called say

```Chapel
/pub/lang/chapel/chapel-1.25.1

```

you need to include

```Chapel
source /pub/lang/chapel/chapel-1.25.1/util/setchplenv.bash

```

in your login profile.

As for the question about a compiler option to specify a directory in which e the executable is placed by the compiler, I believe the answer is no. Just copy it over yourself once it is built.

---

<div class="post-metadata">

**Author:** ![cassella](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/cassella/32/53_2.png) [@cassella](https://chapel.discourse.group/u/cassella)\
**Post date:** [December 11, 2022, 4:55am UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055/3 "2022-12-11T04:55:29Z")

</div>

> [@vlzambr2](#):
>
> Also, as a side question, is there an argument I can supply to the `chpl` command to specify the output directory of the generated executable? I looked at the command [manpage](https://chapel-lang.org/docs/main/usingchapel/man.html?) but I didn't see something like that.

You can use the `-o` option to specify the output executable in a specific directory, e.g., `chpl foo.chpl -o tmp/foo` will put the executable in `tmp/`.

---

<div class="post-metadata">

**Author:** ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)\
**Post date:** [December 11, 2022, 5:21am UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055/4 "2022-12-11T05:21:38Z")

</div>

Sorry for the bad advice on the **-o** flag.. Silly me for not looking properly.

---

<div class="post-metadata">

**Author:** ![vlzambr2](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/vlzambr2/32/362_2.png) [@vlzambr2](https://chapel.discourse.group/u/vlzambr2)\
**Post date:** [December 11, 2022, 5:40am UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055/5 "2022-12-11T05:40:42Z")

</div>

Thank you Damian and Cassella! Putting the necessary commands in .bashrc fixed that issue.

---

<div class="post-metadata">

**Author:** ![mppf](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mppf](https://chapel.discourse.group/u/mppf)\
**Post date:** [December 12, 2022, 3:29pm UTC](https://chapel.discourse.group/t/configuration-compiler-does-not-persist-after-system-reboot/18055/6 "2022-12-12T15:29:20Z")

</div>

If you are installing system-wide (e.g. to `/usr/bin` or `/usr/local/bin`) with a "prefix" installation (`./configure --prefix=/usr/local/bin` e.g.) then, if that `bin` directory is already in your PATH, you should not need environment variables set to use the system. Also, IIRC, at the time you run `./configure`, the relevant environment variables are copied to a `chplconfig` file that is installed with your `chpl` and used to form the default settings.

Using the same techniques to create a `chplconfig` file should allow a `--chpl-home` installation where you only need to update `PATH` in .bashrc.

see also:

- [Building Chapel — Chapel Documentation 1.28](https://chapel-lang.org/docs/usingchapel/building.html#installing-chapel)
- [Setting up Your Environment for Chapel — Chapel Documentation 1.28](https://chapel-lang.org/docs/usingchapel/chplenv.html#chapel-configuration-files)
