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.

Python3.7: Linker error with Anaconda on Linux

See original GitHub issue

nuitka version

$ nuitka --version
0.6.7
Python: 3.7.6 (default, Jan  8 2020, 19:59:22) 
Executable: /home/ajin_w/anaconda3/envs/compiler_python/bin/python3.7
OS: Linux
Arch: x86_64

my platflam is ubuntu 19.10, not arch

install method: conda install -c conda-forge nuitka

error: I can not compiler the first test example

this is log, I have checked the permissions and can create a file, but I am prompted that the file does not exist

Nuitka:INFO:PASS 1: Nuitka:INFO:Initial optimization pass. Nuitka:INFO:Optimizing module '__main__', 0 more modules to go after that. Nuitka:INFO:Doing module local optimizations for '__main__'. Nuitka:INFO:Next global optimization pass. Nuitka:INFO:Optimizing module '__main__', 0 more modules to go after that. Nuitka:INFO:Doing module local optimizations for '__main__'. Nuitka:INFO:PASS 2 ... : Nuitka:INFO:Next global optimization pass. Nuitka:INFO:Optimizing module '__main__', 0 more modules to go after that. Nuitka:INFO:Doing module local optimizations for '__main__'. Nuitka:INFO:Next global optimization pass. Nuitka:INFO:Optimizing module '__main__', 0 more modules to go after that. Nuitka:INFO:Doing module local optimizations for '__main__'. Nuitka:INFO:Total memory usage before generating C code: 29.66 MB (31100928 bytes): Nuitka:INFO:Total memory usage before running scons: 29.91 MB (31367168 bytes): Scons command: /home/username/anaconda3/envs/compiler_python/bin/python -W ignore /home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/inline_copy/bin/scons.py -f /home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/SingleExe.scons --jobs 4 --warn=no-deprecated --no-site-dir --debug=explain name=hello result_name=/home/username/HelloWorld/hello source_dir=. debug_mode=false python_debug=false unstripped_mode=false module_mode=false full_compat=false experimental= trace_mode=false python_version=3.7 target_arch=x86_64 python_prefix=/home/username/anaconda3/envs/compiler_python nuitka_src=/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build nuitka_cache=/home/username/.cache/Nuitka module_count=2 result_exe=/home/username/HelloWorld/hello.bin static_libpython=true uninstalled_python=true show_scons=true abiflags=m scons: Reading SConscript files ... Scons: Tools= ['default'] Scons: CC 'gcc' version check: Scons: CC 'gcc' version check gives '9' from '9' Scons: Initial CC: gcc Scons: Initial CCVERSION: 9 Scons: Initial CXX: g++ Scons: Initial CXXVERSION: None Scons: Picked compiler: gcc Scons: Picked name: gcc Scons: Using C11 mode: True Scons: Compiler used /usr/bin/gcc Scons: Detecting arch with : ['objdump', '-f', '/home/username/anaconda3/envs/compiler_python/bin/python'] Scons: Using resource mode: code Scons: Told to run compilation on 4 CPUs. Scons: Launching target: ['/home/username/HelloWorld/hello.bin'] scons: done reading SConscript files. scons: Building targets ... scons: building `__constants.o' because it doesn't exist gcc -o __constants.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src __constants.c scons: building `__constants_data.o' because it doesn't exist gcc -o __constants_data.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src __constants_data.c scons: building `__helpers.o' because it doesn't exist gcc -o __helpers.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src __helpers.c scons: building `module.__main__.o' because it doesn't exist gcc -o module.__main__.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src module.__main__.c scons: building `static_src/MainProgram.o' because it doesn't exist gcc -o static_src/MainProgram.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/MainProgram.c scons: building `static_src/CompiledCellType.o' because it doesn't exist gcc -o static_src/CompiledCellType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledCellType.c scons: building `static_src/CompiledFunctionType.o' because it doesn't exist gcc -o static_src/CompiledFunctionType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledFunctionType.c scons: building `static_src/CompiledMethodType.o' because it doesn't exist gcc -o static_src/CompiledMethodType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledMethodType.c scons: building `static_src/CompiledGeneratorType.o' because it doesn't exist gcc -o static_src/CompiledGeneratorType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledGeneratorType.c scons: building `static_src/CompiledCoroutineType.o' because it doesn't exist gcc -o static_src/CompiledCoroutineType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledCoroutineType.c scons: building `static_src/CompiledAsyncgenType.o' because it doesn't exist gcc -o static_src/CompiledAsyncgenType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledAsyncgenType.c scons: building `static_src/CompiledFrameType.o' because it doesn't exist gcc -o static_src/CompiledFrameType.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledFrameType.c scons: building `static_src/CompiledCodeHelpers.o' because it doesn't exist gcc -o static_src/CompiledCodeHelpers.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/CompiledCodeHelpers.c scons: building `static_src/InspectPatcher.o' because it doesn't exist gcc -o static_src/InspectPatcher.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/InspectPatcher.c scons: building `static_src/MetaPathBasedLoader.o' because it doesn't exist gcc -o static_src/MetaPathBasedLoader.o -c -fvisibility=hidden -std=c11 -fwrapv -ftrack-macro-expansion=0 -fpartial-inlining -fno-lto -fno-var-tracking -O3 -pipe -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D_NUITKA_SYSFLAG_OPTIMIZE=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_EXE -I/home/username/anaconda3/envs/compiler_python/include/python3.7m -I. -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/include -I/home/username/anaconda3/envs/compiler_python/lib/python3.7/site-packages/nuitka/build/static_src static_src/MetaPathBasedLoader.c scons: building `/home/username/HelloWorld/hello.bin' because it doesn't exist gcc -o /home/username/HelloWorld/hello.bin -fno-lto -z noexecstack -export-dynamic -s -Wl,-R,'/home/username/anaconda3/envs/compiler_python/lib' -Wl,--disable-new-dtags @"./@sources.tmp" -L/home/username/anaconda3/envs/compiler_python/lib -lm /home/username/anaconda3/envs/compiler_python/lib/libpython3.7m.a -ldl -lpthread -lutil -lrt -lm /usr/bin/ld: /home/username/anaconda3/envs/compiler_python/lib/libpython3.7m.a(main.o): in function `Py_GetArgcArgv': (.text.unlikely.Py_GetArgcArgv+0x0): multiple definition of `Py_GetArgcArgv'; ./static_src/MainProgram.o:MainProgram.c:(.text+0xc0): first defined here collect2: error: ld returned 1 exit status scons: *** [/home/username/HelloWorld/hello.bin] Error 1 scons: building terminated because of errors.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, May 11, 2020

