9

In jenkins output I am getting the following errors. Is this a problem or can it be silenced?

profiling:/opt/Python-3.6.1/Python/structmember.gcda:Cannot open
profiling:/opt/Python-3.6.1/Python/getcompiler.gcda:Cannot open
profiling:/opt/Python-3.6.1/Objects/odictobject.gcda:Cannot open
profiling:/opt/Python-3.6.1/Objects/enumobject.gcda:Cannot open
profiling:/opt/Python-3.6.1/Objects/descrobject.gcda:Cannot open
profiling:/opt/Python-3.6.1/Objects/cellobject.gcda:Cannot open
profiling:/opt/Python-3.6.1/Objects/bytes_methods.gcda:Cannot open
profiling:/opt/Python-3.6.1/Objects/accu.gcda:Cannot open
profiling:/opt/Python-3.6.1/Parser/myreadline.gcda:Cannot open
profiling:/opt/Python-3.6.1/Parser/parser.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/xxsubtype.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/symtablemodule.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/zipimport.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/stringio.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/textio.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/bufferedio.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/bytesio.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/fileio.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/iobase.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/_iomodule.gcda:Cannot open
profiling:/opt/Python-3.6.1/Modules/_localemodule.gcda:Cannot open

I built python from source on the debian 8 server.

1
  • Is virtualenv installed from the Debian repositories, or was it installed with the new pip that came along with your freshly built Python? Commented Dec 2, 2017 at 22:04

3 Answers 3

10

I fixed this issue by doing change owner. I was setting up homeassistant using Python 3.6.3 build using ./configure --enable-optimizations. From my virtual env i got these errors but fixed them doing: from su / root account

sudo chown -R homeassistant:homeassistant /home/pi/Python-3.6.3

I thought maybe it could help other people ;) Have a nice day! Ciao!

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

Comments

9

This happened to me when I did ./configure --enable-optimizations. If you remove --enable-optimizations, compile and install it again - these messages are not shown anymore.

To sum things up, here's an example with a fresh version of Python:

wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
tar xvf Python-3.6.3.tgz
cd Python-3.6.3
./configure
make
sudo make altinstall
python3.6

4 Comments

Any idea on how to solve this problem and keep optimizations enabled?
Unfortunately I have no other feedback about this matter. The solution was good enough in that particular case, so there was no incentive to keep digging. Perhaps you can use a Docker image for a specific version you need?
I will try docker, seems like the best option
Removing --enable-optimizations is not a great idea, see my full answer below.
9

The gcda files are gcc profiling records, which are used for seeing which functions the CPU spent most of its time in. This tells you where you can get the most bang for your buck, when optimising the code.

You can retain the Python code opinisations, but not have the profiling, by using the configuration options --enable-optimizations --disable-profiling. Well, worked for me.

As the configure script will tell you, if you do not have the --enable-optimizations you will lose out on the best performance.

You are probably getting gcda files because you interrupted the Python build part-way through. When you run with --enable-optimizations the Python build run in three phases

  • Builds the code
  • Runs all the test modules to profile the code
  • Re-compiles the code to optimise it based on the profiling

It pretty common to think the test phase is just to check the code is working correctly, as this is what it looks like it is doing, but be patient and leave it and it will compile again, the second time omitting the profiling.

So, its better to compile with --enable-optimizations and without --disable-profiling and just wait, as you should get better code that way.

1 Comment

the damn thing freezes up due to known bugs in files like test_ssl (3.6) and test_faulthandler (3.7) - the recommendation should be to skip the tests as many of them are broken in various versions. Go straight to sudo make altinstall. Not a fan of python - the only reason I'm trying to install 3.7 is there's a bug in pyinstaller that breaks in in >3.8

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.