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

Multiple warnings during pip install #8

Closed
Zulan opened this issue Oct 12, 2014 · 0 comments · Fixed by #9
Closed

Multiple warnings during pip install #8

Zulan opened this issue Oct 12, 2014 · 0 comments · Fixed by #9

Comments

@Zulan
Copy link

Zulan commented Oct 12, 2014

Most of the warnings seem harmless, but the incompatible pointer types worry me. On first sight it seems to work for me though.

Python 3.4.1 (default, May 19 2014, 17:23:49) 

gcc version 4.9.1 20140903 (prerelease) (GCC) 

pip install mysqlclient
Downloading/unpacking mysqlclient
  Downloading mysqlclient-1.3.3.tar.gz (77kB): 77kB downloaded
  Running setup.py (path:/home/zulan/code/django/build/mysqlclient/setup.py) egg_info for package mysqlclient

Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient
    building '_mysql' extension
    gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -Dversion_info=(1,3,3,'final',1) -D__version__=1.3.3 -I/usr/include/mysql -I/usr/include/python3.4m -c _mysql.c -o build/temp.linux-x86_64-3.4/_mysql.o -fPIC -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
    In file included from _mysql.c:40:0:
    /usr/include/mysql/my_config.h:437:0: warning: "HAVE_MBRTOWC" redefined
     #define HAVE_MBRTOWC
     ^
    In file included from /usr/include/python3.4m/Python.h:8:0,
                     from _mysql.c:29:
    /usr/include/python3.4m/pyconfig.h:554:0: note: this is the location of the previous definition
     #define HAVE_MBRTOWC 1
     ^
    In file included from _mysql.c:40:0:
    /usr/include/mysql/my_config.h:438:0: warning: "HAVE_WCSCOLL" redefined
     #define HAVE_WCSCOLL
     ^
    In file included from /usr/include/python3.4m/Python.h:8:0,
                     from _mysql.c:29:
    /usr/include/python3.4m/pyconfig.h:1132:0: note: this is the location of the previous definition
     #define HAVE_WCSCOLL 1
     ^
    _mysql.c: In function ‘_mysql_field_to_python’:
    _mysql.c:1370:16: warning: unused variable ‘fmt’ [-Wunused-variable]
        const char *fmt = "s#";
                    ^
    _mysql.c: In function ‘_mysql_ConnectionObject_query’:
    _mysql.c:1976:9: warning: unused variable ‘mysql’ [-Wunused-variable]
      MYSQL *mysql = &(self->connection);
             ^
    _mysql.c: In function ‘_mysql_ConnectionObject_read_query_result’:
    _mysql.c:2021:6: warning: unused variable ‘len’ [-Wunused-variable]
      int len, r;
          ^
    _mysql.c:2020:8: warning: unused variable ‘query’ [-Wunused-variable]
      char *query;
            ^
    _mysql.c: In function ‘_mysql_ConnectionObject_getattro’:
    _mysql.c:2665:33: warning: passing argument 1 of ‘PyObject_GenericGetAttr’ from incompatible pointer type
      return PyObject_GenericGetAttr(self, name);
                                     ^
    In file included from /usr/include/python3.4m/pytime.h:6:0,
                     from /usr/include/python3.4m/Python.h:65,
                     from _mysql.c:29:
    /usr/include/python3.4m/object.h:533:24: note: expected ‘struct PyObject *’ but argument is of type ‘struct _mysql_ConnectionObject *’
     PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
                            ^
    _mysql.c: In function ‘_mysql_ConnectionObject_setattro’:
    _mysql.c:2679:33: warning: passing argument 1 of ‘PyObject_GenericSetAttr’ from incompatible pointer type
      return PyObject_GenericSetAttr(self, name, v);
                                     ^
    In file included from /usr/include/python3.4m/pytime.h:6:0,
                     from /usr/include/python3.4m/Python.h:65,
                     from _mysql.c:29:
    /usr/include/python3.4m/object.h:534:17: note: expected ‘struct PyObject *’ but argument is of type ‘struct _mysql_ConnectionObject *’
     PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *,
                     ^
    _mysql.c: In function ‘_mysql_ResultObject_setattro’:
    _mysql.c:2693:33: warning: passing argument 1 of ‘PyObject_GenericSetAttr’ from incompatible pointer type
      return PyObject_GenericSetAttr(self, name, v);
                                     ^
    In file included from /usr/include/python3.4m/pytime.h:6:0,
                     from /usr/include/python3.4m/Python.h:65,
                     from _mysql.c:29:
    /usr/include/python3.4m/object.h:534:17: note: expected ‘struct PyObject *’ but argument is of type ‘struct _mysql_ResultObject *’
     PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *,
                     ^
    gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-3.4/_mysql.o -L/usr/lib -L/usr/lib -lmysqlclient_r -lpthread -lz -lm -lssl -lcrypto -ldl -lpython3.4m -o build/lib.linux-x86_64-3.4/_mysql.cpython-34m.so

Successfully installed mysqlclient
Cleaning up...
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

Successfully merging a pull request may close this issue.

1 participant