'Error installing Multi-rake (containing pycld2 dependecy) python package in Ubuntu

I am trying to pip install the multi-rake package that is part of the image of a docker container, but when building the wheel for pycld2 get the error

 Building wheel for pycld2 (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      running bdist_wheel
      The [wheel] section is deprecated. Use [bdist_wheel] instead.
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.9
      creating build/lib.linux-aarch64-3.9/pycld2
      copying pycld2/__init__.py -> build/lib.linux-aarch64-3.9/pycld2
      running build_ext
      building 'pycld2._pycld2' extension
      creating build/temp.linux-aarch64-3.9
      creating build/temp.linux-aarch64-3.9/tmp
      creating build/temp.linux-aarch64-3.9/tmp/pip-install-7qycswq2
      creating build/temp.linux-aarch64-3.9/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897
      creating build/temp.linux-aarch64-3.9/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/bindings
      creating build/temp.linux-aarch64-3.9/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/cld2
      creating build/temp.linux-aarch64-3.9/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/cld2/internal
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/cld2/internal -I/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/cld2/public -I/usr/local/include/python3.9 -c /tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/bindings/encodings.cc -o build/temp.linux-aarch64-3.9/tmp/pip-install-7qycswq2/pycld2_a6f80330f6aa46c7a9589810ffe1c897/bindings/encodings.o -w -O2 -m64 -fPIC
      gcc: error: unrecognized command-line option ‘-m64’
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycld2

The docker operates on linux. I tried a lot already but no solution seems to work. I was thinking that it might be a problem with the c compiler but I am not sure. Any suggestions or workarounds in order to use the multi-rake package on Linux?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source