2017年12月3日日曜日

mipsコンパイル資料断片

mipsでpqi pen airの実験をした時の資料です。
下書きのままにしとくのもあれだったので。。。

ncurses-devel

http://www.arch.cs.titech.ac.jp/mcore/buildroot.html

mips32bit big

make -j core数

apt install bc g++
https://www.debian.org/ports/mips/index.ja.html

http://kaworu.jpn.org/cpp/g++%E3%82%92Ubuntu%E3%81%B8%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B


output/host/usr


ftp

telnet


helloworld

http://qiita.com/funa-tk/items/c4a239423eea018adea1


/////python build....
autoconf


./configure --prefix=/work/emb/ruby-trunk/outbin


///libxml2

wget ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz
適宜解凍
cd libxml2
mkdir outbin
autoconf
./configure CC=mips-linux-gcc  CXX=mips-linux-g++  --prefix=/work/emb/libxml2/outbin CFLAGS="-g -O2 -Wall -pedantic -static -march=24kc" ARCH=mips AR=mips-linux-ar LD=mips-linux-ld RANLIB=mips-linux-ranlib --without-python --without-iconv --without-zlib
make
make install

うまくいった!?
//////

///php5.5
wget http://in1.php.net/get/php-5.5.4.tar.gz/from/this/mirror
tar xfzv php-5.5.4.tar.gz
cd php-5.5.4/
./configure CC=mips-linux-gcc CXX=mips-linux-g++ AR=mips-linux-ar LD=mips-linux-ld RANLIB=mips-linux-ranlib --host=mips --target=mips -prefix=/work/emb/phpbin --without-sqlite3  --without-pdo-sqlite --without-pear --enable-simplexml --disable-mbregex  --enable-libxml --without-zlib  --with-libxml-dir=/work/emb/libxml2/outbin/ --disable-all  ARCH=mips
make
make install

/tmp/www/ftp/sda1/libxml2/outbin/bin # echo "<?php echo "a";?>">a.php
/tmp/www/ftp/sda1/libxml2/outbin/bin # ./mips-php a.php

Segmentation fault
//////

///python///
 wget https://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
cd Python-2.7.2
mkdir outbin
./configure CC=mips-linux-gcc  CXX=mips-linux-g++  --prefix=/work/emb/Python-2.7.2/outbin CFLAGS="-g -O2 -Wall -pedantic -static -march=24kc" ARCH=mips AR=mips-linux-ar LD=mips-linux-ld  RANLIB=mips-linux-ranlib --host=mips-linux

Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"

直し方 http://www.cnx-software.com/2011/02/04/cross-compiling-python-for-mips-and-arm-platforms/

Include/unicodeobject.h:575:20: error: unknown type name \u2018wchar_t\u2019
     register const wchar_t *w,  /* wchar_t buffer */
                    ^
Include/unicodeobject.h:593:14: error: unknown type name \u2018wchar_t\u2019
     register wchar_t *w,        /* wchar_t buffer */

wchar_t is defined in \clang\2.9\stddef.h and in \ansi\ctype.h. You will end up using the ctype.h definition if you include windows.h in your application. Have you tried including windows.h?

https://forums.ni.com/t5/LabWindows-CVI/unknown-type-name-wchar-t/td-p/2978413

1
2
export CFLAGS="-g3 -fsanitize=undefined -DPY_FORMAT_LONG_LONG=1"
export CXXFLAGS="-g3 -fsanitize=undefined -fno-sanitize=vptr -DPY_FORMAT_LONG_LONG=1"



////

http://samarthparikh.blogspot.jp/2013/09/cross-compile-lighttpd-php-for-arm.html
http://xmlsoft.org/downloads.html
https://forum.nginx.org/read.php?3,64091,87800
http://stackoverflow.com/questions/29971622/cross-compiling-driver-for-mips
http://qiita.com/dodo5522/items/32cc28e4f10ad7ed4b8d




0 件のコメント:

コメントを投稿

[MCPE] MinetをLinuxで動かしてみる!

たぶん、サーバーはlinux使うことが多いでしょうから、linux(ubuntu)で試してみます。 入れとくソフト -git -mono-xbuild -nuget 1.monoの最新版を入れてください ubuntu16.04ならば sudo apt-...