Schools example not compiling Pystan 3.4 on Ubuntu 20.04.4

Hello, I am trying to run the schools example from the help documentation, exactly as defined here: PyStan — pystan 3.4.0 documentation

I am working on an AWS EC2 instance running Ubuntu 20.04.4

The versions of software I have installed are:
Python 3.8.10
GCC 9.4.0
Pystan 3.4.0
Httpstan 4.7.2

I get the following error message when the model compiles, and I don’t understand what it means. Does anyone know how to interpret this, and how to solve the issue?

Messages from stanc:
Warning in ‘/tmp/httpstan_ngwr48f7/model_nb7ogmke.stan’, line 4, column 2: Declaration
of arrays by placing brackets after a variable name is deprecated and
will be removed in Stan 2.32.0. Instead use the array keyword before the
type. This can be changed automatically using the auto-format flag to
stanc
Warning in ‘/tmp/httpstan_ngwr48f7/model_nb7ogmke.stan’, line 5, column 2: Declaration
of arrays by placing brackets after a variable name is deprecated and
will be removed in Stan 2.32.0. Instead use the array keyword before the
type. This can be changed automatically using the auto-format flag to
stanc
Warning: The parameter tau has no priors.
Warning: The parameter mu has no priors.

Error handling request
Traceback (most recent call last):
File “/home/ubuntu/.local/lib/python3.8/site-packages/aiohttp/web_protocol.py”, line 435, in _handle_request
resp = await request_handler(request)
File “/home/ubuntu/.local/lib/python3.8/site-packages/aiohttp/web_app.py”, line 504, in _handle
resp = await handler(request)
File “/home/ubuntu/.local/lib/python3.8/site-packages/httpstan/views.py”, line 253, in handle_show_params
services_module = httpstan.models.import_services_extension_module(model_name)
File “/home/ubuntu/.local/lib/python3.8/site-packages/httpstan/models.py”, line 90, in import_services_extension_module
module: ModuleType = importlib.util.module_from_spec(spec) # type: ignore
File “”, line 556, in module_from_spec
File “”, line 1166, in create_module
File “”, line 219, in _call_with_frames_removed
ImportError: /home/ubuntu/.cache/httpstan/4.7.2/models/nb7ogmke/stan_services_model_nb7ogmke.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZSt28__throw_bad_array_new_le
ngthv
Traceback (most recent call last):
File “”, line 1, in
File “”, line 27, in
File “/home/ubuntu/.local/lib/python3.8/site-packages/stan/model.py”, line 517, in build
return asyncio.run(go())
File “/usr/lib/python3.8/asyncio/runners.py”, line 44, in run
return loop.run_until_complete(main)
File “/usr/lib/python3.8/asyncio/base_events.py”, line 616, in run_until_complete
return future.result()
File “/home/ubuntu/.local/lib/python3.8/site-packages/stan/model.py”, line 509, in go
raise RuntimeError(resp.json()[“message”])
File “/home/ubuntu/.local/lib/python3.8/site-packages/stan/common.py”, line 24, in json
return simdjson.loads(self.content)
File “/home/ubuntu/.local/lib/python3.8/site-packages/simdjson/init.py”, line 61, in loads
return parser.parse(s, True)
ValueError: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc.

I think you either need to upgrade gcc or build httpstan from source.

Thank you :)