Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer for Python returns error: command 'gcc' failed with exit status 1 #4578

Closed
alex4200 opened this issue Oct 11, 2021 · 12 comments
Closed
Labels
analyzer About the analyzer tool question An issue that is actually a question

Comments

@alex4200
Copy link

alex4200 commented Oct 11, 2021

Upon trying to run the analyzer on a project, I get an error

   ....
    gcc: fatal error: cannot execute ?cc1plus?: execvp: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1

two times. Is that a known issue? I though the analyzer works only passive?

I did run the command

docker run -v ${PROJECT}:/project -v ${PWD}/output:/output ort --force-overwrite --info analyze -i /project -o /output/analyze_mime

where PROJECT points to a folder BluePyOpt, checked out with git clone https://github.com/BlueBrain/BluePyOpt.git.

Let me know any further information that are helpful to solve this problem

@sschuberth
Copy link
Member

Is that a known issue?

It's known, yes, but so far was not documented as a public issue. Thanks for filing one.

I though the analyzer works only passive?

It tries very hard to be, yes. Unfortunately, some languages / build systems are very limited in their features to just query all required metadata without actually building anything. Python / Pip is one of these limited systems.

So in general, we have problems analyzing Python projects that depend on native-code packages. For Ruby / Bundler we were recently able to solve that problem. For Python / Pip, we are currently investigating a proper solution.

FYI, @pombredanne, this is also something that should get solved by the "Project-Multi Python-version dependencies resolver".

@sschuberth sschuberth added analyzer About the analyzer tool enhancement labels Oct 11, 2021
@alex4200
Copy link
Author

Is there any workaround I can apply?

@sschuberth
Copy link
Member

The only work-around I can think of is to install gcc (and any subsequently missing development library) on the system running ORT.

@sschuberth sschuberth changed the title Analyzer returns error: command 'gcc' failed with exit status 1 Analyzer for Python returns error: command 'gcc' failed with exit status 1 Oct 13, 2021
@alex4200
Copy link
Author

Thanks, the workaround (installing gcc) did actually work for me.
I had to install the following packages for the docker image to get things work:

gcc g++ python3-dev python3-pip libxml2-dev libxslt1-dev zlib1g-dev

@pombredanne
Copy link
Contributor

FYI, @pombredanne, this is also something that should get solved by the "Project-Multi Python-version dependencies resolver".

This is a league of its own, complexity-wise IMHO. This would best done in a second step

@pombredanne
Copy link
Contributor

pombredanne commented Oct 19, 2021

But in the specific case at hand here, a resolver would work assuming we get this fixed aboutcode-org/scancode-toolkit#2742 to feed it the direct, immediate dependencies parsed and collected from https://github.com/BlueBrain/BluePyOpt/blob/6d4185479bc6dddb3daad84fa27e0b8457d69652/setup.py#L35

@sschuberth sschuberth added question An issue that is actually a question and removed enhancement labels Oct 28, 2021
@sschuberth
Copy link
Member

I'll close this in favor of the more general #4637 as the immediate question has been answered and there is a work-around.

@sschuberth
Copy link
Member

Reopening as #4637 now actually is a epic that refers to this issue.

@sschuberth sschuberth reopened this Oct 12, 2022
@mnonnenmacher
Copy link
Member

I assume the gcc error happens during pip install, so this could be closed as we don't run pip install anymore.

@sschuberth
Copy link
Member

I assume the gcc error happens during pip install, so this could be closed as we don't run pip install anymore.

@alex4200 could you verify this please with the latest ORT version?

@heliocastro
Copy link
Contributor

This happens when a package is not available on specific abi on machine, so it calls wheel module to compile the native "binding".
Even not been used anymore with python-inspector, this could become an issue if we do need specific arch install.
So, in the end we need set a basic devel environment on the executor. Today's docker we don't have gcc enabled on the runner image

@sschuberth
Copy link
Member

checked out with git clone https://github.com/BlueBrain/BluePyOpt.git.

I've verified that this works now with the latest ORT that uses python-inspector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer About the analyzer tool question An issue that is actually a question
Projects
None yet
Development

No branches or pull requests

5 participants