that there's assumptions as to what options mysql_config will return and as a consequence flags such as "-Wl," are not being passed onto to the compiler.
now I'm not a shit hot python programmer so I maybe missing something obvious but this is surely a bug ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm having trouble understanding some logic in the building process...
I'm building MySQLdb 1.2.2, my mysql is installed into a non-standard location and my mysql_config reflects this by spitting out the following
/opt/mysql/5.0.22/bin/mysql_config --libs
-Wl,-rpath=/opt/mysql/5.0.22/lib/mysql -L/opt/mysql/5.0.22/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
As you can see, my mysql_config spits out all the flags that it needs, yet,
running build
running build_py
creating build/lib.linux-i686-2.4
copying _mysql_exceptions.py -> build/lib.linux-i686-2.4
creating build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-i686-2.4/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-i686-2.4/MySQLdb
creating build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-i686-2.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-i686-2.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-i686-2.4
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/opt/mysql/5.0.22/include/mysql -I/usr/include/python2.4 -c _mysql.c -o build/temp.linux-i686-2.4/_mysql.o
gcc -pthread -shared build/temp.linux-i686-2.4/_mysql.o -L/opt/mysql/5.0.22/lib/lib/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -o build/lib.linux-i686-2.4/_mysql.so
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
a little investigation shows with examples like
setup_posix.py - line 52
that there's assumptions as to what options mysql_config will return and as a consequence flags such as "-Wl," are not being passed onto to the compiler.
now I'm not a shit hot python programmer so I maybe missing something obvious but this is surely a bug ...
one thing quickly, the compile error is totally my fault, I'm very aware that libmysqlclient_r.so is missing and that is breaking the build.