Configuration/compiler does not persist after system reboot

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 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.

In the compiler installation still there on reboot?

If that exists in some location called say

/pub/lang/chapel/chapel-1.25.1

you need to include

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.

1 Like

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/.

1 Like

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

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

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: