Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: command '/usr/bin/clang' failed with exit code 1

I download a not commonly-used software package in github in Mac M1. I am trying to compile and install myself according to the instruction.

I have encountered the following problem saying "command/usr/bin/clang with exits error 1". I did install xcode in my mac. Because the built-in gcc version is 4.2, I upgrade the version using brew install gcc@7 command and the link to this gcc version. But I still face the same compiling problem.

Does anyone have instructions for me how to solve this? The author did not maintain the source code anymore and I have struggled for one day and still can not fix the problem.

like image 628
Edward Avatar asked Nov 19 '25 21:11

Edward


1 Answers

The follow steps worked!

  1. upgrade pip and related components by:
python -m pip install --upgrade pip
pip install –-upgrade wheel 
pip install –-upgrade setuptools
  1. install openssl
brew install openssl re2
  1. reinstall your package with some environment to be set
LDFLAGS="-L$(/opt/homebrew/bin/brew --prefix openssl)/lib -L$(/opt/homebrew/bin/brew --prefix re2)/lib" CPPFLAGS="-I$(/opt/homebrew/bin/brew --prefix openssl)/include -I$(/opt/homebrew/bin/brew --prefix re2)/include" GRPC_BUILD_WITH_BORING_SSL_ASM="" GRPC_PYTHON_BUILD_SYSTEM_RE2=true GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true pip install <your package name>

Source: https://candid.technology/error-command-usr-bin-clang-failed-with-exit-code-1/

like image 113
Burson Avatar answered Nov 21 '25 10:11

Burson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!