python transplant
host:
./configure
make python Parser/pgen
mv python hostpython
mv Parser/pgen Parser/hostpgen
make distclean
optional:
echo ac_cv_file__dev_ptmx=yes > config.site
echo ac_cv_file__dev_ptc=yes >> config.site
export CONFIG_SITE=config.site
configure arm:
CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib
./configure --host=arm-linux --build=x86_64-linux-gnu --prefix=/home/jason/lib/arm-python --disable-ipv6 --enable-shared
build:
chmod 777 ./setup.py
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="arm-linux-gnueabihf-gcc -shared" CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_TARGET=yes HOSTARCH=arm-linux BUILDARCH=x86_64-linux-gnu
make install HOSTPYTHON=./hostpython BLDSHARED="arm-linux-gnueabihf-gcc -shared" CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE_TARGET=yes prefix=/home/jason/lib/arm-python
Note
- Directory compiled by other library references, as follows:
- include paths: ~/lib/arm-python/include
- library paths: ~/lib/arm-python/lib
boost_python transplant
- /usr/include/python2.7 host file backup folder
- Copy the header file migration arm-python is good to /usr/include/python2.7
- ./bootstrap.sh
- Modify the generated project-config.jam file, specifically with reference to
Five were modified :()
- using gcc : arm : arm-none-linux-gnueabi-gcc ;
- option.set prefix :( compiler intersecting position is located);
- option.set exec-prefix :( intersecting position where the compiler) / bin;
- option.set libdir :( position where the cross compiler) / lib;
- option.set includedir :( position where the cross compiler) / include;
- ./bjam stage
- Harajuku is also the host of the first folder python2.7
- Directory compiled by other library references, as follows:
- include paths: ~/lib/boost/boost
- library paths: ~/lib/boost/stage/lib
libxml2 transplant
- mkdir build
- ./configure CC=/usr/bin/arm-linux-gnueabihf-gcc --host=arm-linux --prefix=/home/jason/lib/libxml2/build/ --with-python=/home/jason/lib/libxml2/python
CFLAGS="-I/home/jason/lib/arm-python/include/python2.7/" LDFLAGS="-L/home/jason/lib/arm-python/lib" - make -j8
- make install
- Directory compiled by other library references, as follows:
- include paths: ~/lib/libxml2/build/include
- library paths: ~/lib/libxml2/build/lib
Reproduced in: https: //www.jianshu.com/p/51924175dbe3