Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3 install fails on Ubuntu 14.10 #44

Open
dawsonlp opened this issue May 1, 2015 · 4 comments
Open

pip3 install fails on Ubuntu 14.10 #44

dawsonlp opened this issue May 1, 2015 · 4 comments

Comments

@dawsonlp
Copy link

dawsonlp commented May 1, 2015

Error in compile detailed below.
This is on an ubuntu 14.10 system, using python 3.4.2 (along with the python3-setuptools package and pip3). We have standardized on python 3, so this is an issue, but I was able to install with the ubuntu default python 2.7 instance and pip2)

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Isasl -I/usr/include/python3.4m -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.4/sasl/saslwrapper.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
sasl/saslwrapper.cpp: In member function ‘void saslwrapper::ClientImpl::interact(sasl_interact_t_)’:
sasl/saslwrapper.cpp:341:11: warning: unused variable ‘input’ [-Wunused-variable]
char_ input;
^
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Isasl -I/usr/include/python3.4m -c sasl/saslwrapper_wrap.cxx -o build/temp.linux-x86_64-3.4/sasl/saslwrapper_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
sasl/saslwrapper_wrap.cxx: In function ‘void SWIG_Python_AddErrorMsg(const char_)’:
sasl/saslwrapper_wrap.cxx:884:58: error: ‘PyString_AsString’ was not declared in this scope
PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
^
sasl/saslwrapper_wrap.cxx: In function ‘PySwigClientData_ PySwigClientData_New(PyObject_)’:
sasl/saslwrapper_wrap.cxx:1275:26: error: ‘PyClass_Check’ was not declared in this scope
if (PyClass_Check(obj)) {
^
sasl/saslwrapper_wrap.cxx: In function ‘PyObject_ PySwigObject_format(const char_, PySwigObject_)’:
sasl/saslwrapper_wrap.cxx:1348:47: error: ‘PyString_FromString’ was not declared in this scope
PyObject ofmt = PyString_FromString(fmt);
^
sasl/saslwrapper_wrap.cxx:1350:33: error: ‘PyString_Format’ was not declared in this scope
res = PyString_Format(ofmt,args);
^
sasl/saslwrapper_wrap.cxx: In function ‘PyObject
PySwigObject_repr(PySwigObject_)’:
sasl/saslwrapper_wrap.cxx:1380:105: error: ‘PyString_AsString’ was not declared in this scope
PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
^
sasl/saslwrapper_wrap.cxx:1380:106: error: ‘PyString_FromFormat’ was not declared in this scope
PyObject *repr = PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString_AsString(hex));
^
sasl/saslwrapper_wrap.cxx:1388:37: error: ‘PyString_ConcatAndDel’ was not declared in this scope
PyString_ConcatAndDel(&repr,nrep);
^
sasl/saslwrapper_wrap.cxx: In function ‘int PySwigObject_print(PySwigObject_, FILE_, int)’:
sasl/saslwrapper_wrap.cxx:1402:33: error: ‘PyString_AsString’ was not declared in this scope
fputs(PyString_AsString(repr), fp);
^
sasl/saslwrapper_wrap.cxx: In function ‘PyObject_ PySwigObject_str(PySwigObject_)’:
sasl/saslwrapper_wrap.cxx:1415:31: error: ‘PyString_FromString’ was not declared in this scope
PyString_FromString(result) : 0;
^
sasl/saslwrapper_wrap.cxx: In function ‘PyTypeObject_ _PySwigObject_type()’:
sasl/saslwrapper_wrap.cxx:1624:6: error: ‘coercion’ was not declared in this scope
(coercion)0, /nb_coerce/
^
sasl/saslwrapper_wrap.cxx:1624:15: error: expected ‘}’ before numeric constant
(coercion)0, /nb_coerce/
^
sasl/saslwrapper_wrap.cxx:1624:15: error: expected ‘,’ or ‘;’ before numeric constant
sasl/saslwrapper_wrap.cxx:1604:15: warning: unused variable ‘swigobject_doc’ [-Wunused-variable]
static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
^
sasl/saslwrapper_wrap.cxx:1606:26: warning: unused variable ‘PySwigObject_as_number’ [-Wunused-variable]
static PyNumberMethods PySwigObject_as_number = {
^
sasl/saslwrapper_wrap.cxx:1637:3: warning: no return statement in function returning non-void [-Wreturn-type]
};
^
sasl/saslwrapper_wrap.cxx: At global scope:
sasl/saslwrapper_wrap.cxx:1641:3: error: expected unqualified-id before ‘if’
if (!type_init) {
^
In file included from /usr/include/c++/4.9/stdexcept:38:0,
from sasl/saslwrapper_wrap.cxx:2542:
/usr/include/c++/4.9/exception:35:37: error: expected ‘}’ before end of line
#pragma GCC visibility push(default)
^
/usr/include/c++/4.9/exception:35:37: error: expected declaration before end of line
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-v5gghcou/sasl/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-022s9m5k-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-v5gghcou/sasl
@Moglum
Copy link

