# Erreur de compilation de code\_aster 15.2 dans un conteneur Docker Ubuntu 18.04

**URL:** <https://code-aster.org/forum/t/erreur-de-compilation-de-code-aster-15-2-dans-un-conteneur-docker-ubuntu-18-04/12253>\
**Category:** Code\_Aster installation\
**Created:** [April 7, 2026, 2:03pm UTC](https://code-aster.org/forum/t/erreur-de-compilation-de-code-aster-15-2-dans-un-conteneur-docker-ubuntu-18-04/12253 "2026-04-07T14:03:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuillaumeBrooking](https://code-aster.org/forum/letter_avatar_proxy/v4/letter/g/cc9497/32.png) [@GuillaumeBrooking](https://code-aster.org/forum/u/GuillaumeBrooking)\
**Post date:** [April 7, 2026, 2:03pm UTC](https://code-aster.org/forum/t/erreur-de-compilation-de-code-aster-15-2-dans-un-conteneur-docker-ubuntu-18-04/12253/1 "2026-04-07T14:03:08Z")

</div>

Bonjour,

Je cherche à compiler et installer CA 15.2 dans une image Docker de base Ubuntu18.04.

Lorsque j’exécute `python3 setup.py`, tous les tools compilent correctement. En revanche, la compilation de `code_aster` lui-même échoue à cause d’une erreur d’encoding. Voici le message d’erreur que j’obtiens :

```auto
Command line : export PATH=/tmp/tmpk9mgrez2:${PATH} ; . env.d/aster_full_std.sh ; ./waf configure --install-tests --prefix=/opt/aster/15.2
configure aster installation...
Command output :
readlink: missing operand
Try 'readlink --help' for more information.
checking environment... already set: /tmp/install_aster.93821/aster-15.2.0/env.d/aster_full_std.sh
executing: ./waf.engine configure --install-tests --prefix=/opt/aster/15.2 --out=build/std --jobs=4
Setting top to : /tmp/install_aster.93821/aster-15.2.0
Setting out to : /tmp/install_aster.93821/aster-15.2.0/build/std
Setting prefix to : /opt/aster/15.2
Checking for 'gcc' (C compiler) : /usr/bin/gcc
Checking for 'g++' (C++ compiler) : /usr/bin/g++
Checking for 'gfortran' (Fortran compiler) : /usr/bin/gfortran
Checking for C compiler version : gcc 7.5.0
Checking for Fortran compiler version : gfortran 7.5.0
fortran link verbose flag : -v
Checking for OpenMP flag -fopenmp : yes
Checking for program 'python' : /usr/bin/python3
Checking for python version >= 3.5.0 : 3.6.9
python-config : /usr/bin/python3-config
Asking python-config for pyembed '--cflags --libs --ldflags --embed' flags : not found
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Testing pyembed configuration : yes
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes
Testing pyext configuration : yes
Checking for numpy : /usr/lib/python3/dist-packages/numpy/ __init__.py
Checking for numpy version : 1.13.3
Checking for numpy include : ['/usr/lib/python3/dist-packages/numpy/core/include']
Checking for asrun : /opt/aster/lib/python3.6/site-packages/asrun/ __init__.py
Getting platform : LINUX64
Checking for library m : yes
Checking for library z : yes
Checking for number of cores : 20
Checking for program 'python' : /usr/bin/python3
Checking for python module 'numpy' : 1.13.3
Checking for program 'ldd' : /usr/bin/ldd
Checking library blas : yes (openblas)
Checking for a program using blas/lapack : yes
Checking for a program using omp thread : yes (on 20 threads)
Detected math libraries : ['openblas']
Setting libm after files : nothing done
Checking for library hdf5 : yes
Checking for header hdf5.h : yes
Checking hdf5 version : 1.10.3
Checking for API hdf5 v18 : default v18
Checking size of hid_t integers : 8
Checking for library med : yes
Checking for header med.h : yes
Checking size of med_int integers : 4
Checking size of med_idt integers : 8
Checking med version : 4.0.0
Checking for library metis : yes
Checking for header metis.h : yes
Checking metis version : 5.1.0
Checking for smumps_struc.h : yes
Checking for dmumps_struc.h : yes
Checking for cmumps_struc.h : yes
Checking for zmumps_struc.h : yes
Checking for mpif.h : yes
Checking mumps version : 5.2.1
Checking for library dmumps : yes
Checking for library zmumps : yes
Checking for library smumps : yes
Checking for library cmumps : yes
Checking for library mumps_common : yes
Checking for library pord : yes
Checking for library mpiseq : yes
Setting size of Mumps integers : 4
Checking for header scotch.h : yes
Checking scotch version : 6.0.4
Checking for library ['esmumps', 'scotch', 'scotcherr'] : yes
Reading build preferences from ~/.hgrc : not found
Checking for 'gfortran' (Fortran compiler) : /usr/bin/gfortran
Compiling a simple fortran app : yes
Detecting whether we need a dummy main : yes main
Checking for fortran option : yes (-fdefault-double-8 -fdefault-integer-8 -fdefault-real-8)
Checking for fortran option : yes (-Wimplicit-interface)
Checking for fortran option : yes (-Wintrinsic-shadow)
Checking for fortran option : yes (-fno-aggressive-loop-optimizations)
Checking for fortran option : yes (-ffree-line-length-none)
Setting fortran compiler flags : ['-O2', '-fPIC', '-fPIC', '-fdefault-double-8', '-fdefault-integer-8', '-fdefault-real-8', '-Wimplicit-interface', '-Wintrinsic-shadow', '-fno-aggressive-loop-optimizations', '-ffree-line-length-none']
Getting fortran mangling scheme : ok ('_', '', 'lower-case')
Checking size of integer4 : 4
Checking the matching C type : int
Checking size of default integer : 8
Checking the matching C type : long
Checking size of logical : 1
Checking size of simple precision real : 4
Checking the matching C type : float
Checking size of double precision real : 8
Checking the matching C type : double
Checking size of double complex : 16
Setting type for fortran string length : unsigned int
Setting size of blas/lapack integers : 4
Checking fpp stringify using # : no
Checking fpp stringify using "" : yes
Checking compilation with long lines : yes
Check for backtrace feature : yes
Check for tracebackqq feature : no
Getting code_aster version : [(15, 2, 0), 'bc8cd7a4aae1', 'v15.2_smeca', '22/10/2020', 'v15.2_smeca', 0]
Checking for 'g++' (C++ compiler) : /usr/bin/g++
Checking for compiler flags -std=c++11 : yes
Checking for library stdc++ : yes
Checking for program 'dpkg-architecture' : not found
Checking boost includes : 1.65.1
Checking boost libs : ok
Checking for boost linkage : ok
Checking for 'gcc' (C compiler) : /usr/bin/gcc
Getting C compiler flags : ['-O2', '-fno-stack-protector', '-fPIC', '-fPIC']
Checking for TFELHOME variable : ['/opt/aster/public/tfel-3.2.1']
Checking for program 'mfront-3.2.1' : /opt/aster/public/tfel-3.2.1/bin/mfront-3.2.1
Checking for program 'tfel-config-3.2.1' : /opt/aster/public/tfel-3.2.1/bin/tfel-config-3.2.1
Checking for 'tfel-config-3.2.1' : yes
Checking for mfront version >= 3.2.1 : 3.2.1
Checking for library AsterInterface-3.2.1 : yes
Checking for library TFELSystem-3.2.1 : yes
Checking for python module 'tfel_3_2_1.material' : ok
Check for msgfmt programs : not found
Check for lrelease programs : not found
Set parameters for 'config.json' : done
. use 'tmpdir' : /tmp
. use 'addmem' : 800
. use 'python' : python3
Checking for program 'gmsh' : not found
Checking for program 'gmsh' : not found
Checking for program 'salome' : not found
Checking for program 'salome' : not found
Checking for program 'run_miss3d' : not found
Checking for program 'run_miss3d' : not found
Checking for program 'homard' : not found
Checking for program 'homard' : not found
Checking for program 'ecrevisse' : not found
Checking for program 'ecrevisse' : not found
Checking for program 'mfront-3.2.1' : /opt/aster/public/tfel-3.2.1/bin/mfront-3.2.1
Checking for program 'xmgrace' : /usr/bin/xmgrace
Checking for program 'gracebat' : /usr/bin/gracebat
Checking for program 'mdump' : /opt/aster/public/med-4.0.0/bin/mdump
Checking for 'data' repository : /tmp/install_aster.93821/data not found
Store execution environment : yes
Build list of testcases : Traceback (most recent call last):
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Scripting.py", line 119, in waf_entry_point
    run_commands()
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Scripting.py", line 182, in run_commands
    ctx=run_command(cmd_name)
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Scripting.py", line 173, in run_command
    ctx.execute()
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Configure.py", line 85, in execute
    super(ConfigurationContext,self).execute()
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Context.py", line 92, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Context.py", line 133, in recurse
    user_function(self)
  File "/tmp/install_aster.93821/aster-15.2.0/wscript", line 225, in configure
    self.recurse('data')
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Context.py", line 133, in recurse
    user_function(self)
  File "/tmp/install_aster.93821/aster-15.2.0/data/wscript", line 110, in configure
    dict_conv = self.env2dict(osp.dirname(self.path.abspath()))
  File "/tmp/install_aster.93821/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Configure.py", line 175, in fun
    return f(*k,**kw)
  File "/tmp/install_aster.93821/aster-15.2.0/data/wscript", line 261, in env2dict
    glob(osp.join(src, "astest", "*.export")))
  File "/tmp/install_aster.93821/aster-15.2.0/data/wscript", line 310, in _build_def
    export = fobj.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 141: ordinal not in range(128)

```

Auriez-vous une idée de la cause de ce problème ?

Cordialement

Guillaume Brooking

PS: Voici le Dockerfile et le setup.cfg associé à mon installation:

[upl-file uuid=2f324c21-9baf-49ac-9592-616db161e3da size=2kB]dockerfile.txt[/upl-file]

[upl-file uuid=afb95906-a94c-438c-bbc3-7699fae95e57 size=6kB]setup.bin[/upl-file]

---

<div class="post-metadata">

**Author:** ![GuillaumeBrooking](https://code-aster.org/forum/letter_avatar_proxy/v4/letter/g/cc9497/32.png) [@GuillaumeBrooking](https://code-aster.org/forum/u/GuillaumeBrooking)\
**Post date:** [April 7, 2026, 2:24pm UTC](https://code-aster.org/forum/t/erreur-de-compilation-de-code-aster-15-2-dans-un-conteneur-docker-ubuntu-18-04/12253/2 "2026-04-07T14:24:24Z")

</div>

J’ai finalement trouvé l’erreur : l’encoding, par défaut, d’un shell d’un conteneur en Ubuntu 18.04 est `POSIX`, ce qui ne supporte visiblement que l’ascii stricte (comportement qui est ensuite transmis à Python). Il faut changer le `locale` pour résoudre le problème, en ajoutant (par exemple) :

```auto
ENV LANG C.UTF-8

```

en haut du `Dockerfile`.
