[Networkit] Building Networkit on MacOSX Yosemite 10.10.2
Arlind Nocaj
arlind.nocaj at uni-konstanz.de
Fri Mar 27 19:20:10 CET 2015
Thnx for your fast response guys.
After installing scons the right compiler seems to be used, but I still get
the following:
Any hint ?
$ python3 setup.py build_ext --inplace
running build_ext
initializing NetworKit compilation with: scons --optimize=Opt --target=Core
-j4
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++-4.8 -o .buildOpt/Globals.o -c -std=c++11 -Wall -c -fmessage-length=0
-fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO
networkit/cpp/Globals.cpp
g++-4.8 -o .buildOpt/algebraic/AdjacencyMatrix.o -c -std=c++11 -Wall -c
-fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO
networkit/cpp/algebraic/AdjacencyMatrix.cpp
In file included from
/usr/local/Cellar/gcc48/4.8.4/lib/gcc/4.8/gcc/x86_64-apple-darwin14.1.0/4.8.4/include/stdint.h:9:0,
from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cstdint:41,
from networkit/cpp/Globals.h:11,
from networkit/cpp/Globals.cpp:8:
/usr/local/Cellar/gcc48/4.8.4/lib/gcc/4.8/gcc/x86_64-apple-darwin14.1.0/4.8.4/include-fixed/stdint.h:27:32:
fatal error: sys/_types/_int8_t.h: No such file or directory
#include <sys/_types/_int8_t.h>
^
compilation terminated.
g++-4.8 -o .buildOpt/algebraic/IncidenceMatrix.o -c -std=c++11 -Wall -c
-fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO
networkit/cpp/algebraic/IncidenceMatrix.cpp
scons: *** [.buildOpt/Globals.o] Error 1
g++-4.8 -o .buildOpt/algebraic/LaplacianMatrix.o -c -std=c++11 -Wall -c
-fmessage-length=0 -fPIC -fopenmp -O3 -DNDEBUG -DLOG_LEVEL=LOG_LEVEL_INFO
networkit/cpp/algebraic/LaplacianMatrix.cpp
In file included from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/stl_algo.h:59:0,
from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/algorithm:62,
from networkit/cpp/algebraic/../graph/Graph.h:11,
from networkit/cpp/algebraic/Matrix.h:11,
from networkit/cpp/algebraic/AdjacencyMatrix.h:11,
from networkit/cpp/algebraic/AdjacencyMatrix.cpp:8:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cstdlib:72:20: fatal error:
stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.
scons: *** [.buildOpt/algebraic/AdjacencyMatrix.o] Error 1
In file included from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/stl_algo.h:59:0,
from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/algorithm:62,
from networkit/cpp/algebraic/../graph/Graph.h:11,
from networkit/cpp/algebraic/IncidenceMatrix.h:11,
from networkit/cpp/algebraic/IncidenceMatrix.cpp:8:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cstdlib:72:20: fatal error:
stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.
scons: *** [.buildOpt/algebraic/IncidenceMatrix.o] Error 1
In file included from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/bits/stl_algo.h:59:0,
from
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/algorithm:62,
from networkit/cpp/algebraic/../graph/Graph.h:11,
from networkit/cpp/algebraic/Matrix.h:11,
from networkit/cpp/algebraic/LaplacianMatrix.h:11,
from networkit/cpp/algebraic/LaplacianMatrix.cpp:8:
/usr/local/Cellar/gcc48/4.8.4/include/c++/4.8.4/cstdlib:72:20: fatal error:
stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.
scons: *** [.buildOpt/algebraic/LaplacianMatrix.o] Error 1
scons: building terminated because of errors.
scons returned an error, exiting setup.py
2015-03-27 15:31 GMT+01:00 Maximilian Vogel <
maximilian.vogel at student.kit.edu>:
> Hi Arlind,
>
> 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?
>
> No, if you do have the build.conf, it will be considered automatically
> unless you do not have SCons installed. The automatic detection is more
> relevant for building the extension. But in your case it doesn't reach that
> point. I assume that you do not have SCons installed? That would explain,
> why the build.conf is ignored.
> Another thing regarding your first mail. It seems that the function
> determineCompiler(...) doesn't work reliably in your case. There are 2
> things you could try:
> 1. Change the order in the candidate list of compilers, but I doubt that
> would work, as for some reason the above named function doesn't work
> properly.
> 2. In setup.py you could replace:
> cppcompiler = determineCompiler(candidates)
> with
> cppcompiler = "g++-4.8"
>
> Good luck,
> Max
>
>
> 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
>>
>>
>
>
> _______________________________________________
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/networkit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150327/4a579cfb/attachment-0001.html>
More information about the NetworKit
mailing list