pystruct / pyqpbo

QPBO interface and alpha expansion for Python
23 stars 14 forks source link

Does not install in Max OS X Mavericks #5

Open simonhughes22 opened 10 years ago

simonhughes22 commented 10 years ago

Get 3 errors during pip install pyqpbo:

Downloading/unpacking pyqpbo Running setup.py egg_info for package pyqpbo

Installing collected packages: pyqpbo Running setup.py install for pyqpbo building 'pyqpbo.pyqpbo' extension gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c src/pyqpbo.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/pyqpbo.o -fpermissive In file included from src/pyqpbo.cpp:257: In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17: In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761: /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

 ^
In file included from src/pyqpbo.cpp:259:
In file included from QPBO-v1.3.src/QPBO.h:113:
QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
                                if (!next) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                                   ^
QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
                        if (!first) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                            ^
3 warnings generated.
gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c QPBO-v1.3.src/QPBO.cpp -o build/temp.macosx-10.6-x86_64-2.7/QPBO-v1.3.src/QPBO.o -fpermissive
In file included from QPBO-v1.3.src/QPBO.cpp:7:
In file included from QPBO-v1.3.src/QPBO.h:113:
QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
                                if (!next) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                                   ^
QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
                        if (!first) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                            ^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                               ^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                              ^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::QPBO' requested here
template class QPBO<int>;
               ^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::QPBO' requested here
template class QPBO<int>;
               ^
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                               ^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::reallocate_nodes' requested here
template class QPBO<int>;
               ^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                              ^
QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::reallocate_arcs' requested here
template class QPBO<int>;
               ^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::QPBO' requested here
template class QPBO<float>;
               ^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::QPBO' requested here
template class QPBO<float>;
               ^
QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]
                        fprintf(fp, "1 %d %d\n", i+1, delta);
                                          ~~          ^~~~~
                                          %f
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::Save' requested here
template class QPBO<float>;
               ^
QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]
                        fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);
                                             ~~               ^~~~~~~~~~~~~~~~~~~~~
                                             %f
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                               ^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::reallocate_nodes' requested here
template class QPBO<float>;
               ^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                              ^
QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::reallocate_arcs' requested here
template class QPBO<float>;
               ^
QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::QPBO' requested here
template class QPBO<double>;
               ^
QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0] || !arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                                           ^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::QPBO' requested here
template class QPBO<double>;
               ^
QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]
                        fprintf(fp, "1 %d %d\n", i+1, delta);
                                          ~~          ^~~~~
                                          %f
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::Save' requested here
template class QPBO<double>;
               ^
QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]
                        fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);
                                             ~~               ^~~~~~~~~~~~~~~~~~~~~
                                             %f
QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!nodes[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                               ^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::reallocate_nodes' requested here
template class QPBO<double>;
               ^
QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        if (!arcs[0]) { if (error_function) (_error_function)("Not enough memory!"); exit(1); }
                                                              ^
QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::reallocate_arcs' requested here
template class QPBO<double>;
               ^
QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation
        inline void QPBO<int>::get_type_information(char_& type_name, char_& type_format)
                               ^
QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
                get_type_information(type_name, type_format);
                ^
In file included from QPBO-v1.3.src/QPBO.cpp:943:
QPBO-v1.3.src/instances.inc:16:14: warning: conversion from string literal to 'char _' is deprecated [-Wdeprecated-writable-strings]
        type_name = "int";
                    ^
QPBO-v1.3.src/instances.inc:17:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
        type_format = "d";
                      ^
QPBO-v1.3.src/instances.inc:21:27: error: explicit specialization of 'get_type_information' after instantiation
        inline void QPBO<float>::get_type_information(char_& type_name, char_& type_format)
                                 ^
QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
                get_type_information(type_name, type_format);
                ^
In file included from QPBO-v1.3.src/QPBO.cpp:943:
QPBO-v1.3.src/instances.inc:23:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
        type_name = "float";
                    ^
QPBO-v1.3.src/instances.inc:24:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
        type_format = "f";
                      ^
QPBO-v1.3.src/instances.inc:28:28: error: explicit specialization of 'get_type_information' after instantiation
        inline void QPBO<double>::get_type_information(char_& type_name, char*& type_format)
                                  ^
QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
                get_type_information(type_name, type_format);
                ^
In file included from QPBO-v1.3.src/QPBO.cpp:943:
QPBO-v1.3.src/instances.inc:30:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
        type_name = "double";
                    ^
QPBO-v1.3.src/instances.inc:31:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
        type_format = "Lf";
                      ^
28 warnings and 3 errors generated.
error: command 'gcc' failed with exit status 1
Complete output from command /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/bin/python -c "import setuptools;**file**='/Users/simon.hughes/GitHub/NlpResearch/build/pyqpbo/setup.py';exec(compile(open(**file**).read().replace('\r\n', '\n'), **file**, 'exec'))" install --single-version-externally-managed --record /var/folders/97/_9xfnqln35vb6b1ng9czmr2d4x97nt/T/pip-VpwVwb-record/install-record.txt:
running install

running build

running build_py

creating build

creating build/lib.macosx-10.6-x86_64-2.7

creating build/lib.macosx-10.6-x86_64-2.7/pyqpbo

copying pyqpbo/init.py -> build/lib.macosx-10.6-x86_64-2.7/pyqpbo

running build_ext

building 'pyqpbo.pyqpbo' extension

creating build/temp.macosx-10.6-x86_64-2.7

creating build/temp.macosx-10.6-x86_64-2.7/src

creating build/temp.macosx-10.6-x86_64-2.7/QPBO-v1.3.src

gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c src/pyqpbo.cpp -o build/temp.macosx-10.6-x86_64-2.7/src/pyqpbo.o -fpermissive

In file included from src/pyqpbo.cpp:257:

In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:

In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:

In file included from /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:

/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

warning "Using deprecated NumPy API, disable it by " \

^

In file included from src/pyqpbo.cpp:259:

In file included from QPBO-v1.3.src/QPBO.h:113:

QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                            if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                               ^

QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                    if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                        ^

3 warnings generated.

gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -IQPBO-v1.3.src -I/Users/simon.hughes/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.2.0.1610.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c QPBO-v1.3.src/QPBO.cpp -o build/temp.macosx-10.6-x86_64-2.7/QPBO-v1.3.src/QPBO.o -fpermissive

In file included from QPBO-v1.3.src/QPBO.cpp:7:

In file included from QPBO-v1.3.src/QPBO.h:113:

QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                            if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                               ^

QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                    if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                        ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]

                    fprintf(fp, "1 %d %d\n", i+1, delta);

                                      ~~          ^~~~~

                                      %f

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::Save' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]

                    fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);

                                         ~~               ^~~~~~~~~~~~~~~~~~~~~

                                         %f

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                       ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::QPBO' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]

                    fprintf(fp, "1 %d %d\n", i+1, delta);

                                      ~~          ^~~~~

                                      %f

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::Save' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]

                    fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);

                                         ~~               ^~~~~~~~~~~~~~~~~~~~~

                                         %f

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                           ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::reallocate_nodes' requested here

template class QPBO;

           ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                          ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO::reallocate_arcs' requested here

template class QPBO;

           ^

QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation

    inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)

                           ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

            get_type_information(type_name, type_format);

            ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:16:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_name = "int";

                ^

QPBO-v1.3.src/instances.inc:17:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_format = "d";

                  ^

QPBO-v1.3.src/instances.inc:21:27: error: explicit specialization of 'get_type_information' after instantiation

    inline void QPBO<float>::get_type_information(char*& type_name, char*& type_format)

                             ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

            get_type_information(type_name, type_format);

            ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:23:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_name = "float";

                ^

QPBO-v1.3.src/instances.inc:24:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_format = "f";

                  ^

QPBO-v1.3.src/instances.inc:28:28: error: explicit specialization of 'get_type_information' after instantiation

    inline void QPBO<double>::get_type_information(char*& type_name, char*& type_format)

                              ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

            get_type_information(type_name, type_format);

            ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:30:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_name = "double";

                ^

QPBO-v1.3.src/instances.inc:31:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

    type_format = "Lf";

                  ^

28 warnings and 3 errors generated.

error: command 'gcc' failed with exit status 1


Command /Users/simon.hughes/Library/Enthought/Canopy_64bit/User/bin/python -c "import setuptools;file='/Users/simon.hughes/GitHub/NlpResearch/build/pyqpbo/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/97/_9xfnqln35vb6b1ng9czmr2d4x97nt/T/pip-VpwVwb-record/install-record.txt failed with error code 1 Storing complete log in /Users/simon.hughes/.pip/pip.log

