compiling with gcc from conda env
See original GitHub issueHello,
First of thank you for your amazing work with nuitka, can’t wait to the the next improvements !
I’ve had a small issue trying to compile from a conda environnement with nuita. the name of my compiler installed with conda is x86_64-conda-linux-gnu-cc
In nuitka/build/Backend.scons :
I had to change this (line 1075) :
# Tell compiler to create a shared library or program.
if module_mode:
if "gcc" in the_cc_name or "g++" in the_cc_name:
env.Append(CCFLAGS=["-shared"])
elif clang_mode:
pass
elif msvc_mode:
env.Append(CCFLAGS=["/LD"]) # Create a DLL.
else:
assert False, the_cc_name
to that :
# Tell compiler to create a shared library or program.
if module_mode:
if any(val in the_cc_name for val in ("gcc", "g++", "gnu-cc")):
env.Append(CCFLAGS=["-shared"])
elif clang_mode:
pass
elif msvc_mode:
env.Append(CCFLAGS=["/LD"]) # Create a DLL.
else:
assert False, the_cc_name
By the way, running the compilation with clang (installed from conda) worked straight away.
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Conda gcc does not replace system gcc - Stack Overflow
I am trying to compile some code within a Conda environment, where I previously installed the compiler package gcc_linux-64 .
Read more >Anaconda compiler tools — conda-build 3.23.3+5.g16ab6a5b ...
Many build tools such as make and CMake search by default for a compiler named simply gcc , so we set environment variables...
Read more >Gcc - :: Anaconda.org
GNU C native compiler (symlinks). Conda · Files · Labels · Badges ... conda install -c conda-forge gcc conda install -c "conda-forge/label/broken" gcc...
Read more >Compiling code in a Conda environment - IGWN | Computing
To compile packages into a conda environment, it is recommended to install all of the build tools into that environment, including the necessary...
Read more >Conda gcc/g++ did not replace system (linux) gcc - Super User
Those environment variables apply to the anaconda version of gcc whereas you are using the system gcc located at /usr/bin/gcc .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nuitka already has this:
Seems this is a place it’s not yet used.
This is part of the 0.6.17 release.