LINUX.ORG.RU

Ошибка кросс компиляции Python-2.7.1


0

1

Здравствуйте.
Помогите пожалуйста найти ошибку.
Собираю Python для балалайки hdx bd1.
Внутри стоит процессор SMP8642 (MIPSel)

Host - Ubuntu 10.10
Toolchain - Sourcery G++ Lite 4.3-51, установлен по инструкции

Python-2.7.1

Установил переменные окружения для toolchain:

$ export STAGE=~/SGPP/stage
$ export PATH=~/SGPP/bin:$PATH 
Скачал исходники, наложил Python-2.7.1-xcompile.patch

Собираю python и pgen для хоста.
$ ./configure
$ make python Parser/pgen
$ mv python hostpython
$ mv Parser/pgen Parser/hostpgen
$ make distclean
Запускаю кросскомпиляцию
$ CC='mips-linux-gnu-gcc -EL' \
   CXX='mips-linux-gnu-g++ -EL' \
   AR=mips-linux-gnu-ar \
   LD='mips-linux-gnu-ld -EL' \
   RANLIB=mips-linux-gnu-ranlib \
   CFLAGS='-EL -mips32r2 -Wa,-mips32r2 -mtune=74kf2_1 -mdspr2 -pipe -fPIC -s' \
   CXXFLAGS='-EL -mips32r2 -Wa,-mips32r2 -mtune=74kf2_1 -mdspr2 -pipe -fPIC -s' \
   CPPFLAGS="-I$STAGE/include" \
   LDFLAGS="-L$STAGE/lib" \
   ./configure --prefix=/opt/usr --host=mips-linux-gnu --build=i686-pc-linux-gnu
$ make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="mips-linux-gnu-gcc -shared" CROSS_COMPILE=mips-linux-gnu- CROSS_COMPILE_TARGET=yes
Собирается python, libpython2.7.a
Ломается на сборке динамических библиотек.
Сообщения об ошибке имеют такой вид:
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
/home/akhromov/SGPP/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation
/home/akhromov/SGPP/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: build/temp.linux-i686-2.7/home/akhromov/stuff/bd/rtorrent/trunk/Python-2.7.1/Modules/_struct.o: compiled for a little endian system and target is big endian
. . .
/home/akhromov/SGPP/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-51) 2.18.50.20080215 assertion fail /scratch/clm/2008q3-lite/obj/binutils-src-4.3-51-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:2651
. . .
 !!! и таких еще на 7 MB 
. . .
collect2: ld returned 1 exit status
. . .
Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _sqlite3           _tkinter        
bsddb185           bz2                dbm             
gdbm               readline           sunaudiodev     
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_bisect            _codecs_cn         _codecs_hk      
_codecs_iso2022    _codecs_jp         _codecs_kr      
_codecs_tw         _collections       _csv            
_ctypes_test       _curses            _curses_panel   
_elementtree       _functools         _hashlib        
_heapq             _hotshot           _io             
_json              _locale            _lsprof         
_multibytecodec    _multiprocessing   _random         
_socket            _ssl               _struct         
_testcapi          array              audioop         
binascii           cmath              cPickle         
crypt              cStringIO          datetime        
dl                 fcntl              future_builtins 
grp                imageop            itertools       
linuxaudiodev      math               mmap            
nis                operator           ossaudiodev     
parser             pyexpat            resource        
select             spwd               strop           
syslog             termios            time            
unicodedata        zlib                               
Ясно, что все начинается с пути /usr/local/include. Но откуда он его берет ума не приложу.
В общем туплю с этим безобразием уже день. Поиски в интернете ничего полезного не дали.
Посоветуйте, куда хоть рыть?
Как посмотреть команду которая выполняется с ошибкой?

С уважением, Алексей.



Последнее исправление: Axa (всего исправлений: 3)

Ответ на: комментарий от Axa

http://buildroot.uclibc.org/
git clone git://git.buildroot.net/buildroot
make menuconfig - выбираешь архитектуру, и ставишь галочку напротив python уж не помню в какой менюшке
make и забираешь профит

сабж собирает загрузчик, ядро и рутфс

VladimirMalyk ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.