Moglum commented May 19, 2015

Hi, I ran into the same kind of error on Centos 6.6 with Python 3.4.3 and pip 6.1.1 from /usr/local/lib/python3.4/site-packages (python 3.4)

Installed Packages
cyrus-sasl-devel.x86_64 2.1.23-15.el6_6.2
gcc-c++.x86_64 4.4.7-11.el6
python-devel.x86_64 2.6.6-52.el6

gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/usr/local/include/python3.4m -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-3.4/sasl/saslwrapper.o
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
    sasl/saslwrapper.cpp: In member function âvoid saslwrapper::ClientImpl::interact(sasl_interact_t*)â:
    sasl/saslwrapper.cpp:341: warning: unused variable âinputâ
    gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/usr/local/include/python3.4m -c sasl/saslwrapper_wrap.cxx -o build/temp.linux-x86_64-3.4/sasl/saslwrapper_wrap.o
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
    sasl/saslwrapper_wrap.cxx: In function âvoid SWIG_Python_AddErrorMsg(const char*)â:
    sasl/saslwrapper_wrap.cxx:884: error: âPyString_AsStringâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx: In function âPySwigClientData* PySwigClientData_New(PyObject*)â:
    sasl/saslwrapper_wrap.cxx:1275: error: âPyClass_Checkâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx: In function âPyObject* PySwigObject_format(const char*, PySwigObject*)â:
    sasl/saslwrapper_wrap.cxx:1348: error: âPyString_FromStringâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx:1350: error: âPyString_Formatâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx: In function âPyObject* PySwigObject_repr(PySwigObject*)â:
    sasl/saslwrapper_wrap.cxx:1380: error: âPyString_AsStringâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx:1380: error: âPyString_FromFormatâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx:1388: error: âPyString_ConcatAndDelâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx: In function âint PySwigObject_print(PySwigObject*, FILE*, int)â:
    sasl/saslwrapper_wrap.cxx:1402: error: âPyString_AsStringâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx: In function âPyObject* PySwigObject_str(PySwigObject*)â:
    sasl/saslwrapper_wrap.cxx:1415: error: âPyString_FromStringâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx: In function âPyTypeObject* _PySwigObject_type()â:
    sasl/saslwrapper_wrap.cxx:1624: error: âcoercionâ was not declared in this scope
    sasl/saslwrapper_wrap.cxx:1624: error: expected â}â before numeric constant
    sasl/saslwrapper_wrap.cxx:1624: error: too many initializers for âPyNumberMethodsâ
    sasl/saslwrapper_wrap.cxx:1624: error: invalid conversion from âPyObject* (*)(PyObject*, PyObject*)â to âPyObject* (*)(PyObject*, PyObject*, PyObject*)â
    sasl/saslwrapper_wrap.cxx:1624: error: invalid conversion from âPyObject* (*)(PyObject*, PyObject*, PyObject*)â to âPyObject* (*)(PyObject*)â
    sasl/saslwrapper_wrap.cxx:1624: error: invalid conversion from âPyObject* (*)(PyObject*)â to âint (*)(PyObject*)â
    sasl/saslwrapper_wrap.cxx:1624: error: invalid conversion from âint (*)(PyObject*)â to âPyObject* (*)(PyObject*)â
    sasl/saslwrapper_wrap.cxx:1624: error: expected â,â or â;â before numeric constant
    sasl/saslwrapper_wrap.cxx:1604: warning: unused variable âswigobject_docâ
    sasl/saslwrapper_wrap.cxx:1606: warning: unused variable âPySwigObject_as_numberâ
    sasl/saslwrapper_wrap.cxx:1637: warning: no return statement in function returning non-void
    sasl/saslwrapper_wrap.cxx: At global scope:
    sasl/saslwrapper_wrap.cxx:1641: error: expected unqualified-id before âifâ
    In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/stdexcept:38,
                     from sasl/saslwrapper_wrap.cxx:2542:
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception:35: error: expected â}â before end of line
    /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/exception:35: error: expected declaration before end of line
    error: command 'gcc' failed with exit status 1

On the same machine pip2 install pyhs2 works just fine. (default python 2.6)

Any help would be greatly appreciated.
Thanks

@yuchsiao
Copy link

Same here on Mac OSX Yosemite. I think there is something wrong with the 'sasl' in pip3.

@moritzschaefer
Copy link

@kkennedy314
Copy link

This is an issue with Python3 and the dependency SASL. SASL is currently coded for Python2. This is seen with the error 'PyString_AsString not being declared in the scope'.

A short term solution, if possible, would be to use Python2. Long term, either the SASL dependency will need to be updated for Python3 or pyhs2 will need to use a different dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants