# Runtime has not been built for this configuration

**URL:** <https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287>\
**Category:** Users\
**Created:** [January 27, 2024, 2:47am UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287 "2024-01-27T02:47:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 27, 2024, 2:47am UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/1 "2024-01-27T02:47:58Z")

</div>

i had uninstalled chapel ,then again installed using homebrew ,i get this error though

/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ chpl -o hello hello.chpl  
error: The runtime has not been built for this configuration. Run $CHPL\_HOME/util/chplenv/printchplbuilds.py for information on available runtimes.

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 27, 2024, 2:51am UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/2 "2024-01-27T02:51:39Z")

</div>

if i used homebrew , does  
make  
have to be used??

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 27, 2024, 10:52am UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/3 "2024-01-27T10:52:20Z")

</div>

python printchplenv.py  
Warning: Unknown compiler: "gnu"  
machine info: Linux asusLaptop 5.15.0-92-generic #102~20.04.1-Ubuntu SMP Mon Jan 15 13:09:14 UTC 2024 x86\_64  
CHPL\_HOME: /home/linuxbrew/.linuxbrew/opt/chapel \*  
script location: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/util/chplenv  
CHPL\_TARGET\_PLATFORM: linux64  
CHPL\_TARGET\_COMPILER: llvm  
CHPL\_TARGET\_ARCH: x86\_64  
CHPL\_TARGET\_CPU: native  
CHPL\_LOCALE\_MODEL: flat  
CHPL\_COMM: none  
CHPL\_TASKS: qthreads  
CHPL\_LAUNCHER: none  
CHPL\_TIMERS: generic  
CHPL\_UNWIND: none  
CHPL\_MEM: jemalloc  
CHPL\_ATOMICS: cstdlib  
CHPL\_GMP: none  
CHPL\_HWLOC: bundled  
CHPL\_RE2: none  
CHPL\_LLVM: system  
CHPL\_AUX\_FILESYS: none

what environment variable i should set here?

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 27, 2024, 11:23am UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/4 "2024-01-27T11:23:39Z")

</div>

/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec$ chpl examples/hello3-datapar.chpl  
/usr/bin/ld: cannot find -lstdc++  
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)  
error: Make Binary - Linking

i am not able to execute the hello3-datapar program , i'm getting this error.

---

<div class="post-metadata">

