On some platforms (probably depending on the gcc version) I get the following error in boost-using Cython code. Presumably this is triggered by the new small integer optimizations, as Cython-0.22 did not include longintrepr.h. In C++ one should disambiguate ::uint64_t, but then longintrepr.h is a C Python header. Arguably it is the fault of the code for
in the user code but then its a common enough (ab)use. Thoughts?
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/mnt/disk/home/release/Sage/local/include -I/mnt/disk/home/release/Sage/local/include/python2.7 -I/mnt/disk/home/release/Sage/local/lib/python2.7/site-packages/numpy/core/include -I/mnt/disk/home/release/Sage/src -I/mnt/disk/home/release/Sage/src/sage/ext -I/mnt/disk/home/release/Sage/src/build/cythonized -I/mnt/disk/home/release/Sage/src/build/cythonized/sage/ext -I/mnt/disk/home/release/Sage/local/include/python2.7 -c /mnt/disk/home/release/Sage/src/build/cythonized/sage/graphs/base/boost_graph.cpp -o build/temp.linux-x86_64-2.7/mnt/disk/home/release/Sage/src/build/cythonized/sage/graphs/base/boost_graph.o -fno-strict-aliasing -w
In file included from build/cythonized/sage/graphs/base/boost_graph.cpp:8205:0:
../local/include/python2.7/longintrepr.h:47:9: error: reference to ‘uint64_t’ is ambiguous
typedef PY_UINT64_T twodigits;
^
In file included from /usr/lib/gcc/x86_64-redhat-linux/5.1.1/include/stdint.h:9:0,
from /usr/include/inttypes.h:27,
from ../local/include/python2.7/pyport.h:9,
from ../local/include/python2.7/Python.h:58,
from build/cythonized/sage/graphs/base/boost_graph.cpp:38:
/usr/include/stdint.h:55:27: note: candidates are: typedef long unsigned int uint64_t
typedef unsigned long int uint64_t;
^
In file included from ../local/include/boost/integer_fwd.hpp:17:0,
from ../local/include/boost/integer/static_log2.hpp:19,
from ../local/include/boost/functional/hash/detail/hash_float.hpp:17,
from ../local/include/boost/functional/hash/hash.hpp:15,
from ../local/include/boost/functional/hash.hpp:6,
from ../local/include/boost/unordered/unordered_set.hpp:20,
from ../local/include/boost/unordered_set.hpp:16,
from ../local/include/boost/graph/adjacency_list.hpp:21,
from build/cythonized/sage/graphs/base/boost_graph.cpp:287:
../local/include/boost/cstdint.hpp:311:39: note: typedef boost::ulong_long_type boost::uint64_t
typedef ::boost::ulong_long_type uint64_t;
^
In file included from build/cythonized/sage/graphs/base/boost_graph.cpp:8205:0:
../local/include/python2.7/longintrepr.h:48:9: error: reference to ‘int64_t’ is ambiguous
typedef PY_INT64_T stwodigits; /* signed variant of twodigits */
^
In file included from /usr/include/stdlib.h:314:0,
from ../local/include/python2.7/Python.h:42,
from build/cythonized/sage/graphs/base/boost_graph.cpp:38:
/usr/include/sys/types.h:197:13: note: candidates are: typedef long int int64_t
__intN_t (64, __DI__);
^
In file included from ../local/include/boost/integer_fwd.hpp:17:0,
from ../local/include/boost/integer/static_log2.hpp:19,
from ../local/include/boost/functional/hash/detail/hash_float.hpp:17,
from ../local/include/boost/functional/hash/hash.hpp:15,
from ../local/include/boost/functional/hash.hpp:6,
from ../local/include/boost/unordered/unordered_set.hpp:20,
from ../local/include/boost/unordered_set.hpp:16,
from ../local/include/boost/graph/adjacency_list.hpp:21,
from build/cythonized/sage/graphs/base/boost_graph.cpp:287:
../local/include/boost/cstdint.hpp:308:38: note: typedef boost::long_long_type boost::int64_t
typedef ::boost::long_long_type int64_t;
^