Parallel not found

Trying the new 16 snapshot mentioned in the meet up notes and it fails.


$ alr run gcc
ⓘ Building test=0.1.0-dev/test.gpr...                                 
Compile
   [Ada]          test.adb
test.adb:5:04: error: "parallel" is undefined
test.adb:5:12: error: missing ";"

```

I cut and pasted the example from Max’s repo and also used both archives from the alire link and Max's with the same result.

```
$ ls alire/cache/pins/
lwt

$ alr toolchain
CRATE         VERSION STATUS    NOTES            
gprbuild      22.0.1  Available 
gprbuild      25.0.0  Default   Detected at /usr/bin/gprbuild
gprbuild      25.0.1  Available 
gnat_native   14.2.1  Available 
gnat_native   15.1.2  Available 
gnat_external 16.0.0  Default   Detected at /home/laguest/opt/gnat-x86_64-linux-16.0.0-20251102/bin/gnat
```

Any ideas?

1 Like

Only use Max’s build as Alire’s snapshots are from GCC main branch, which does not have parallel. Also, I believe lwt is not needed anymore. And maybe you need to force the Ada 2022 mode.

I changed it to pass -gnat2022 on the command line from the gpr and it still says the same.

I just deleted both archives and the installed dir and redownloaded, same.

Ah, it’s still using gcc 14 for some reason. And setting gprbuild to “none” in alr also uses 14.

1 Like

I see, gnatbuild isn’t included in that archive.


$ ls ~/opt/gnat-x86_64-linux-16.0.0-20251102/bin/
addr2line  gcc-nm         gnatchop        gp-display-html       gstack    strings
ar         gcc-ranlib     gnatclean       gp-display-src        ld        strip
as         gcore          gnatkr          gp-display-text       ld.bfd    x86_64-pc-linux-gnu-c++
c++        gcov           gnatlink        gprof                 lto-dump  x86_64-pc-linux-gnu-g++
c++filt    gcov-dump      gnatls          gprofng               nm        x86_64-pc-linux-gnu-gcc
cpp        gcov-tool      gnatmake        gprofng-archive       objcopy   x86_64-pc-linux-gnu-gcc-16.0.0
elfedit    gdb            gnatname        gprofng-collect-app   objdump   x86_64-pc-linux-gnu-gcc-ar
g++        gdb-add-index  gnatprep        gprofng-display-html  ranlib    x86_64-pc-linux-gnu-gcc-nm
gcc        gnat           gp-archive      gprofng-display-src   readelf   x86_64-pc-linux-gnu-gcc-ranlib
gcc-ar     gnatbind       gp-collect-app  gprofng-display-text  size
```

Installing the 15 toolchain as the main toolchain, then setting 16 as the local and gprbuild to none, compiles it.

And you still need lwt:

$ alr run
ⓘ Building test=0.1.0-dev/test.gpr...                                 
Compile
   [Ada]          test.adb
test.adb:6:28: warning: "lwt" library not found. Parallel loop will execute sequentially [enabled by default]
Bind
```

1 Like

I guess, the easiest way to make it work is to follow steps from release page:

1 Like

That’s what I did, but I hadn’t updated the global toolchain.

Let us know how it works once you try it …

I ran the example, nothing more. Yet.