@sirjhswin
인간이 변하는 방법은 3가지밖에 없다. 첫째, 시간 배분을 바꾼다.둘째, 사는 장소를 바꾼다.세번째는 교류하는 사람을 바꾼다.
이 세가지 요소가 아니고서는 인간은 변하지 않는다.가장 무의미한것은 ‘새로운 결심을 하는 것’(결의를 새롭게 하는 것)이다.
파이썬을 크로스 컴파일(라고 하지만 엄밀하게는 타겟보드에서 컴파일)하는데 에러가 두가지가 났다.
Python-2.6.4# make
make: Current time: Timestamp out of range; substituting 1970-01-01 00:00:00
make: Warning: File `Makefile' has modification time 1.3e+09 s in the future
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers building 'termios' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/root/Python-2.6.4/./Include -I. -II
nclude -I./Include -I/usr/local/include -I/root/Python-2.6.4/Include -I/root/Python-2.6.4 -c /root/Python-2.6.4/Modules/termios.c -o build/temp.linux-sh4-2.6/root/Python-2.6.4/Modules/termios.o
/root/Python-2.6.4/Modules/termios.c:753: error: invalid application of 'sizeof' to incomplete type 'struct serial_struct'
/root/Python-2.6.4/Modules/termios.c:753: error: array type has incomplete element type
/root/Python-2.6.4/Modules/termios.c:753: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark
) in c_expr_sizeof_type, at c-typeck.c:2105
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://bugzilla.stlinux.com> for instructions. building 'bz2' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/root/Python-2.6.4/./Include -I. -II
nclude -I./Include -I/usr/local/include -I/root/Python-2.6.4/Include -I/root/Python-2.6.4 -c /root/Python-2.6.4/Modules/bz2module.c
-o build/temp.linux-sh4-2.6/root/Python-2.6.4/Modules/bz2module.o
gcc -pthread -shared build/temp.linux-sh4-2.6/root/Python-2.6.4/Modules/bz2module.o -L/usr/local/lib -lbz2 -o build/lib.linux-sh4-2.
6/bz2.so
*** WARNING: renaming "bz2" since importing it failed: libbz2.so.1.0: cannot open shared object file: No such file or directory
Failed to find the necessary bits to build these modules:
_bsddb _sqlite3 _tkinter
bsddb185 dbm gdbm
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
bz2 termios
running build_scripts
make: warning: Clock skew detected. Your build may be incomplete.
# make
If compilation produces errors, or a large number of warnings,
please read README.COMPILATION.PROBLEMS -- you might be able to
adjust the flags in this Makefile to improve matters.
Also in README.COMPILATION.PROBLEMS are some hints that may help
if your build produces an executable which is unable to correctly
handle so-called 'large files' -- files of size 2GB or more.
If you got this far and the 'cmp's didn't complain, it looks
like you're in business.
To install in /usr/local/bin, /usr/local/lib, /usr/local/man and
/usr/local/include, type
make install
To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type
make install PREFIX=/xxx/yyy
If you are (justifiably) paranoid and want to see what 'make install'
is going to do, you can first do
make -n install or
make -n install PREFIX=/xxx/yyy respectively.
The -n instructs make to show the commands it would execute, but
not actually execute them.
Instructions for use are in the preformatted manual page, in the file
bzip2.txt. For more detailed documentation, read the full manual.
It is available in Postscript form (manual.ps), PDF form (manual.pdf),
and HTML form (manual.html).
You can also do "bzip2 --help" to see some helpful information.
"bzip2 -L" displays the software license.
# make install
if ( test ! -d /usr/local/bin ) ; then mkdir -p /usr/local/bin ; fi
if ( test ! -d /usr/local/lib ) ; then mkdir -p /usr/local/lib ; fi
if ( test ! -d /usr/local/man ) ; then mkdir -p /usr/local/man ; fi
if ( test ! -d /usr/local/man/man1 ) ; then mkdir -p /usr/local/man/man1 ; fi
if ( test ! -d /usr/local/include ) ; then mkdir -p /usr/local/include ; fi
cp -f bzip2 /usr/local/bin/bzip2
cp -f bzip2 /usr/local/bin/bunzip2
cp -f bzip2 /usr/local/bin/bzcat
cp -f bzip2recover /usr/local/bin/bzip2recover
chmod a+x /usr/local/bin/bzip2
chmod a+x /usr/local/bin/bunzip2
chmod a+x /usr/local/bin/bzcat
chmod a+x /usr/local/bin/bzip2recover
cp -f bzip2.1 /usr/local/man/man1
chmod a+r /usr/local/man/man1/bzip2.1
cp -f bzlib.h /usr/local/include
chmod a+r /usr/local/include/bzlib.h
cp -f libbz2.a /usr/local/lib
chmod a+r /usr/local/lib/libbz2.a
cp -f bzgrep /usr/local/bin/bzgrep
ln -s -f /usr/local/bin/bzgrep /usr/local/bin/bzegrep
ln -s -f /usr/local/bin/bzgrep /usr/local/bin/bzfgrep
chmod a+x /usr/local/bin/bzgrep
cp -f bzmore /usr/local/bin/bzmore
ln -s -f /usr/local/bin/bzmore /usr/local/bin/bzless
chmod a+x /usr/local/bin/bzmore
cp -f bzdiff /usr/local/bin/bzdiff
ln -s -f /usr/local/bin/bzdiff /usr/local/bin/bzcmp
chmod a+x /usr/local/bin/bzdiff
cp -f bzgrep.1 bzmore.1 bzdiff.1 /usr/local/man/man1
chmod a+r /usr/local/man/man1/bzgrep.1
chmod a+r /usr/local/man/man1/bzmore.1
chmod a+r /usr/local/man/man1/bzdiff.1
echo ".so man1/bzgrep.1" > /usr/local/man/man1/bzegrep.1
echo ".so man1/bzgrep.1" > /usr/local/man/man1/bzfgrep.1
echo ".so man1/bzmore.1" > /usr/local/man/man1/bzless.1
echo ".so man1/bzdiff.1" > /usr/local/man/man1/bzcmp.1
File "/usr/local/lib/python2.4/random.py", line 68, in ?
import _random
ImportError: /usr/local/lib/python2.4/lib-dynload/_random.so: undefined symbol: _PyArg_NoKeywords
요런 에러를 뱉어주시길래
먼가해서 한참을 골머리를 데굴데굴 굴려보았는데..
STLinux2.3 패키지에서
그냥 /usr/lib/python2.4 하위 폴더를 전부 교체 해주면된다.
아무래도 다른 버전과 꼬이거나 _error.so 파일에서 엉긴듯
(다른 이야기는 2.3과 2.4가 중복설치되면 그럴수도 있다고 한다.)
(이유는 모르겠지만, 2.4가 제대로 작동되는 기본 STLinux2.3 타켓에서는 _error.so가 발견되지 않았다.)
_error.so 를 해결하니, gdata 테스트에서
File "/usr/lib/python2.4/site-packages/gdata/tlslite/utils/cryptomath.py", line 13, in ?
from hashlib import sha1
ImportError: No module named hashlib
에러를 뱉어주신다. (뭥미!)
또 검색해보니, python2.5 용으로 추측되며 2.4용으로 backporting 된것이 존재한다고 한다.
문제는, 험난한... 컴파일의 벽 OTL python이 제대로 크로스컴파일 안된건지(ST 죽을래?)
gcc로 하려고 에러가 난다. 심볼릭 링크 걸고 하려니 산넘어 산..
그냥 풀 타겟에서 크로스컴파일 해서 넘기자 ㄱ-