gcc exit status 4 on stan model build in Docker
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
When I try to build the docker container I run into this issue with gcc. Looks to be similar to [this](https://github.com/facebook/prophet/issues/991) issue from earlier that wasn't resolved. During build I use `--memory-limit=10000m`, but watching memory usage during build it never goes above 4GB.
```
=> ERROR [ 9/10] RUN python setup.py install 19338.7s
------
> [ 9/10] RUN python setup.py install:
#13 0.581 running install
#13 0.635 running bdist_egg
#13 0.636 running egg_info
#13 0.636 creating prophet.egg-info
#13 0.636 writing prophet.egg-info/PKG-INFO
#13 0.638 writing dependency_links to prophet.egg-info/dependency_links.txt
#13 0.638 writing requirements to prophet.egg-info/requires.txt
#13 0.638 writing top-level names to prophet.egg-info/top_level.txt
#13 0.638 writing manifest file 'prophet.egg-info/SOURCES.txt'
#13 0.679 reading manifest template 'MANIFEST.in'
#13 0.680 no previously-included directories found matching 'prophet/stan_model'
#13 0.680 adding license file 'LICENSE'
#13 0.681 writing manifest file 'prophet.egg-info/SOURCES.txt'
#13 0.682 installing library code to build/bdist.linux-x86_64/egg
#13 0.682 running install_lib
#13 0.682 running build_py
#13 0.682 creating build
#13 0.682 creating build/lib
#13 0.682 creating build/lib/prophet
#13 0.682 creating build/lib/prophet/stan_model
#13 1.948 Importing plotly failed. Interactive plots will not work.
#13 2.551 INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW.
#13 19330.5 error: command 'gcc' failed with exit status 4
------
executor failed running [/bin/sh -c python setup.py install]: exit code: 1
```
Running the simpler example from that ticket
```
import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code) # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean() # should be close to 0
```
produces the following error
```
=> ERROR [ 9/10] RUN python test.py 1287.4s
------
> [ 9/10] RUN python test.py:
#13 1.318 INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW.
#13 1282.4 Traceback (most recent call last):
#13 1282.4 File "/usr/local/lib/python3.7/distutils/unixccompiler.py", line 118, in _compile
#13 1282.4 extra_postargs)
#13 1282.4 File "/usr/local/lib/python3.7/distutils/ccompiler.py", line 910, in spawn
#13 1282.4 spawn(cmd, dry_run=self.dry_run)
#13 1282.4 File "/usr/local/lib/python3.7/distutils/spawn.py", line 36, in spawn
#13 1282.4 _spawn_posix(cmd, search_path, dry_run=dry_run)
#13 1282.4 File "/usr/local/lib/python3.7/distutils/spawn.py", line 159, in _spawn_posix
#13 1282.4 % (cmd, exit_status))
#13 1282.4 distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 4
#13 1282.4
#13 1282.4 During handling of the above exception, another exception occurred:
#13 1282.4
#13 1282.4 Traceback (most recent call last):
#13 1282.4 File "test.py", line 3, in
#13 1282.4 model = pystan.StanModel(model_code=model_code) # this will take a minute
#13 1282.4 File "/usr/local/lib/python3.7/site-packages/pystan/model.py", line 378, in __init__
#13 1282.4 build_extension.run()
#13 1282.4 File "/usr/local/lib/python3.7/distutils/command/build_ext.py", line 340, in run
#13 1282.4 self.build_extensions()
#13 1282.4 File "/usr/local/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
#13 1282.4 self._build_extensions_serial()
#13 1282.4 File "/usr/local/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
#13 1282.4 self.build_extension(ext)
#13 1282.4 File "/usr/local/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
#13 1282.4 depends=ext.depends)
#13 1282.4 File "/usr/local/lib/python3.7/distutils/ccompiler.py", line 574, in compile
#13 1282.4 self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
#13 1282.4 File "/usr/local/lib/python3.7/distutils/unixccompiler.py", line 120, in _compile
#13 1282.4 raise CompileError(msg)
#13 1282.4 distutils.errors.CompileError: command 'gcc' failed with exit status 4
```
Contributor guide
Assessment
This issue has not been assessed yet.