I have been trying to install mysql-python 1.2.1c3 wiht mysql version 4.1.12. So far I have add the mysqlclient location to the $PATH and removed -lnsl from the gcc line. Know I have this problem
build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function _mysql_Exception':
/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:117: undefined reference to_mysql_errno'
/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:166: undefined reference to _mysql_error'
build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function_mysql_server_init':
/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:253: undefined reference to _mysql_server_init'
build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function_mysql_server_end':
/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:276: undefined reference to _mysql_server_end'
build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function_mysql_thread_safe':
/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:294: undefined reference to _mysql_server_init'
.
.
.
build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function_mysql_ResultObject_dealloc':
/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:1969: undefined reference to `_mysql_free_result'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
So where would theses be referenced? How can I get this to install on cygwin? Anyone have experience at setting this up on cygwin?
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All these undefined references are things defined in _mysql.c. Someone is seriously wrong with your setup. What version of gcc does cygwin have nowadays? Post output of: gcc -V.
Is your MySQL built with the Cygwin compiler? Is your Python?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been trying to install mysql-python 1.2.1c3 wiht mysql version 4.1.12. So far I have add the mysqlclient location to the $PATH and removed -lnsl from the gcc line. Know I have this problem
build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function
_mysql_Exception': /usr/local/src/MySQL-python-1.2.1c3/_mysql.c:117: undefined reference to
_mysql_errno'/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:166: undefined reference to
_mysql_error' build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function
_mysql_server_init':/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:253: undefined reference to
_mysql_server_init' build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function
_mysql_server_end':/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:276: undefined reference to
_mysql_server_end' build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function
_mysql_thread_safe':/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:294: undefined reference to
_mysql_server_init' . . . build/temp.cygwin-1.5.17-i686-2.4/_mysql.o: In function
_mysql_ResultObject_dealloc':/usr/local/src/MySQL-python-1.2.1c3/_mysql.c:1969: undefined reference to `_mysql_free_result'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
So where would theses be referenced? How can I get this to install on cygwin? Anyone have experience at setting this up on cygwin?
Thank you
I've got the same problem. After _mysql.o is created, it cannot be linked:
$ gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.5.19-i686-2.4/_m
ysql.o -L/cygdrive/c/mysql5/lib/ -L/usr/lib/python2.4/config -lpython2.4 -o bui
ld/lib.cygwin-1.5.19-i686-2.4/_mysql.dll
build/temp.cygwin-1.5.19-i686-2.4/_mysql.o: In function
_mysql_Exception': /cygdrive/c/soft/MySQL-python-1.2.1_p2/_mysql.c:116: undefined reference to
_mysql_errno'
/cygdrive/c/soft/MySQL-python-1.2.1_p2/_mysql.c:203: undefined reference to `_my
sql_error'
[...]
collect2: ld returned 1 exit status
Using:
- cygwin (downloaded a couple of months ago)
- Mysql5 (installed from cygwin)
- MySQL-python-1.2.1_p2
- python2.4 (from cygwin)
- gcc 3.4.4
Those undefined references seem to be present in:
mysql5/lib/opt/libmysql.lib
Many thanks!
All these undefined references are things defined in _mysql.c. Someone is seriously wrong with your setup. What version of gcc does cygwin have nowadays? Post output of: gcc -V.
Is your MySQL built with the Cygwin compiler? Is your Python?