3

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.

4
  • 3
    This is impossible to troubleshoot from the information given. We need to know at least what software package it is, or the complete output — preferably both. And why is it tagged "Linux"? If you really are running Linux on Apple M1 hardware, you are probably on your own. Commented Mar 30, 2022 at 5:08
  • "command/usr/bin/clang with exits error 1" is not the actual error message. It is just an information from make that there was an error. As it stands your question is basically: I have some code that fails to compile, how to solve it? Obviously that can't be answered. Commented Mar 30, 2022 at 5:10
  • In file included from qd/cae/dyna_cpp/dyna/keyfile/ElementKeyword.cpp:5: qd/cae/dyna_cpp/dyna/keyfile/ElementKeyword.hpp:51:37: error: reference to type 'const std::vector<std::string>' (aka 'const vector<basic_string<char>>') could not bind to an lvalue of type 'const char [1]' . This is the detailed error when i compile the package. Is there any reason for this? Commented Mar 30, 2022 at 10:43
  • 1
    Looks like something is wrong with some C++ code. That's about what can be said from the information given. Looks like something is trying to pass a char array to something expecting an array of strings, but as to what and why — impossible to say without having the code. Commented Apr 1, 2022 at 12:16

1 Answer 1

2

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/

Sign up to request clarification or add additional context in comments.

1 Comment

The question is about is a completely generic error message, so because these steps worked for you in one specific scenario doesn't mean they'll work for anyone else. In particular, nothing in the OP's question implies any kind of a problem with OpenSSL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.