question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Anaconda static libpython is no more compatible, error: "libpython3.9.a: error adding symbols: File format not recognized"

See original GitHub issue

Nuitka version:

0.7.7
Commercial: None
Python: 3.9.7 (default, Sep 16 2021, 13:09:58) 
Flavor: Anaconda Python
Executable: /home/tac/miniconda3/envs/normal/bin/python
OS: Linux
Arch: x86_64
Distribution: Ubuntu (based on Debian) 18.04.6

target a.py:

print("hello world!")

nuitka command:

nuitka a.py

error output:

Nuitka-Options:INFO: Used command line options: a.py
Nuitka-Options:WARNING: You did not specify to follow or include anything but main program. Check options and make sure that is intended.
Nuitka:INFO: Starting Python compilation with Nuitka '0.7.7' on Python '3.9' commercial None.
Nuitka:INFO: Completed Python level compilation and optimization.               
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.    
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc).
Nuitka-Scons:INFO: Backend linking program (no progress information available). 
/usr/bin/ld: /home/tac/miniconda3/envs/normal/lib/libpython3.9.a(abstract.o): unable to initialize decompress status for section .debug_info
/usr/bin/ld: /home/tac/miniconda3/envs/normal/lib/libpython3.9.a(abstract.o): unable to initialize decompress status for section .debug_info
/home/tac/miniconda3/envs/normal/lib/libpython3.9.a: error adding symbols: File format not recognized
collect2: error: ld returned 1 exit status

I’ve install libpython-static via command conda install -c conda-forge libpython-static

question

Which part lead to this problem? I know adding an argument can skip this libpython part. But what if I want this feature enabled?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
Jackiexiaocommented, Jun 28, 2022

yep, the easiest way to upgrade gcc in anaconda is

conda install gcc_linux-64

the installed gcc is named x86_64-conda-linux-gnu-gcc, check gcc version using

x86_64-conda-linux-gnu-gcc --version
0reactions
kayhayencommented, Aug 30, 2022

What does --version output for you with these?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cython error: C:\Python27\libs/libpython27.a: error adding ...
If tools gendef and dlltool are installed, the following should be possible in a temporary directory (assuming msys or cygwin environment):
Read more >
usr/local/cuda/lib64/libcudnn.so: error adding symbols: File ...
Hi,. Since CUDA 9.0 is a relatively old library, would you mind upgrading your device to our latest software first?
Read more >
Changelog — Python 3.11.1 documentation
gh-97612: Fix a shell code injection vulnerability in the get-remote-certificate.py example script. The script no longer uses a shell to run openssl commands....
Read more >
Python Bindings: Calling C or C++ From Python
What are Python bindings? Should you use ctypes, CFFI, or a different tool? In this step-by-step tutorial, you'll get an overview of some...
Read more >
PyInstaller Documentation
is not compatible with a PyInstaller one-file bundle. It needs to execute code ... Error messages from Python and default logging output also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found