The release 0.6.8 was just made and contains the correction.

0reactions
lxbrasscommented, Mar 13, 2020

Checked with the factory branch:

Compile/link succeeds with nuitka factory branch version 0.6.8rc5, running python 3.7.6 on Linux

root@Ubuntu64TT:~/projects/product/bin# python3.7 ~/Nuitka-factory/bin/nuitka --version 0.6.8rc5 Python: 3.7.6 (default, Mar 6 2020, 18:53:45) Executable: /usr/local/bin/python3.7 OS: Linux Arch: x86_64

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error installing Python 3.7 with Anaconda - Stack Overflow
I tried updating/installing both vc and pip , already being sure that at least pip can't be lacking, and it confirmed, # All...
Read more >
Troubleshooting — Anaconda documentation
The Anaconda installer files are large (over 300 MB), and some users have problems with errors and interrupted downloads when downloading large files....
Read more >
compiler_compat/ld does not work with non-ancient gcc #11152
Actual Behavior On Linux installing the Anaconda distribution for Python 3.7 via the regular installer installs compiler_compat/ld.
Read more >
Installing Anaconda on Linux - Problem Solving with Python
In the Python 3.6 Version* box, right-click on the [64-Bit(x86) Installer] link. Select [copy link address]. Anaconda installation on Linux, Copy the download ......
Read more >
How to Setup Your Python Environment for Machine Learning ...
Conda is fast, simple, it's hard for error messages to hide, and you can quickly confirm your environment is installed and working correctly ......
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