osx - 在anaconda中编译图形工具时未检测到C ++ 14编译器,多个版本的gcc [英] osx - C++14 compiler not detected, multiple versions of gcc when compiling graph-tool in anaconda

查看:373
本文介绍了osx - 在anaconda中编译图形工具时未检测到C ++ 14编译器,多个版本的gcc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的最终目标是让Python包 graph_tool 在我的系统上运行,如果可能的话也运行在ipynb上。我已经 brew install graph-tool 如此处所示,但仍然不足。 因此,我遵循 conda instructions here ,我做出了不错的进展,直到遇到配置问题。

  $ conda创建-n py36env python = 3.6.3 anaconda 
(py36env)$ conda install -c conda-forge cgal
...和其他所需的库

(py36env)Tams-MacBook-Pro:graph-tool-2.25 tamtam $ ./configure --prefix = / Users / tamtam / anaconda3 / envs / py36env / --with-python-module-path = / Users / tamtam / anaconda3 / envs / py36env / lib / python3.6 / site-packages



检查g ++默认是否支持C ++ 14的功能... no
检查g ++是否支持C ++ 14的功能-std = gnu ++ 14 ... no
检查是否g ++支持C ++ 14特性,其中-std = gnu ++ 1y ... no
configure:error:***需要支持C ++ 14语言功能的编译器。

我不太熟悉编译器的东西,但我检查我的系统,如下所示:

 (py36env)Tams-MacBook-Pro:graph-tool-2.25 tamtam $ conda list | grep gcc 
gcc 4.8.5 8

在conda env之外:

  $ gcc -v 
使用内置规格。
COLLECT_GCC = gcc
COLLECT_LTO_WRAPPER = / Users / tamtam / anaconda3 / envs / py36env / bin /../ libexec / gcc / x86_64 -app-darwin11.4.2 / 4.8.5 / lto-wrapper
目标:x86_64-apple-darwin11.4.2
配置为:./configure --prefix = / Users / ray / mc-x64-3.5 / conda-bld / gcc-4.8_1477649012852 /
主题模型:posix
gcc版本4.8.5(GCC)

与Homebrew

  $ brew list --versions | grep gcc 
gcc 7.1.0 7.2.0
$ / usr / local / bin / gcc-7 --version
gcc-7(Homebrew GCC 7.2.0)7.2.0
$ echo $ PATH
/ Users / tamtam / anaconda3 / bin:/ Users / tamtam / anaconda / bin:/ usr / local / bin:/ usr / bin:/ bin:/ usr / sbin:/ sbin :/ Library / TeX / texbin



是:EDITS INCLUDED

1) conda gcc 4.8.5 Homebrew gcc 7.2 在我的系统上?我很困惑,因为它们都是最新的软件包。

编辑:无处在线,我明白指出这一点,但我的理解(aka受教育的猜测bc它是凌晨3点,我需要睡眠) conda gcc 4.8.5 只是相当于 brew gcc 4.8.5 ,并且Anaconda仅仅是在开发一个支持C ++ 14的'官方'gcc。与此同时,我 conda install -c salford_systems gcc-5 ./configure 似乎发现自己是C ++ 14编译器。 YAY(但是这也导致我出现了一个新的问题TBA)

注意:我也曾尝试运行 ./configure 文件,其中 conda gcc 4.8.5 brew gcc 7.2.0 (切换默认gcc编译器在此处引导),但仍然存在<$ $的相同错误c $ c> ./configure 找不到C ++ 14编译(所以忽略)




2)我也是有Xcode 8.3.3,也带有铿锵声,这是什么海湾合作委员会symlinked ... ... ??不知道关于设置/关系




3)如何调整我的系统(例如路径),以便配置过程检测到C ++ 14编译器?编辑:解决方案1)
解决方案

。)