amelio-vazquez-reina commented 9 years ago

I am having the same exact problem. To make the parsing easier, here is the error trace in a code block:

$ pip install -e .
Obtaining file:///Users/josh/local_clones/pyqpbo
  Running setup.py (path:/Users/josh/local_clones/pyqpbo/setup.py) egg_info for package from file:///Users/josh/local_clones/pyqpbo

Installing collected packages: pyqpbo
  Running setup.py develop for pyqpbo

    building 'pyqpbo.pyqpbo' extension
    gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/josh/anaconda/envs/py3k/include -arch x86_64 -IQPBO-v1.3.src -I/Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include -I/Users/josh/anaconda/envs/py3k/include/python3.3m -c src/pyqpbo.cpp -o build/temp.macosx-10.5-x86_64-3.3/src/pyqpbo.o -fpermissive
    In file included from src/pyqpbo.cpp:314:
    In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/arrayobject.h:4:
    In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
    In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:
    /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
    #warning "Using deprecated NumPy API, disable it by " \
     ^
    In file included from src/pyqpbo.cpp:316:
    In file included from QPBO-v1.3.src/QPBO.h:113:
    QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
                                    if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                                       ^
    QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
                            if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                                ^
    In file included from src/pyqpbo.cpp:315:
    In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/ufuncobject.h:327:
    /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: unused function '_import_umath' [-Wunused-function]
    _import_umath(void)
    ^
    src/pyqpbo.cpp:13023:28: warning: unused function '__Pyx_PyObject_AsString' [-Wunused-function]
    static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
                               ^
    src/pyqpbo.cpp:13020:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]
    static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
                                   ^
    src/pyqpbo.cpp:13137:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]
    static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
                                    ^
    src/pyqpbo.cpp:13150:29: warning: unused function '__Pyx_PyInt_AsSize_t' [-Wunused-function]
    static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
                                ^
    src/pyqpbo.cpp:11413:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                   ^
    src/pyqpbo.cpp:11427:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]
    static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                   ^
    src/pyqpbo.cpp:11930:48: warning: unused function '__pyx_t_float_complex_from_parts' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
                                                   ^
    src/pyqpbo.cpp:12050:49: warning: unused function '__pyx_t_double_complex_from_parts' [-Wunused-function]
        static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
                                                    ^
    src/pyqpbo.cpp:12168:36: warning: unused function '__Pyx_PyInt_AsUnsignedChar' [-Wunused-function]
    static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
                                       ^
    src/pyqpbo.cpp:12187:37: warning: unused function '__Pyx_PyInt_AsUnsignedShort' [-Wunused-function]
    static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
                                        ^
    src/pyqpbo.cpp:12225:27: warning: unused function '__Pyx_PyInt_AsChar' [-Wunused-function]
    static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
                              ^
    src/pyqpbo.cpp:12244:28: warning: unused function '__Pyx_PyInt_AsShort' [-Wunused-function]
    static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
                               ^
    src/pyqpbo.cpp:12282:34: warning: unused function '__Pyx_PyInt_AsSignedChar' [-Wunused-function]
    static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
                                     ^
    src/pyqpbo.cpp:12301:35: warning: unused function '__Pyx_PyInt_AsSignedShort' [-Wunused-function]
    static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
                                      ^
    src/pyqpbo.cpp:12320:33: warning: unused function '__Pyx_PyInt_AsSignedInt' [-Wunused-function]
    static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
                                    ^
    src/pyqpbo.cpp:12339:26: warning: unused function '__Pyx_PyInt_AsLongDouble' [-Wunused-function]
    static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
                             ^
    src/pyqpbo.cpp:12546:35: warning: function '__Pyx_PyInt_AsLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
                                      ^
    src/pyqpbo.cpp:12668:42: warning: function '__Pyx_PyInt_AsSignedLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
                                             ^
    src/pyqpbo.cpp:8735:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew1' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
                                   ^
    src/pyqpbo.cpp:8778:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew2' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
                                   ^
    src/pyqpbo.cpp:8821:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew3' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
                                   ^
    src/pyqpbo.cpp:8864:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew4' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
                                   ^
    src/pyqpbo.cpp:8907:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew5' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
                                   ^
    src/pyqpbo.cpp:9687:27: warning: unused function '__pyx_f_5numpy_set_array_base' [-Wunused-function]
    static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
                              ^
    src/pyqpbo.cpp:9766:32: warning: unused function '__pyx_f_5numpy_get_array_base' [-Wunused-function]
    static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
                                   ^
    29 warnings generated.
    gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/josh/anaconda/envs/py3k/include -arch x86_64 -IQPBO-v1.3.src -I/Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include -I/Users/josh/anaconda/envs/py3k/include/python3.3m -c QPBO-v1.3.src/QPBO.cpp -o build/temp.macosx-10.5-x86_64-3.3/QPBO-v1.3.src/QPBO.o -fpermissive
    In file included from QPBO-v1.3.src/QPBO.cpp:7:
    In file included from QPBO-v1.3.src/QPBO.h:113:
    QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
                                    if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                                       ^
    QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
                            if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                                ^
    QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                   ^
    QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                  ^
    QPBO-v1.3.src/QPBO.cpp:15:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]
              fix_node_info_list(NULL),
              ^
    QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::QPBO' requested here
    template class QPBO<int>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:17:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]
              all_edges_submodular(true),
              ^
    QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:66:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]
              fix_node_info_list(NULL),
              ^
    QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::QPBO' requested here
    template class QPBO<int>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:68:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]
              all_edges_submodular(q.all_edges_submodular),
              ^
    QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                   ^
    QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::reallocate_nodes' requested here
    template class QPBO<int>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                  ^
    QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::reallocate_arcs' requested here
    template class QPBO<int>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:15:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]
              fix_node_info_list(NULL),
              ^
    QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::QPBO' requested here
    template class QPBO<float>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:17:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]
              all_edges_submodular(true),
              ^
    QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:66:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]
              fix_node_info_list(NULL),
              ^
    QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::QPBO' requested here
    template class QPBO<float>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:68:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]
              all_edges_submodular(q.all_edges_submodular),
              ^
    QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]
                            fprintf(fp, "1 %d %d\n", i+1, delta);
                                              ~~          ^~~~~
                                              %f
    QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::Save' requested here
    template class QPBO<float>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]
                            fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);
                                                 ~~               ^~~~~~~~~~~~~~~~~~~~~
                                                 %f
    QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                   ^
    QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::reallocate_nodes' requested here
    template class QPBO<float>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                  ^
    QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::reallocate_arcs' requested here
    template class QPBO<float>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:15:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]
              fix_node_info_list(NULL),
              ^
    QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::QPBO' requested here
    template class QPBO<double>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:17:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]
              all_edges_submodular(true),
              ^
    QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:66:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]
              fix_node_info_list(NULL),
              ^
    QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::QPBO' requested here
    template class QPBO<double>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:68:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]
              all_edges_submodular(q.all_edges_submodular),
              ^
    QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                               ^
    QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]
                            fprintf(fp, "1 %d %d\n", i+1, delta);
                                              ~~          ^~~~~
                                              %f
    QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::Save' requested here
    template class QPBO<double>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]
                            fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);
                                                 ~~               ^~~~~~~~~~~~~~~~~~~~~
                                                 %f
    QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                   ^
    QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::reallocate_nodes' requested here
    template class QPBO<double>;
                   ^
    QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
                                                                  ^
    QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::reallocate_arcs' requested here
    template class QPBO<double>;
                   ^
    QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation
            inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)
                                   ^
    QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
                    get_type_information(type_name, type_format);
                    ^
    In file included from QPBO-v1.3.src/QPBO.cpp:943:
    QPBO-v1.3.src/instances.inc:16:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            type_name = "int";
                        ^
    QPBO-v1.3.src/instances.inc:17:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            type_format = "d";
                          ^
    QPBO-v1.3.src/instances.inc:21:27: error: explicit specialization of 'get_type_information' after instantiation
            inline void QPBO<float>::get_type_information(char*& type_name, char*& type_format)
                                     ^
    QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
                    get_type_information(type_name, type_format);
                    ^
    In file included from QPBO-v1.3.src/QPBO.cpp:943:
    QPBO-v1.3.src/instances.inc:23:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            type_name = "float";
                        ^
    QPBO-v1.3.src/instances.inc:24:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            type_format = "f";
                          ^
    QPBO-v1.3.src/instances.inc:28:28: error: explicit specialization of 'get_type_information' after instantiation
            inline void QPBO<double>::get_type_information(char*& type_name, char*& type_format)
                                      ^
    QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here
                    get_type_information(type_name, type_format);
                    ^
    In file included from QPBO-v1.3.src/QPBO.cpp:943:
    QPBO-v1.3.src/instances.inc:30:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            type_name = "double";
                        ^
    QPBO-v1.3.src/instances.inc:31:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]
            type_format = "Lf";
                          ^
    40 warnings and 3 errors generated.
    error: command 'gcc' failed with exit status 1
    Complete output from command /Users/josh/anaconda/envs/py3k/bin/python3 -c "import setuptools, tokenize; __file__='/Users/josh/local_clones/pyqpbo/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps:
    running develop