**Author:** ![bradcray](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/bradcray/32/72_2.png) [@bradcray](https://chapel.discourse.group/u/bradcray)\
**Post date:** [January 27, 2024, 1:09pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/5 "2024-01-27T13:09:43Z")

</div>

Hi @AnhaiK and welcome to Chapel Discourse!

Taking your questions out of order:

> [@AnhaiK](#):
>
> i had uninstalled chapel ,then again installed using homebrew ,i get this error though

Was your previous installation of Chapel also homebrew, or was it a manual installation?

> [@AnhaiK](#):
>
> if i used homebrew , does  
> make  
> have to be used??

No, it should not (need to) be. `brew install chapel` followed by `chpl myChplProgram.chpl` should be sufficient with no additional steps.

You should also not need to manually set any `CHPL_` environment variables, and I would suggest unsetting any that you might currently have set in your shell or dotfiles (checking for them in your session using `env | grep CHPL`).

> [@AnhaiK](#):
>
> what environment variable i should set here?

From your `printchplenv` output:

> [@AnhaiK](#):
>
> CHPL\_HOME: /home/linuxbrew/.linuxbrew/opt/chapel \*

it appears that `CHPL_HOME` might be set, but it need not be. I'm not aware that this would be problematic if it's set to the correct value for your homebrew installation, but I don't use linuxbrew, so can't easily verify its value. I don't think it should need to be set in any case.

Assuming no `CHPL_*` variables have been set, this error:

> [@AnhaiK](#):
>
> /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ chpl -o hello hello.chpl  
> error: The runtime has not been built for this configuration. Run $CHPL\_HOME/util/chplenv/printchplbuilds.py for information on available runtimes.

tends to occur most frequently when mixing the compiler from one installation and the runtime libraries from another. That makes me wonder whether you could be using the `chpl` from the new installation (say) and the `$CHPL_HOME` from the previous installation or vice-versa.

Again, clearing your environment of `CHPL` settings (or PATH settings related to old installations of Chapel) and starting from a fresh environment should fix such issues. You can also use `chpl --print-chpl-home` to see where your `chpl` compiler thinks `$CHPL_HOME` is and `chpl --print-chpl-settings` to print out its notion of a bunch of `CHPL` environment variables. And of course `which chpl` can be used to determine which `chpl` binary you're invoking.

The line:

> [@AnhaiK](#):
>
> Warning: Unknown compiler: "gnu"

is also a bit concerning, and I'm not sure offhand where it would be coming from. Do you also see it if you run `chpl --print-chpl-settings`? If you do `env | grep gnu`, what do you see?

> [@AnhaiK](#):
>
> /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec$ chpl examples/hello3-datapar.chpl  
> /usr/bin/ld: cannot find -lstdc++  
> clang-15: error: linker command failed with exit code 1 (use -v to see invocation)  
> error: Make Binary - Linking

A number of things can cause this error, including potentially mixing versions of `chpl` and `$CHPL_HOME`. Rather than taking guesses at what could be going wrong here, let's see if any of the previous steps make things better first. If they don't, seeing the output of `chpl --print-commands examples/hello3-datapar.chpl` might be useful.

-Brad

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 27, 2024, 3:40pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/6 "2024-01-27T15:40:35Z")

</div>

previously i had installed using make (manual installation) and i could "make" successfully so, used homebrew after that. I also had removed all the chapel files manually while uninstalling it, with the help of  
sudo find / -type f -name 'chpl\*' .so did i miss removing any other relevant file which might be causing issues now?  
this is my current setting after reinstalling through brew

/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec$ chpl --print-chpl-home  
/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec  
asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec$ chpl --print-chpl-settings  
CHPL\_HOME: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec  
CHPL\_RUNTIME\_LIB: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/lib  
CHPL\_RUNTIME\_INCL: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include  
CHPL\_THIRD\_PARTY: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party

machine info: Linux asusLaptop 5.15.0-92-generic #102~20.04.1-Ubuntu SMP Mon Jan 15 13:09:14 UTC 2024 x86\_64  
CHPL\_HOME: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec \*  
script location: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/util/chplenv  
CHPL\_HOST\_PLATFORM: linux64  
CHPL\_HOST\_COMPILER: gnu  
CHPL\_HOST\_CC: gcc  
CHPL\_HOST\_CXX: g++  
CHPL\_HOST\_ARCH: x86\_64  
CHPL\_TARGET\_PLATFORM: linux64  
CHPL\_TARGET\_COMPILER: llvm  
CHPL\_TARGET\_CC: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang  
CHPL\_TARGET\_CXX: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++  
CHPL\_TARGET\_LD: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++  
CHPL\_TARGET\_ARCH: x86\_64  
CHPL\_TARGET\_CPU: native  
CHPL\_LOCALE\_MODEL: flat  
CHPL\_COMM: none \*  
CHPL\_TASKS: fifo \*  
CHPL\_LAUNCHER: none  
CHPL\_TIMERS: generic  
CHPL\_UNWIND: none  
CHPL\_HOST\_MEM: cstdlib \*  
CHPL\_MEM: cstdlib \*  
CHPL\_ATOMICS: cstdlib  
CHPL\_GMP: none \*  
CHPL\_HWLOC: none  
CHPL\_RE2: none \*  
CHPL\_LLVM: system \*  
CHPL\_LLVM\_SUPPORT: system  
CHPL\_LLVM\_CONFIG: /home/linuxbrew/.linuxbrew/opt/llvm@15/bin/llvm-config +  
CHPL\_LLVM\_VERSION: 15  
CHPL\_AUX\_FILESYS: none  
CHPL\_LIB\_PIC: none  
CHPL\_SANITIZE: none  
CHPL\_SANITIZE\_EXE: none

i'm getting this error.  
/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec$ chpl --print-commands examples/hello3-datapar.chpl  
error: The runtime has not been built for this configuration. Run $CHPL\_HOME/util/chplenv/printchplbuilds.py for information on available runtimes.

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 27, 2024, 3:45pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/7 "2024-01-27T15:45:46Z")

</div>

also this is the output for  
$CHPL\_HOME/util/chplenv/printchplbuilds.py  
 0 1  
CHPL\_TARGET\_PLATFORM: linux64 linux64 linux64  
CHPL\_TARGET\_COMPILER: llvm llvm gnu\*  
CHPL\_TARGET\_ARCH: x86\_64 x86\_64 x86\_64  
CHPL\_TARGET\_CPU: native native native  
CHPL\_LOCALE\_MODEL: flat flat flat  
CHPL\_COMM: none none none  
CHPL\_TASKS: fifo fifo fifo  
CHPL\_TASKS\_DEBUG: - - -  
CHPL\_TIMERS: generic generic generic  
CHPL\_UNWIND: none none none  
CHPL\_MEM: cstdlib cstdlib cstdlib  
CHPL\_ATOMICS: cstdlib cstdlib cstdlib  
CHPL\_HWLOC: none none none  
CHPL\_RE2: none bundled\* bundled\*  
CHPL\_AUX\_FILESYS: none none none  
CHPL\_LIB\_PIC: none none none  
CHPL\_SANITIZE\_EXE: none none none  
MTIME: NA Dec 08 15:05 Dec 08 15:05

---

<div class="post-metadata">

**Author:** ![vass](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/vass/32/692_2.png) [@vass](https://chapel.discourse.group/u/vass)\
**Post date:** [January 27, 2024, 4:50pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/8 "2024-01-27T16:50:49Z")

</div>

Hello @AnhaiK, the output of these commands is very helpful. I expect that you have `CHPL_RE2` set in your environment. If you unset it or set it to `bundled` then the error should be resolved.

Vass

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 28, 2024, 6:07am UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/9 "2024-01-28T06:07:56Z")

</div>

after rebooting my computer:

asus@asusLaptop:~$ chpl --print-chpl-settings  
CHPL\_HOME: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec  
CHPL\_RUNTIME\_LIB: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/lib  
CHPL\_RUNTIME\_INCL: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include  
CHPL\_THIRD\_PARTY: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party

machine info: Linux asusLaptop 5.15.0-92-generic #102~20.04.1-Ubuntu SMP Mon Jan 15 13:09:14 UTC 2024 x86\_64  
CHPL\_HOME: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec \*  
script location: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/util/chplenv  
CHPL\_HOST\_PLATFORM: linux64  
CHPL\_HOST\_COMPILER: gnu  
CHPL\_HOST\_CC: gcc  
CHPL\_HOST\_CXX: g++  
CHPL\_HOST\_ARCH: x86\_64  
CHPL\_TARGET\_PLATFORM: linux64  
CHPL\_TARGET\_COMPILER: llvm  
CHPL\_TARGET\_CC: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang  
CHPL\_TARGET\_CXX: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++  
CHPL\_TARGET\_LD: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++  
CHPL\_TARGET\_ARCH: x86\_64  
CHPL\_TARGET\_CPU: native  
CHPL\_LOCALE\_MODEL: flat  
CHPL\_COMM: none  
CHPL\_TASKS: fifo +  
CHPL\_LAUNCHER: none  
CHPL\_TIMERS: generic  
CHPL\_UNWIND: none  
CHPL\_HOST\_MEM: jemalloc  
CHPL\_MEM: cstdlib +  
CHPL\_ATOMICS: cstdlib  
CHPL\_GMP: system +  
CHPL\_HWLOC: none  
CHPL\_RE2: bundled +  
CHPL\_LLVM: system  
CHPL\_LLVM\_SUPPORT: system  
CHPL\_LLVM\_CONFIG: /home/linuxbrew/.linuxbrew/opt/llvm@15/bin/llvm-config +  
CHPL\_LLVM\_VERSION: 15  
CHPL\_AUX\_FILESYS: none  
CHPL\_LIB\_PIC: none  
CHPL\_SANITIZE: none  
CHPL\_SANITIZE\_EXE: none

CPL\_RE2 is set to bundled itself but i get this : error when i compile an example program:

asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ chpl -L/usr/lib/x86\_64-linux-gnu/libstdc++.so.6 hello3-datapar.chpl  
/usr/bin/ld: cannot find -lstdc++  
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)  
error: Make Binary - Linking

---

<div class="post-metadata">

**Author:** ![bradcray](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/bradcray/32/72_2.png) [@bradcray](https://chapel.discourse.group/u/bradcray)\
**Post date:** [January 28, 2024, 8:14pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/10 "2024-01-28T20:14:05Z")

</div>

@AnhaiK —

- What happens if you compile with `chpl hello3-datapar.chpl` (leaving off the manually added `-L` option)?

- What happens with `chpl --print-commands hello3-datapar.chpl`?

- Are you able to compile and link a C++ "hello world" style program with your linuxbrew llvm@15 installation? (i.e., using the compilers listed here:

Thanks,  
-Brad

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 29, 2024, 2:55pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/11 "2024-01-29T14:55:27Z")

</div>

> [@bradcray](#):
>
> `chpl hello3-datapar.chpl`

/usr/bin/ld: cannot find -lstdc++  
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)  
child process exited with code 1  
error: Make Binary - Linking

asus@asusLaptop:~$ clang++ home\_cpp.cpp; ./home\_cpp  
home\_cpp.cpp:1:10: fatal error: 'iostream' file not found  
1 | #include   
| ^ ~~~~~~~~~  
1 error generated.  
Hello, World!  
asus@asusLaptop:~$ g++ -o home\_cpp home\_cpp.cpp  
asus@asusLaptop:~$ ./home\_cpp  
Hello, World!

how do i change compiler to g++ in chapel?

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 29, 2024, 2:55pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/12 "2024-01-29T14:55:56Z")

</div>

i'm on a Ubuntu 20.04 operating system.

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 29, 2024, 3:20pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/13 "2024-01-29T15:20:04Z")

</div>

when i'm compiling a chapel code ,it is trying to look for libstdc++ under usr/bin/ld .  
but my libstdc++ is available under lib32

how do i make chapel point to lib32?

---

<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:** [January 29, 2024, 8:42pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/14 "2024-01-29T20:42:43Z")

</div>

> [@AnhaiK](#):
>
> when i'm compiling a chapel code ,it is trying to look for libstdc++ under usr/bin/ld .  
> but my libstdc++ is available under lib32
> 
> how do i make chapel point to lib32?

You have a 64-bit OS so, Chapel will compile 64-bit programs, and those should be using a 64-bit libstdc++.

Do you have the Homebrew version of gcc / g++ installed? You can see what packages you have installed with `brew list`.

I'm trying to reproduce your environment.

Here is what I have

- Ubuntu 20.04.6 LTS
- linuxbrew installed with these packages

```Chapel
$ brew list
berkeley-db@5 chapel gcc krb5 libnsl llvm@14 mpfr readline zlib
binutils cmake glibc libedit libtirpc llvm@15 ncurses sqlite zstd
bzip2 elfutils gmp libffi libxcrypt lz4 openssl@3 unzip
ca-certificates expat isl libmpc linux-headers@5.15 mpdecimal python@3.11 xz

```

```Chapel
$ chpl --print-chpl-settings
CHPL_HOME: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec
CHPL_RUNTIME_LIB: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/lib
CHPL_RUNTIME_INCL: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include
CHPL_THIRD_PARTY: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party

machine info: Linux ubuntu-focal 5.4.0-170-generic #188-Ubuntu SMP Wed Jan 10 09:51:01 UTC 2024 x86_64
CHPL_HOME: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec *
script location: /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/util/chplenv
CHPL_HOST_PLATFORM: linux64
CHPL_HOST_COMPILER: gnu
  CHPL_HOST_CC: gcc
  CHPL_HOST_CXX: g++
CHPL_HOST_ARCH: x86_64
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
  CHPL_TARGET_CC: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang
  CHPL_TARGET_CXX: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++
  CHPL_TARGET_LD: /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: fifo +
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_HOST_MEM: jemalloc
CHPL_MEM: cstdlib +
CHPL_ATOMICS: cstdlib
CHPL_GMP: system +
CHPL_HWLOC: none
CHPL_RE2: bundled +
CHPL_LLVM: system
  CHPL_LLVM_SUPPORT: system
  CHPL_LLVM_CONFIG: /home/linuxbrew/.linuxbrew/opt/llvm@15/bin/llvm-config +
  CHPL_LLVM_VERSION: 15
CHPL_AUX_FILESYS: none
CHPL_LIB_PIC: none
CHPL_SANITIZE: none
CHPL_SANITIZE_EXE: none

```

```Chapel
// hello.chpl
writeln("hello");

```

```Chapel
$ chpl hello.chpl --print-commands
<internal clang code generation> -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/modules/standard -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/modules/packages -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/localeModels/flat -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/localeModels -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/comm/none -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/comm -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/tasks/fifo -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/qio -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/atomics/cstdlib -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/runtime/include/mem/cstdlib -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party/utf8-decoder -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party/re2/install/linux64-x86_64-native-llvm-none/include -I. -I/tmp/chpl-vagrant.deleteme-zXJNig -Werror=pointer-arith -Werror=write-strings -Werror=missing-declarations -Werror=missing-prototypes -Werror=strict-prototypes -Werror=missing-format-attribute -Wno-unused-function -Wno-strict-aliasing -I/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/modules/internal -DCHPL_GEN_CODE -pthread -I/home/linuxbrew/.linuxbrew/include -include sys_basic.h -include wctype.h -include ctype.h -include llvm/chapel_libc_wrapper.h 

# Make Binary - Linking
/home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++ /tmp/chpl-vagrant.deleteme-zXJNig/chpl__module.o /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/lib/linux64/llvm/x86_64/cpu-native/loc-flat/comm-none/tasks-fifo/tmr-generic/unwind-none/mem-cstdlib/atomics-cstdlib/hwloc-none/re2-bundled/fs-none/lib_pic-none/san-none/main.o -o /tmp/chpl-vagrant.deleteme-zXJNig/hello.tmp -L/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/lib/linux64/llvm/x86_64/cpu-native/loc-flat/comm-none/tasks-fifo/tmr-generic/unwind-none/mem-cstdlib/atomics-cstdlib/hwloc-none/re2-bundled/fs-none/lib_pic-none/san-none -lchpl -L/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party/re2/install/linux64-x86_64-native-llvm-none/lib -lre2 -Wl,-rpath,/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/third-party/re2/install/linux64-x86_64-native-llvm-none/lib -lm -lpthread -lgmp -L/home/linuxbrew/.linuxbrew/lib
rm -f hello
mv /tmp/chpl-vagrant.deleteme-zXJNig/hello.tmp hello

```

So, this is working for me.

> sudo find / -type f -name 'chpl\*' .so did i miss removing any other relevant file which might be causing issues now?

That's possible. I don't think that would completely remove an old installation. (Note we have a TODO to get `make uninstall` working; see [make uninstall · Issue #6353 · chapel-lang/chapel · GitHub](https://github.com/chapel-lang/chapel/issues/6353) ).

Even so, the issues you are describing here sound more to me like a problem with some dependency (e.g. wrong libstdc++ installed, or some environment variable is disrupting the process of finding it). Are you setting any `CHPL_` or C compiler related environment variables in a login script? Are your packages out of date in an incompatable way? Have you done `sudo apt update` `sudo apt upgrade` `brew update` `brew upgrade` recently?

About the version of libstdc++: on my test VM, I can see that Chapel is working with a 64-bit libstdc++:

```Chapel
$ chpl hello.chpl
$ ldd ./hello
	linux-vdso.so.1 (0x00007ffd945ef000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3f33ac8000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3f33aa5000)
	libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f3f33a21000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3f3383f000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3f33824000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3f33632000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3f33d38000)
$ ./hello
hello

```

Also regarding this:

> [@AnhaiK](#):
>
> asus@asusLaptop:~$ clang++ home\_cpp.cpp; ./home\_cpp  
> home\_cpp.cpp:1:10: fatal error: 'iostream' file not found  
> 1 | #include  
> | ^ ~~~~~~~~~  
> 1 error generated.  
> Hello, World!

It would be a pretty severe problem if the `clang++` Chapel is using can't compile C++ code. It works for me:

```Chapel
$ /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++ test.cpp
$ ./a.out
Hello from C++

```

Occasionally, users working with a different GCC need to set `CHPL_LLVM_GCC_PREFIX` to the prefix where a different GCC is installed. It leads Chapel to use a `--gcc-toolchain=/some/path/to/gccInstall/` for `clang++` commands when compiling. You can check if this will help you by adding it directly to a test compile with `clang++` such as the above one.

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 30, 2024, 3:12pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/15 "2024-01-30T15:12:45Z")

</div>

asus@asusLaptop:~$ which gcc  
/usr/bin/gcc  
asus@asusLaptop:~$ which g++  
/usr/bin/g++  
asus@asusLaptop:~$ export CHPL\_GCC\_PREFIX=/usr/bin/gcc  
asus@asusLaptop:~$ chpl myprogram.chpl  
myprogram.chpl:2: syntax error: (no token given)  
asus@asusLaptop:~$ /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++ home\_cpp.cpp  
home\_cpp.cpp:1:10: fatal error: 'iostream' file not found  
#include   
^ ~~~~~~~~~  
1 error generated.  
asus@asusLaptop:~$ /usr/bin/g++ home\_cpp.cpp  
asus@asusLaptop:~$ ./a.out  
Hello, World!  
asus@asusLaptop:~$ ldd ./a.out  
linux-vdso.so.1 (0x00007ffee8365000)  
libstdc++.so.6 =\> /lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007fae53f56000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007fae53d64000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007fae53c15000)  
/lib64/ld-linux-x86-64.so.2 (0x00007fae541e8000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007fae53bf0000)

i'm able to compile using g++ ,but the same isn't happening with the chapel file.

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 30, 2024, 3:14pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/16 "2024-01-30T15:14:47Z")

</div>

asus@asusLaptop:~$ brew list  
berkeley-db@5 elfutils krb5 libxcrypt mpfr sqlite  
binutils expat libedit linux-headers@5.15 ncurses unzip  
bzip2 gcc libffi llvm openssl@3 xz  
ca-certificates glibc libmpc llvm@15 python@3.11 z3  
chapel gmp libnsl lz4 python@3.12 zlib  
cmake isl libtirpc mpdecimal readline zstd

brew list output said this.

---

<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:** [January 30, 2024, 3:29pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/17 "2024-01-30T15:29:14Z")

</div>

> [@AnhaiK](#):
>
> asus@asusLaptop:~$ chpl myprogram.chpl  
> myprogram.chpl:2: syntax error: (no token given)

This error indicates whatever you put in `myprogram.chpl` isn't a valid Chapel program. I wouldn't expect it indicates any configuration /  
installation problem.

> [@AnhaiK](#):
>
> asus@asusLaptop:~$ /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++ home\_cpp.cpp  
> home\_cpp.cpp:1:10: fatal error: 'iostream' file not found  
> #include  
> ^ ~~~~~~~~~  
> 1 error generated.

I don't see how we can get Chapel to work if the C++ compiler is behaving this way. On my VM with a similar environment, `clang++` was able to find C++ headers:

```Chapel
// test.cpp
#include <cstdio>
#include <iostream>

int main(int argc, char** argv) {
  printf("Hello from C++\n");
  return 0;
}

```

```Chapel
$ /home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++ test.cpp
$ ./a.out
Hello from C++

```

Since it's hard to see how Chapel can work in this setting if `clang++` is not working, I'd recommend you try to debug this problem first. Does `/home/linuxbrew/.linuxbrew/Cellar/llvm@15/15.0.7/bin/clang++ test.cpp --gcc-toolchain=/usr/` change the behavior at all?

It might be some kind of Homebrew issue. Have you tried `brew doctor`? Could try uninstalling it and reinstalling it as well, but that seems like a big step.

Another totally different strategy is to ask Chapel to use the C backend rather than the LLVM backend. We default to LLVM but sometimes the C backend is easier to get working. It looks like the Homebrew package is built with support for the C backend as well. To request it, you can do:

```Chapel
$ CHPL_TARGET_COMPLIER=gnu chpl hello.chpl

```

or

```Chapel
$ chpl hello.chpl --target-compiler=gnu

```

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 31, 2024, 3:38pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/18 "2024-01-31T15:38:51Z")

</div>

> [@mppf](#):
>
> `chpl hello.chpl --target-compiler=gnu`

the export didn't work....  
asus@asusLaptop:~$ export CHPL\_TARGET\_COMPLIER=gnu  
asus@asusLaptop:~$ chpl /home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples/hello3-datapar.chpl  
/usr/bin/ld: cannot find -lstdc++  
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)  
error: Make Binary - Linking

and CHPL\_TARGET\_COMPLIER=gnu chpl hello.chpl this gave the linking error

asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ CHPL\_TARGET\_COMPLIER=gnu chpl hello.chpl  
/usr/bin/ld: cannot find -lstdc++  
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)  
error: Make Binary - Linking

but chpl hello.chpl --target-compiler=gnu worked

asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ chpl hello.chpl --target-compiler=gnu  
asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$

asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ chpl hello3-datapar.chpl --target-compiler=gnu  
asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$  
------did compilation  
asus@asusLaptop:/home/linuxbrew/.linuxbrew/Cellar/chapel/1.33.0/libexec/examples$ ./hello3-datapar  
Hello, world! (from iteration 1 of 100)  
Hello, world! (from iteration 51 of 100)  
Hello, world! (from iteration 52 of 100)  
Hello, world! (from iteration 53 of 100)  
Hello, world! (from iteration 54 of 100)  
Hello, world! (from iteration 55 of 100)  
Hello, world! (from iteration 56 of 100)  
Hello, world! (from iteration 57 of 100)  
Hello, world! (from iteration 58 of 100)  
Hello, world! (from iteration 59 of 100)  
Hello, world! (from iteration 60 of 100)  
Hello, world! (from iteration 61 of 100)  
.  
.  
.  
100 threads --done successfully

how do i set the target compiler as gnu in the environment seeing that export did not work??  
Thank you

---

<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:** [January 31, 2024, 4:59pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/19 "2024-01-31T16:59:27Z")

</div>

> [@AnhaiK](#):
>
> export CHPL\_TARGET\_COMPLIER=gnu

Hi, my apologies, the reason this didn't work is that there was a spelling error in my last post. It should be

```Chapel
export CHPL_TARGET_COMPILER=gnu

```

Hope that helps.

---

<div class="post-metadata">

**Author:** ![AnhaiK](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/anhaik/32/506_2.png) [@AnhaiK](https://chapel.discourse.group/u/AnhaiK)\
**Post date:** [January 31, 2024, 5:14pm UTC](https://chapel.discourse.group/t/runtime-has-not-been-built-for-this-configuration/30287/20 "2024-01-31T17:14:21Z")

</div>

sorry, i didn't notice either.

it works, Thanks