4.8.5 只相当于 brew gcc 4.8.5 ,而Anaconda只是在开发一个支持C的'官方'gcc ++ 14。与此同时,我 conda install -c salford_systems gcc-5 ./configure 似乎发现自己是C ++ 14编译器。 YAY(但这也导致我​​一个新问题



注意:我也尝试运行 ./configure 文件,其中 conda gcc 4.8.5 brew gcc 7.2.0 (切换默认gcc编译器在这里引导),但仍然出现 ./configure 没有找到C ++ 14编译出现(所以忽略这一点)


My ultimate goal is to get python package graph_tool working on my system and also on ipynb if possible. I have already brew install graph-tool, as indicated here, but that's still insufficient.

So I follow conda instructions here, and I make decent progress, until I encounter a compiler issue with the configuration.

$ conda create -n py36env python=3.6.3 anaconda
(py36env) $ conda install -c conda-forge cgal 
... and so forth with the other required libraries

(py36env) Tams-MacBook-Pro:graph-tool-2.25 tamtam$ ./configure --prefix=/Users/tamtam/anaconda3/envs/py36env/ --with-python-module-path=/Users/tamtam/anaconda3/envs/py36env/lib/python3.6/site-packages
.
.
.
checking whether g++ supports C++14 features by default... no
checking whether g++ supports C++14 features with -std=gnu++14... no
checking whether g++ supports C++14 features with -std=gnu++1y... no
configure: error: *** A compiler with support for C++14 language features is required.

I'm not very familiar with compiler things, but I check my system as follows:

(py36env) Tams-MacBook-Pro:graph-tool-2.25 tamtam$ conda list | grep gcc
gcc                       4.8.5                         8

And outside of the conda env:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Users/tamtam/anaconda3/envs/py36env/bin/../libexec/gcc/x86_64-apple-darwin11.4.2/4.8.5/lto-wrapper
Target: x86_64-apple-darwin11.4.2
Configured with: ./configure --prefix=/Users/ray/mc-x64-3.5/conda-bld/gcc-4.8_1477649012852/
Thread model: posix
gcc version 4.8.5 (GCC)

And with Homebrew

$ brew list --versions | grep gcc
gcc 7.1.0 7.2.0
$ /usr/local/bin/gcc-7 --version
gcc-7 (Homebrew GCC 7.2.0) 7.2.0
$ echo $PATH
/Users/tamtam/anaconda3/bin:/Users/tamtam/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin


So my questions are: EDITS INCLUDED
1) What's the difference between the conda gcc 4.8.5 and Homebrew gcc 7.2 on my system? I'm confused because they're each up-to-date packages.
EDIT: Nowhere online that I perused explicitly states this, but I am understanding (aka educated guess bc it's 3am and I need sleep) conda gcc 4.8.5 to just be equivalent to brew gcc 4.8.5, and that Anaconda is just way behind on developing an 'official' gcc supporting C++14. In the meantime I conda install -c salford_systems gcc-5 and ./configure seems to find itself a C++14 compiler. YAY (but this also led me to a new problem T.B.A.)
NOTE: I had also tried running the ./configure file with both conda gcc 4.8.5 and brew gcc 7.2.0 (switching of default gcc compiler guided here), but still same error of ./configure not finding C++14 compile (so ignore this)

2) I also have Xcode 8.3.3 that also comes with clang, which is what gcc is symlinked to... ?? No idea about the setup/relation

3) How can I adjust my system (for example, paths) so that the configuration process will detect a C++14 compiler? EDIT: resolved per 1)

解决方案

(This solution is also included within the edits at the bottom of my question.)

Nowhere online that I perused explicitly states this, but I am understanding (aka educated guess bc it's 3am and I need sleep) conda gcc 4.8.5 to just be equivalent to brew gcc 4.8.5, and that Anaconda is just way behind on developing an 'official' gcc supporting C++14. In the meantime I conda install -c salford_systems gcc-5 and ./configure seems to find itself a C++14 compiler. YAY (but this also led me to a new problem)

NOTE: I had also tried running the ./configure file with both conda gcc 4.8.5 and brew gcc 7.2.0 (switching of default gcc compiler guided here), but still same error of ./configure not finding C++14 compile arises (so ignore this)

这篇关于osx - 在anaconda中编译图形工具时未检测到C ++ 14编译器,多个版本的gcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