[Networkit] Building Networkit on MacOSX Yosemite 10.10.2

Christian Staudt christian.staudt at kit.edu
Fri Mar 27 15:21:32 CET 2015


Don’t know if it has something to do with your problem, but I wonder why you call 

	python3 setup.py build_ext —inplace

instead of
	python3 setup.py develop
or
	python3 setup.py install
or 
	pip3 install -e ~/workspace/NetworKit

Why do you want to build the extension module in a separate step rather than just installing the module?
Chris


On 27 Mar 2015, at 15:14, Arlind Nocaj <arlind.nocaj at uni-konstanz.de> wrote:

> Unfortunately not.
> I added the build.conf with the suggested entry, but it seems that still clang is used according to the output below.
> 
> I also tried to make an alias for g++ and so on to redirect to g++-4.8 but still I get the output below. Do I have to add an option such that build.conf is considered by the python script?
> 
> wl-2322:NetworKit ...$ python3 setup.py build_ext --inplace
> running build_ext
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/Globals.o networkit/cpp/Globals.cpp
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/AdjacencyMatrix.o networkit/cpp/algebraic/AdjacencyMatrix.cpp
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/IncidenceMatrix.o networkit/cpp/algebraic/IncidenceMatrix.cpp
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/LaplacianMatrix.o networkit/cpp/algebraic/LaplacianMatrix.cpp
> clang: warning: argument unused during compilation: '-fopenmp'
> clang: warning: argument unused during compilation: '-fopenmp'
> clang: warning: argument unused during compilation: '-fopenmp'
> clang: warning: argument unused during compilation: '-fopenmp'
> In file included from networkit/cpp/Globals.cpp:8:
> networkit/cpp/Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> In file included from networkit/cpp/algebraic/IncidenceMatrix.cpp:8:
> In file included from networkit/cpp/algebraic/IncidenceMatrix.h:11:
> In file included from networkit/cpp/algebraic/../graph/Graph.h:19:
> networkit/cpp/algebraic/../graph/../Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/algebraic/../graph/../Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> In file included from networkit/cpp/algebraic/AdjacencyMatrix.cpp:8:
> In file included from networkit/cpp/algebraic/AdjacencyMatrix.h:11:
> In file included from networkit/cpp/algebraic/Matrix.h:11:
> In file included from networkit/cpp/algebraic/../graph/Graph.h:19:
> networkit/cpp/algebraic/../graph/../Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/algebraic/../graph/../Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> 1 error generated.
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/Matrix.o networkit/cpp/algebraic/Matrix.cpp
> compilation of a file went wrong, exiting...
> clang: warning: argument unused during compilation: '-fopenmp'
> In file included from networkit/cpp/algebraic/LaplacianMatrix.cpp:8:
> In file included from networkit/cpp/algebraic/LaplacianMatrix.h:11:
> In file included from networkit/cpp/algebraic/Matrix.h:11:
> In file included from networkit/cpp/algebraic/../graph/Graph.h:19:
> networkit/cpp/algebraic/../graph/../Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/algebraic/../graph/../Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> 1 error generated.
> 1 error generated.
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/NormalizedLaplacianMatrix.o networkit/cpp/algebraic/NormalizedLaplacianMatrix.cpp
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/Vector.o networkit/cpp/algebraic/Vector.cpp
> clang: warning: argument unused during compilation: '-fopenmp'
> 1 error generated.
> clang: warning: argument unused during compilation: '-fopenmp'
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/Log.o networkit/cpp/auxiliary/Log.cpp
> clang: warning: argument unused during compilation: '-fopenmp'
> In file included from networkit/cpp/algebraic/Matrix.cpp:8:
> In file included from networkit/cpp/algebraic/Matrix.h:11:
> In file included from networkit/cpp/algebraic/../graph/Graph.h:19:
> networkit/cpp/algebraic/../graph/../Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/algebraic/../graph/../Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> networkit/cpp/algebraic/Matrix.cpp:81:8: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>         if (i < 0 || i >= numberOfRows()) {
>             ~ ^ ~
> networkit/cpp/algebraic/Matrix.cpp:83:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>         } else if (j< 0 || j >= numberOfColumns()) {
>                    ~^ ~
> networkit/cpp/algebraic/Matrix.cpp:91:8: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>         if (i < 0 || i >= numberOfRows()) {
>             ~ ^ ~
> networkit/cpp/algebraic/Matrix.cpp:94:14: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>         } else if (j< 0 || j >= numberOfColumns()) {
>                    ~^ ~
> networkit/cpp/algebraic/Matrix.cpp:103:8: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>         if (i < 0 || i >= numberOfRows()) {
>             ~ ^ ~
> networkit/cpp/algebraic/Matrix.cpp:116:8: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
>         if (j < 0 || j >= numberOfColumns()) {
>             ~ ^ ~
> In file included from networkit/cpp/algebraic/NormalizedLaplacianMatrix.cpp:8:
> In file included from networkit/cpp/algebraic/NormalizedLaplacianMatrix.h:11:
> In file included from networkit/cpp/algebraic/Matrix.h:11:
> In file included from networkit/cpp/algebraic/../graph/Graph.h:19:
> networkit/cpp/algebraic/../graph/../Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/algebraic/../graph/../Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> In file included from networkit/cpp/algebraic/Vector.cpp:8:
> In file included from networkit/cpp/algebraic/Vector.h:12:
> networkit/cpp/algebraic/../Globals.h:37:18: error: constexpr variable 'PI' must be initialized by a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                  ^    ~~~~~~~~~~~~~~~~
> networkit/cpp/algebraic/../Globals.h:37:27: note: non-constexpr function 'acos<int>' cannot be used in a constant expression
> constexpr double PI = 2.0*std::acos(0);
>                           ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:686:1: note: declared here
> acos(_A1 __x) _NOEXCEPT {return acos((double)__x);}
> ^
> 6 warnings and 1 error generated.
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/Noise.o networkit/cpp/auxiliary/Noise.cpp
> clang: warning: argument unused during compilation: '-fopenmp'
> g++ -c -std=c++11 -Wall -fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO -o.buildOpt/NumericTools.o networkit/cpp/auxiliary/NumericTools.cpp
> clang: warning: argument unused during compilation: '-fopenmp'
> 1 error generated.
> 1 error generated.
> 
> 2015-03-27 14:34 GMT+01:00 Christian Staudt <christian.staudt at kit.edu>:
> Hi Arlind,
> under OSX, clang is the default compiler and g++ is an alias for clang. NetworKit currently does not build with clang. 
> 
> My build.conf file under OSX therefore contains the following lines
> 
> [compiler]
> cpp=g++-4.8
> 
> Does this work for you too?
> 
> Chris
> 
> On 27 Mar 2015, at 12:55, Arlind Nocaj <arlind.nocaj at uni-konstanz.de> wrote:
> 
>> Dear Networkit team, 
>> 
>> I managed to build networkit on my ubuntu machine, but am having trouble doing the same on a MacOSX 10.10.2.
>> 
>> It seems like the compiler is not recognized:
>> ERROR: Please install GCC/g++ 4.8 or later and rerun
>> 
>> resulting from the following line:
>> cppcompiler = determineCompiler(candidates)
>> 
>> 
>> As far as I can see I do have gcc/g++4.8 installed
>> * Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
>> * g++-4.8 (Homebrew gcc48 4.8.4) 4.8.4
>> 
>> Am I missing something?
>> 
>> Thnx in advance for your help.
>> <ATT00001.c>
> 
> 
> _______________________________________________
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/networkit
> 
> 
> <ATT00001.c>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150327/f6675eee/attachment-0001.html>


More information about the NetworKit mailing list