Hello,

I am having a compiler error when trying to build the MySQLdb python library on 
my Beaglebone. MySQL and other programs all build correctly. Only this 
particular library is having the issue. 

Here is the Python MySQLdb library source I want to use:

http://sourceforge.net/projects/mysql-python/

I am using the default Angstrom distribution on a Beaglebone A6 board (June 
2012 build). So far it is working flawlessly with everything else I need. Kudos 
to the development team for such an excellent distribution. 

Here is the sequence that leads up to the error. I have searched all over for a 
solution and it is eluding me:

root@beaglebone:~/MySQL-python-1.2.3# export C_INCLUDE_PATH=/usr/include
root@beaglebone:~/MySQL-python-1.2.3# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-armv7l-2.7/MySQLdb
running build_ext
building '_mysql' extension
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -fno-tree-vectorize 
-mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -D__SOFTFP__ 
--sysroot=/OE/angstrom-v2012-05/build/tmp-angstrom_v2012_05-eglibc/sysroots/beaglebone
 -fno-strict-aliasing -O2 -pipe -g -feliminate-unused-debug-types -DNDEBUG -g 
-O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) 
-D__version__=1.2.3 -I/usr/local/mysql/include/mysql -I/usr/include/python2.7 
-c _mysql.c -o build/temp.linux-armv7l-2.7/_mysql.o
In file included from _mysql.c:36:0:
/usr/local/mysql/include/mysql/my_config.h:1066:0: warning: "SIZEOF_OFF_T" 
redefined
/usr/include/python2.7/pyconfig.h:998:0: note: this is the location of the 
previous definition
arm-angstrom-linux-gnueabi-gcc -march=armv7-a -fno-tree-vectorize 
-mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -D__SOFTFP__ 
--sysroot=/OE/angstrom-v2012-05/build/tmp-angstrom_v2012_05-eglibc/sysroots/beaglebone
 -shared -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed 
build/temp.linux-armv7l-2.7/_mysql.o 
/usr/local/mysql/lib/mysql/libmysqlclient_r.a -L/usr/local/mysql/lib/mysql 
-L/usr/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread 
-lpython2.7 -o build/lib.linux-armv7l-2.7/_mysql.so
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../arm-angstrom-linux-gnueabi/bin/ld:
 this linker was not configured to use sysroots
collect2: ld returned 1 exit status
error: command 'arm-angstrom-linux-gnueabi-gcc' failed with exit status 1
root@beaglebone:~/MySQL-python-1.2.3#

I see a similar issue for the Ubuntu distribution here but am hoping someone on 
the list will have a workaround for Angstrom:

https://bugs.launchpad.net/ubuntu/+source/armel-cross-toolchain-base/+bug/692987

I am hoping that this is something simple to get cleared up. I have been 
banging my head trying to get this to work with various combinations but have 
had no luck so far. It's interesting that I can build the entire MySQL package 
from sources with no problems but this simple library is having the issue. I 
appreciate any help. 

Thanks!

_______________________________________________
Angstrom-distro-users mailing list
Angstrom-distro-users@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-users

Reply via email to