running egg_info

writing pyqpbo.egg-info/PKG-INFO

writing dependency_links to pyqpbo.egg-info/dependency_links.txt

writing top-level names to pyqpbo.egg-info/top_level.txt

warning: manifest_maker: standard file '-c' not found

reading manifest file 'pyqpbo.egg-info/SOURCES.txt'

writing manifest file 'pyqpbo.egg-info/SOURCES.txt'

running build_ext

building 'pyqpbo.pyqpbo' extension

creating build

creating build/temp.macosx-10.5-x86_64-3.3

creating build/temp.macosx-10.5-x86_64-3.3/src

creating build/temp.macosx-10.5-x86_64-3.3/QPBO-v1.3.src

gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/josh/anaconda/envs/py3k/include -arch x86_64 -IQPBO-v1.3.src -I/Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include -I/Users/josh/anaconda/envs/py3k/include/python3.3m -c src/pyqpbo.cpp -o build/temp.macosx-10.5-x86_64-3.3/src/pyqpbo.o -fpermissive

In file included from src/pyqpbo.cpp:314:

In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/arrayobject.h:4:

In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:

In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:

/Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]

#warning "Using deprecated NumPy API, disable it by " \

 ^

In file included from src/pyqpbo.cpp:316:

In file included from QPBO-v1.3.src/QPBO.h:113:

QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                                if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                                   ^

QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                        if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                            ^

In file included from src/pyqpbo.cpp:315:

In file included from /Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/ufuncobject.h:327:

/Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include/numpy/__ufunc_api.h:241:1: warning: unused function '_import_umath' [-Wunused-function]

_import_umath(void)

^

src/pyqpbo.cpp:13023:28: warning: unused function '__Pyx_PyObject_AsString' [-Wunused-function]

static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {

                           ^

src/pyqpbo.cpp:13020:32: warning: unused function '__Pyx_PyUnicode_FromString' [-Wunused-function]

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {

                               ^

src/pyqpbo.cpp:13137:33: warning: unused function '__Pyx_PyInt_FromSize_t' [-Wunused-function]

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {

                                ^

src/pyqpbo.cpp:13150:29: warning: unused function '__Pyx_PyInt_AsSize_t' [-Wunused-function]

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {

                            ^

src/pyqpbo.cpp:11413:32: warning: unused function '__Pyx_GetItemInt_List_Fast' [-Wunused-function]

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,

                               ^

src/pyqpbo.cpp:11427:32: warning: unused function '__Pyx_GetItemInt_Tuple_Fast' [-Wunused-function]

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,

                               ^

src/pyqpbo.cpp:11930:48: warning: unused function '__pyx_t_float_complex_from_parts' [-Wunused-function]

    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {

                                               ^

src/pyqpbo.cpp:12050:49: warning: unused function '__pyx_t_double_complex_from_parts' [-Wunused-function]

    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {

                                                ^

src/pyqpbo.cpp:12168:36: warning: unused function '__Pyx_PyInt_AsUnsignedChar' [-Wunused-function]

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {

                                   ^

src/pyqpbo.cpp:12187:37: warning: unused function '__Pyx_PyInt_AsUnsignedShort' [-Wunused-function]

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {

                                    ^

src/pyqpbo.cpp:12225:27: warning: unused function '__Pyx_PyInt_AsChar' [-Wunused-function]

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {

                          ^

src/pyqpbo.cpp:12244:28: warning: unused function '__Pyx_PyInt_AsShort' [-Wunused-function]

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {

                           ^

src/pyqpbo.cpp:12282:34: warning: unused function '__Pyx_PyInt_AsSignedChar' [-Wunused-function]

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {

                                 ^

src/pyqpbo.cpp:12301:35: warning: unused function '__Pyx_PyInt_AsSignedShort' [-Wunused-function]

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {

                                  ^

src/pyqpbo.cpp:12320:33: warning: unused function '__Pyx_PyInt_AsSignedInt' [-Wunused-function]

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {

                                ^

src/pyqpbo.cpp:12339:26: warning: unused function '__Pyx_PyInt_AsLongDouble' [-Wunused-function]

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {

                         ^

src/pyqpbo.cpp:12546:35: warning: function '__Pyx_PyInt_AsLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {

                                  ^

src/pyqpbo.cpp:12668:42: warning: function '__Pyx_PyInt_AsSignedLongLong' is not needed and will not be emitted [-Wunneeded-internal-declaration]

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {

                                         ^

src/pyqpbo.cpp:8735:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew1' [-Wunused-function]

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {

                               ^

src/pyqpbo.cpp:8778:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew2' [-Wunused-function]

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {

                               ^

src/pyqpbo.cpp:8821:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew3' [-Wunused-function]

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {

                               ^

src/pyqpbo.cpp:8864:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew4' [-Wunused-function]

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {

                               ^

src/pyqpbo.cpp:8907:32: warning: unused function '__pyx_f_5numpy_PyArray_MultiIterNew5' [-Wunused-function]

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {

                               ^

src/pyqpbo.cpp:9687:27: warning: unused function '__pyx_f_5numpy_set_array_base' [-Wunused-function]

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {

                          ^

src/pyqpbo.cpp:9766:32: warning: unused function '__pyx_f_5numpy_get_array_base' [-Wunused-function]

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {

                               ^

29 warnings generated.

gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/josh/anaconda/envs/py3k/include -arch x86_64 -IQPBO-v1.3.src -I/Users/josh/anaconda/envs/py3k/lib/python3.3/site-packages/numpy/core/include -I/Users/josh/anaconda/envs/py3k/include/python3.3m -c QPBO-v1.3.src/QPBO.cpp -o build/temp.macosx-10.5-x86_64-3.3/QPBO-v1.3.src/QPBO.o -fpermissive

In file included from QPBO-v1.3.src/QPBO.cpp:7:

In file included from QPBO-v1.3.src/QPBO.h:113:

QPBO-v1.3.src/block.h:124:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                                if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                                   ^

QPBO-v1.3.src/block.h:223:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

                        if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                            ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                               ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                              ^

QPBO-v1.3.src/QPBO.cpp:15:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]

          fix_node_info_list(NULL),

          ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::QPBO' requested here

template class QPBO<int>;

               ^

QPBO-v1.3.src/QPBO.cpp:17:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]

          all_edges_submodular(true),

          ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:66:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]

          fix_node_info_list(NULL),

          ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::QPBO' requested here

template class QPBO<int>;

               ^

QPBO-v1.3.src/QPBO.cpp:68:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]

          all_edges_submodular(q.all_edges_submodular),

          ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                               ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::reallocate_nodes' requested here

template class QPBO<int>;

               ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                              ^

QPBO-v1.3.src/instances.inc:9:16: note: in instantiation of member function 'QPBO<int>::reallocate_arcs' requested here

template class QPBO<int>;

               ^

QPBO-v1.3.src/QPBO.cpp:15:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]

          fix_node_info_list(NULL),

          ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::QPBO' requested here

template class QPBO<float>;

               ^

QPBO-v1.3.src/QPBO.cpp:17:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]

          all_edges_submodular(true),

          ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:66:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]

          fix_node_info_list(NULL),

          ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::QPBO' requested here

template class QPBO<float>;

               ^

QPBO-v1.3.src/QPBO.cpp:68:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]

          all_edges_submodular(q.all_edges_submodular),

          ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]

                        fprintf(fp, "1 %d %d\n", i+1, delta);

                                          ~~          ^~~~~

                                          %f

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::Save' requested here

template class QPBO<float>;

               ^

QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'float' [-Wformat]

                        fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);

                                             ~~               ^~~~~~~~~~~~~~~~~~~~~

                                             %f

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                               ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::reallocate_nodes' requested here

template class QPBO<float>;

               ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                              ^

QPBO-v1.3.src/instances.inc:10:16: note: in instantiation of member function 'QPBO<float>::reallocate_arcs' requested here

template class QPBO<float>;

               ^

QPBO-v1.3.src/QPBO.cpp:15:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]

          fix_node_info_list(NULL),

          ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::QPBO' requested here

template class QPBO<double>;

               ^

QPBO-v1.3.src/QPBO.cpp:17:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]

          all_edges_submodular(true),

          ^

QPBO-v1.3.src/QPBO.cpp:27:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:66:4: warning: field 'fix_node_info_list' will be initialized after field 'stage' [-Wreorder]

          fix_node_info_list(NULL),

          ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::QPBO' requested here

template class QPBO<double>;

               ^

QPBO-v1.3.src/QPBO.cpp:68:4: warning: field 'all_edges_submodular' will be initialized after field 'error_function' [-Wreorder]

          all_edges_submodular(q.all_edges_submodular),

          ^

QPBO-v1.3.src/QPBO.cpp:79:69: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0] || !arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                                           ^

QPBO-v1.3.src/QPBO.cpp:333:34: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]

                        fprintf(fp, "1 %d %d\n", i+1, delta);

                                          ~~          ^~~~~

                                          %f

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::Save' requested here

template class QPBO<double>;

               ^

QPBO-v1.3.src/QPBO.cpp:338:42: warning: format specifies type 'int' but the argument has type 'double' [-Wformat]

                        fprintf(fp, "2 %d %d %d\n", i+1, j+1, E00 + E11 - E01 - E10);

                                             ~~               ^~~~~~~~~~~~~~~~~~~~~

                                             %f

QPBO-v1.3.src/QPBO.cpp:179:57: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!nodes[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                               ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::reallocate_nodes' requested here

template class QPBO<double>;

               ^

QPBO-v1.3.src/QPBO.cpp:211:56: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        if (!arcs[0]) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }

                                                              ^

QPBO-v1.3.src/instances.inc:11:16: note: in instantiation of member function 'QPBO<double>::reallocate_arcs' requested here

template class QPBO<double>;

               ^

QPBO-v1.3.src/instances.inc:14:25: error: explicit specialization of 'get_type_information' after instantiation

        inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)

                               ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

                get_type_information(type_name, type_format);

                ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:16:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        type_name = "int";

                    ^

QPBO-v1.3.src/instances.inc:17:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        type_format = "d";

                      ^

QPBO-v1.3.src/instances.inc:21:27: error: explicit specialization of 'get_type_information' after instantiation

        inline void QPBO<float>::get_type_information(char*& type_name, char*& type_format)

                                 ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

                get_type_information(type_name, type_format);

                ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:23:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        type_name = "float";

                    ^

QPBO-v1.3.src/instances.inc:24:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        type_format = "f";

                      ^

QPBO-v1.3.src/instances.inc:28:28: error: explicit specialization of 'get_type_information' after instantiation

        inline void QPBO<double>::get_type_information(char*& type_name, char*& type_format)

                                  ^

QPBO-v1.3.src/QPBO.cpp:278:3: note: implicit instantiation first required here

                get_type_information(type_name, type_format);

                ^

In file included from QPBO-v1.3.src/QPBO.cpp:943:

QPBO-v1.3.src/instances.inc:30:14: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        type_name = "double";

                    ^

QPBO-v1.3.src/instances.inc:31:16: warning: conversion from string literal to 'char *' is deprecated [-Wdeprecated-writable-strings]

        type_format = "Lf";

                      ^

40 warnings and 3 errors generated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /Users/josh/anaconda/envs/py3k/bin/python3 -c "import setuptools, tokenize; __file__='/Users/josh/local_clones/pyqpbo/setup.py'; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1 in /Users/josh/local_clones/pyqpbo
Storing debug log for failure in /Users/josh/.pip/pip.log
amueller commented 9 years ago

The problem is that the QPBO code doesn't compile with newer GCC versions without patching. I think I will just remove QPBO form pystruct, as it causes so many issues. I'd recommend installing OpenGM, which provides a wealth of inference algorithms, and also maintains a patch of QPBO afaik.

LIN-ZHANG-ALPHA commented 7 years ago

@amueller would you mind tell us how to call QPBO from opengm. I just removed QPBO from pystruct and installed opengm. How can I use it in the examples of pystruct. Many thanks.

amueller commented 7 years ago

use inference_method=("ogm", {'alg': 'qpbo'}) or 'mqpbo' for multilabel. See http://pystruct.github.io/generated/pystruct.inference.inference_dispatch.html#pystruct.inference.inference_dispatch http://pystruct.github.io/generated/pystruct.inference.inference_ogm.html#pystruct.inference.inference_ogm