Skip to content

/usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first! #80

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

Open
jasimmk opened this issue Oct 10, 2014 · 1 comment · Fixed by PyMySQL/mysqlclient#7

Comments

@jasimmk
Copy link

jasimmk commented Oct 10, 2014

Issue when compiling MySQLdb extension

System configuration
Ubuntu: 12.04 precise
Python: 2.7
VirtualEnvironment
libmariadbclient-dev_5.5.40+maria-1~wheezy_amd64.deb

Package groups installed via ansible
- libpq-dev
- libmariadbclient18
- libmariadbclient-dev
- libxml2-dev
- libxslt1-dev
- libjpeg62
- libjpeg62-dev
- libfreetype6
- libfreetype6-dev
- libcurl4-gnutls-dev
- librtmp-dev
- zlib1g-dev
- mariadb-common
- mysql-common
- mariadb-client
- python-dev
- python-setuptools
- python-imaging
- python-mysqldb
- python-psycopg2
- subversion
- git-core

I am getting this error

(venv)root@Ubuntu-test01:/var/projects/www/mysql_source# python setup.py install
running install
running bdist_egg
running egg_info
creating MySQL_python.egg-info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -fno-omit-frame-pointer -g -pipe -Wno-uninitialized -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:439:0: warning: "HAVE_WCSCOLL" redefined [enabled by default]
/usr/include/python2.7/pyconfig.h:890:0: note: this is the location of the previous definition
/usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first!
error: command 'gcc' failed with exit status 1
@rbu
Copy link

rbu commented Nov 21, 2014

Reported downstream for RHEL 7: https://bugzilla.redhat.com/show_bug.cgi?id=1166603
Upstream issue about relaxing rules: https://mariadb.atlassian.net/browse/MDEV-6862

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.

2 participants