Hi all,
I've been trying to build graph-tool on my Mac (10.7.2) for the past few days. The issues occur with graph-tool-2.2.15 (though I've also had issues with the lastest code from github). At this point I have reached a bit of a dead end. Looking at what I posted below, does anyone have any suggestions?? Many thanks!!
Jesse
Here is my configure command:
./configure --enable-openmp --with-boost-python=boost_python_mt --with-numpy=/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/numpy --with-scipy=/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/scipy LDFLAGS=-L/opt/local/lib CXXFLAGS="-I/opt/local/include"
The additional args stem from the fact that I'm using the Enthought python distribution and macports, both of which put stuff in non-standard places it seems. The graph-tool build error is related to boost, which I installed using macports (version 1.47) . So I doubt my problems have to do with Enthought.
Now, here's the compiler/make output:
jberwald@hyperion:~/src/graph-tool-2.2.15$ make make all-recursive Making all in src Making all in graph Making all in centrality CXX graph_betweenness.lo CXX graph_centrality_bind.lo CXX graph_eigentrust.lo CXX graph_eigenvector.lo CXX graph_pagerank.lo CXX graph_trust_transitivity.lo CXXLD libgraph_tool_centrality.la Making all in clustering CXX graph_clustering.lo CXX graph_extended_clustering.lo CXX graph_motifs.lo graph_motifs.hh: In member function 'void graph_tool::get_all_motifs::operator()(Graph&, size_t, boost::any&, std::vector<long unsigned int, std::allocator<long unsigned int> >&, Sampler, double, bool, bool, graph_tool::rng_t&) const [with Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::property<boost::edge_index_t, long unsigned int, boost::no_property>, boost::no_property, boost::listS>, Sampler = graph_tool::sample_all]': graph_motifs.hh:415: internal compiler error: in lower_stmt, at gimple-low.c:319 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions. make[4]: *** [graph_motifs.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Also, I attempted to install from macports originally. But macports tells me the following:
Error: Cannot install py27-graph-tool for the arch(s) 'i386 x86_64' because
Error: its dependency py27-scipy does not build for the required arch(s) by default Error: and does not have a universal variant. Error: Unable to execute port: architecture mismatch
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hi Jesse,
On 11/27/2011 05:44 PM, jesse berwald wrote:
Here is my configure command:
./configure --enable-openmp --with-boost-python=boost_python_mt --with-numpy=/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/numpy --with-scipy=/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/scipy LDFLAGS=-L/opt/local/lib CXXFLAGS="-I/opt/local/include"
[...]
graph_motifs.hh:415: internal compiler error: in lower_stmt, at gimple-low.c:319 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions.
An internal compiler error is always a bug in the compiler... This was caused because apple's GCC has broken support for OpenMP. Try again with the --disable-openmp option, and it should work.
Also, I attempted to install from macports originally. But macports tells me the following:
Error: Cannot install py27-graph-tool for the arch(s) 'i386 x86_64' because
Error: its dependency py27-scipy does not build for the required arch(s) by default Error: and does not have a universal variant. Error: Unable to execute port: architecture mismatch
It would be nice to submit a bug report to the macports people about this. Maybe they can fix the scipy portfile to allow an universal build. You can file a bug report here: https://trac.macports.org/report
Cheers, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
Disabling openmp worked. Thanks. Unfortunately, there are still architecture issues. After installing ("make install"), the following error occurred when attempting to import graph-tool:
>
In [1]: import graph_tool --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /Users/jberwald/<ipython-input-1-233a11917947> in <module>() ----> 1 import graph_tool
/usr/local/lib/python2.7/site-packages/graph_tool/__init__.py in <module>() 90 91 from dl_import import * ---> 92 dl_import("import libgraph_tool_core as libcore") 93 import libgraph_tool_core as libcore # for pylint 94 __version__ = libcore.mod_info().version
/usr/local/lib/python2.7/site-packages/graph_tool/dl_import.pyc in dl_import(import_expr) 44 sys.setdlopenflags(RTLD_LAZY | RTLD_GLOBAL) 45 ---> 46 exec import_expr in local_dict, global_dict 47 48 sys.setdlopenflags(orig_dlopen_flags) # reset it to normal case to avoid
/Users/jberwald/<string> in <module>()
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so, 9): no suitable image found. Did find: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so: mach-o, but wrong architecture
>
These architecture issues on Mac are mystifying to me. How can something be built for the wrong architecture if I just compiled it for that architecture? sigh... Thanks any help you can provide.
Jesse
ps--I've submitted a bug report at macports concerning the scipy universal build problems.
On Sun, Nov 27, 2011 at 12:37 PM, Tiago Peixoto [via Main discussion list for the graph-tool project] ml-node+s982480n3540418h97@n3.nabble.comwrote:
Hi Jesse,
On 11/27/2011 05:44 PM, jesse berwald wrote:
Here is my configure command:
./configure --enable-openmp --with-boost-python=boost_python_mt
--with-numpy=/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/numpy
--with-scipy=/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/scipy
LDFLAGS=-L/opt/local/lib CXXFLAGS="-I/opt/local/include"
[...]
graph_motifs.hh:415: internal compiler error: in lower_stmt, at gimple-low.c:319 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://developer.apple.com/bugreporter for instructions.
An internal compiler error is always a bug in the compiler... This was caused because apple's GCC has broken support for OpenMP. Try again with the --disable-openmp option, and it should work.
Also, I attempted to install from macports originally. But macports
tells me
the following:
Error: Cannot install py27-graph-tool for the arch(s) 'i386 x86_64'
because
Error: its dependency py27-scipy does not build for the required arch(s) by default Error: and does not have a universal variant. Error: Unable to execute port: architecture mismatch
It would be nice to submit a bug report to the macports people about this. Maybe they can fix the scipy portfile to allow an universal build. You can file a bug report here: https://trac.macports.org/report
Cheers, Tiago
-- Tiago de Paula Peixoto <[hidden email]http://user/SendEmail.jtp?type=node&node=3540418&i=0>
graph-tool mailing list [hidden email] http://user/SendEmail.jtp?type=node&node=3540418&i=1 http://lists.skewed.de/mailman/listinfo/graph-tool
*signature.asc* (270 bytes) Download Attachmenthttp://attachment/3540418/0/signature.asc
Tiago de Paula Peixoto tiago@skewed.de
If you reply to this email, your message will be added to the discussion below:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... To unsubscribe from boost errors building on Mac OSX, click herehttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3540332&code=amJlcndhbGRAZ21haWwuY29tfDM1NDAzMzJ8MjE1NDAwNjg= . NAMLhttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so, 9): no suitable image found. Did find: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so: mach-o, but wrong architecture
>>
These architecture issues on Mac are mystifying to me. How can something be built for the wrong architecture if I just compiled it for that architecture? sigh... Thanks any help you can provide.
I have very little experience with building stuff with multiple architectures with apple's GCC, but according to the documentation you should pass something like "-arch i386 -arch x86_64" to the compiler to generate "universal" binaries. From the ./configure command you sent in the first email, it did not seem you passed this. Hence you should try something like:
./configure CXXFLAGS="-arch i386 -arch x86_64 -I/opt/local/include" <..your other options..>
I hope it helps.
Cheers, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
Thank you. I too have very little experience with Mac's multiple architecture concept. (This would have been done days ago in Linux. argh!) Sadly, the plot thickens. After including the two -arch flags and running configure, the compiler gets tripped up immediately. It appears that multiple architectures are not supports with many compiler options(?):
make all-recursive Making all in src Making all in graph Making all in centrality CXX graph_betweenness.lo llvm-g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags make[4]: *** [graph_betweenness.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Jesse
On Sun, Nov 27, 2011 at 3:44 PM, Tiago Peixoto [via Main discussion list for the graph-tool project] ml-node+s982480n3540762h61@n3.nabble.comwrote:
ImportError:
dlopen(/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so, 9): no suitable image found. Did find:
/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so:
mach-o, but wrong architecture
>>>
These architecture issues on Mac are mystifying to me. How can something be built for the wrong architecture if I just compiled it for that architecture? sigh... Thanks any help you can provide.
I have very little experience with building stuff with multiple architectures with apple's GCC, but according to the documentation you should pass something like "-arch i386 -arch x86_64" to the compiler to generate "universal" binaries. From the ./configure command you sent in the first email, it did not seem you passed this. Hence you should try something like:
./configure CXXFLAGS="-arch i386 -arch x86_64 -I/opt/local/include"
<..your other options..>
I hope it helps.
Cheers, Tiago
-- Tiago de Paula Peixoto <[hidden email]http://user/SendEmail.jtp?type=node&node=3540762&i=0>
graph-tool mailing list [hidden email] http://user/SendEmail.jtp?type=node&node=3540762&i=1 http://lists.skewed.de/mailman/listinfo/graph-tool
*signature.asc* (566 bytes) Download Attachmenthttp://attachment/3540762/0/signature.asc
Tiago de Paula Peixoto tiago@skewed.de
If you reply to this email, your message will be added to the discussion below:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... To unsubscribe from boost errors building on Mac OSX, click herehttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3540332&code=amJlcndhbGRAZ21haWwuY29tfDM1NDAzMzJ8MjE1NDAwNjg= . NAMLhttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 11/27/2011 10:01 PM, jesse berwald wrote:
CXX graph_betweenness.lo llvm-g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags make[4]: *** [graph_betweenness.lo] Error 1
I'm stumped on this... I'd have to investigate further. But I notice you are using llvm-g++. Maybe you should try the regular (non-llvm) g++?
I noticed that gcc 4.4 is required for compilation. I know that Mac likes to tweak gcc. Does this mean that llvm-g++-4.2 is too old? I could install the normal version of gcc4.6 which is the latest in macports.
Apple's GCC version 4.2 without OpenMP compiles graph-tool without a problem. Of course, FSF's "stock" gcc from macports compiles it as well, but for some reason things which are compiled with it do not work well with the rest of the system compiled with Apple's GCC (strange segfaults, etc)... Just one of the very many MacOS annoying peculiarities.
Cheers, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
Macports has "resolved" the bug with scipy-universal built. Unfortunately, scipy is compiled with compilers that cannot produce universal variants. I figure my next step will be to either a) make sure everything python is compiled for 64-bit; or b) switch back to linux and get it working in 5 minutes. sigh...
thanks for your help, Jesse
On Sun, Nov 27, 2011 at 4:35 PM, Tiago Peixoto [via Main discussion list for the graph-tool project] ml-node+s982480n3540848h27@n3.nabble.comwrote:
On 11/27/2011 10:01 PM, jesse berwald wrote:
CXX graph_betweenness.lo llvm-g++-4.2: -E, -S, -save-temps and -M options are not allowed with
multiple -arch flags
make[4]: *** [graph_betweenness.lo] Error 1
I'm stumped on this... I'd have to investigate further. But I notice you are using llvm-g++. Maybe you should try the regular (non-llvm) g++?
I noticed that gcc 4.4 is required for compilation. I know that Mac likes to tweak gcc. Does this mean that llvm-g++-4.2 is too old? I could install the normal version of gcc4.6 which is the latest in macports.
Apple's GCC version 4.2 without OpenMP compiles graph-tool without a problem. Of course, FSF's "stock" gcc from macports compiles it as well, but for some reason things which are compiled with it do not work well with the rest of the system compiled with Apple's GCC (strange segfaults, etc)... Just one of the very many MacOS annoying peculiarities.
Cheers, Tiago
-- Tiago de Paula Peixoto <[hidden email]http://user/SendEmail.jtp?type=node&node=3540848&i=0>
graph-tool mailing list [hidden email] http://user/SendEmail.jtp?type=node&node=3540848&i=1 http://lists.skewed.de/mailman/listinfo/graph-tool
*signature.asc* (566 bytes) Download Attachmenthttp://attachment/3540848/0/signature.asc
Tiago de Paula Peixoto tiago@skewed.de
If you reply to this email, your message will be added to the discussion below:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... To unsubscribe from boost errors building on Mac OSX, click herehttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3540332&code=amJlcndhbGRAZ21haWwuY29tfDM1NDAzMzJ8MjE1NDAwNjg= . NAMLhttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
hi,
You can build a universal scipy fairly easily with macports- look at the attachments on
https://trac.macports.org/ticket/19397
It's a mystery to me why macports doesn't include these patches to have scipy build universal, but the patches work just fine for me…
With regards to your issue with compiling for multiple archs (save-temps and -M options)- you might try passing "--disable-dependency-tracking" to the configure script.
On Mon, Nov 28, 2011 at 3:12 PM, jesse berwald jberwald@gmail.com wrote:
Macports has "resolved" the bug with scipy-universal built. Unfortunately, scipy is compiled with compilers that cannot produce universal variants. I figure my next step will be to either a) make sure everything python is compiled for 64-bit; or b) switch back to linux and get it working in 5 minutes. sigh...
thanks for your help, Jesse
On Sun, Nov 27, 2011 at 4:35 PM, Tiago Peixoto [via Main discussion list for the graph-tool project] <[hidden email]http://user/SendEmail.jtp?type=node&node=3542447&i=0
wrote:
On 11/27/2011 10:01 PM, jesse berwald wrote:
CXX graph_betweenness.lo llvm-g++-4.2: -E, -S, -save-temps and -M options are not allowed with
multiple -arch flags
make[4]: *** [graph_betweenness.lo] Error 1
I'm stumped on this... I'd have to investigate further. But I notice you are using llvm-g++. Maybe you should try the regular (non-llvm) g++?
I noticed that gcc 4.4 is required for compilation. I know that Mac likes to tweak gcc. Does this mean that llvm-g++-4.2 is too old? I could install the normal version of gcc4.6 which is the latest in macports.
Apple's GCC version 4.2 without OpenMP compiles graph-tool without a problem. Of course, FSF's "stock" gcc from macports compiles it as well, but for some reason things which are compiled with it do not work well with the rest of the system compiled with Apple's GCC (strange segfaults, etc)... Just one of the very many MacOS annoying peculiarities.
Cheers, Tiago
-- Tiago de Paula Peixoto <[hidden email]http://user/SendEmail.jtp?type=node&node=3540848&i=0>
graph-tool mailing list [hidden email] http://user/SendEmail.jtp?type=node&node=3540848&i=1 http://lists.skewed.de/mailman/listinfo/graph-tool
*signature.asc* (566 bytes) Download Attachmenthttp://attachment/3540848/0/signature.asc
Tiago de Paula Peixoto <[hidden email]http://user/SendEmail.jtp?type=node&node=3542447&i=1
If you reply to this email, your message will be added to the discussion below:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... To unsubscribe from boost errors building on Mac OSX, click here. NAMLhttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
View this message in context: Re: boost errors building on Mac OSXhttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/boost-errors-building-on-Mac-OSX-tp3540332p3542447.html Sent from the Main discussion list for the graph-tool project mailing list archivehttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/at Nabble.com.
graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
I noticed that gcc 4.4 is required for compilation. I know that Mac likes to tweak gcc. Does this mean that llvm-g++-4.2 is too old? I could install the normal version of gcc4.6 which is the latest in macports.
On Sun, Nov 27, 2011 at 4:00 PM, Jesse Berwald jberwald@gmail.com wrote:
Thank you. I too have very little experience with Mac's multiple architecture concept. (This would have been done days ago in Linux. argh!) Sadly, the plot thickens. After including the two -arch flags and running configure, the compiler gets tripped up immediately. It appears that multiple architectures are not supports with many compiler options(?):
make all-recursive Making all in src Making all in graph Making all in centrality CXX graph_betweenness.lo llvm-g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags make[4]: *** [graph_betweenness.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Jesse
On Sun, Nov 27, 2011 at 3:44 PM, Tiago Peixoto [via Main discussion list for the graph-tool project] ml-node+s982480n3540762h61@n3.nabble.comwrote:
ImportError:
dlopen(/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so, 9): no suitable image found. Did find:
/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so: mach-o, but wrong architecture
>>>>
These architecture issues on Mac are mystifying to me. How can something be built for the wrong architecture if I just compiled it for that architecture? sigh... Thanks any help you can provide.
I have very little experience with building stuff with multiple architectures with apple's GCC, but according to the documentation you should pass something like "-arch i386 -arch x86_64" to the compiler to generate "universal" binaries. From the ./configure command you sent in the first email, it did not seem you passed this. Hence you should try something like:
./configure CXXFLAGS="-arch i386 -arch x86_64 -I/opt/local/include"
<..your other options..>
I hope it helps.
Cheers, Tiago
-- Tiago de Paula Peixoto <[hidden email]http://user/SendEmail.jtp?type=node&node=3540762&i=0>
graph-tool mailing list [hidden email] http://user/SendEmail.jtp?type=node&node=3540762&i=1 http://lists.skewed.de/mailman/listinfo/graph-tool
*signature.asc* (566 bytes) Download Attachmenthttp://attachment/3540762/0/signature.asc
Tiago de Paula Peixoto tiago@skewed.de
If you reply to this email, your message will be added to the discussion below:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... To unsubscribe from boost errors building on Mac OSX, click herehttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3540332&code=amJlcndhbGRAZ21haWwuY29tfDM1NDAzMzJ8MjE1NDAwNjg= . NAMLhttp://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.