회사일/STLinux2010. 2. 25. 10:22
파이썬을 크로스 컴파일(라고 하지만 엄밀하게는 타겟보드에서 컴파일)하는데 에러가 두가지가 났다.

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.


아무튼 bzip 다운로드는 아래 링크에서 하면된다.
[링크 : http://www.bzip.org/]


그나저나. 저넘의 termios는 어쩔? ㄱ-
Posted by 구차니
프로그램 사용/VLC2010. 2. 24. 18:32
libavcodec은 ffmpeg에 포함되어 있다. (= ffmpeg을 받아서 설치)

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
[링크 : http://ffmpeg.org/download.html]

git clone git://git.videolan.org/x264.git
[링크 : http://www.videolan.org/developers/x264.html]

'프로그램 사용 > VLC' 카테고리의 다른 글

VLC GLIBC runtime error  (0) 2010.03.16
VLC 1.0.5 컴파일시 magic.h 오류  (0) 2010.03.10
vlc-1.0.5 cross compile  (3) 2010.02.09
VLC cross compile시 오류 (vlc-1.0.4)  (0) 2010.02.03
VLC 1.0.4 cross compile + busybox  (0) 2010.02.02
Posted by 구차니
Python 이라는 녀석을 타겟보드에서 컴파일했다!


한시간 넘게 걸리네 -ㅁ-?
(탱자탱자~ 데굴데굴)

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

오늘 일이 안되는건  (2) 2010.03.10
직장일기 - 20100303  (0) 2010.03.03
회사에 나갔다.  (8) 2010.02.21
아프다고 쉬어놓고 왜 일을 안해?!  (6) 2010.02.19
내가 잘하는건 멀까?  (6) 2010.02.16
Posted by 구차니
개소리 왈왈2010. 2. 24. 10:30


어느게 어느 검색엔진으로 나온 결과일까요~


'개소리 왈왈' 카테고리의 다른 글

죄수의 딜레마 - 에어컨  (6) 2010.02.26
인간이 변하는 방법?  (4) 2010.02.25
티스토리 초대장 또 안줘!!!  (2) 2010.02.23
반달이라는것이 정말 존재할수 있을까?  (10) 2010.02.23
남한산성 라면산성?  (2) 2010.02.20
Posted by 구차니
개소리 왈왈2010. 2. 23. 22:13
머. 이미 10장 있으니 마음을 비우자~
라고 하고 싶지만..


문득 공지를 보다가 리플에 눈이 갔다.


흐음.. 많아도 안주는건가?
아니면 적으면 이자 안주듯 초대장도 안주는건가? (그럴리가!)

'개소리 왈왈' 카테고리의 다른 글

인간이 변하는 방법?  (4) 2010.02.25
검색엔진별 키워드 차이점  (2) 2010.02.24
반달이라는것이 정말 존재할수 있을까?  (10) 2010.02.23
남한산성 라면산성?  (2) 2010.02.20
울면안돼~ 울면안돼~  (4) 2010.02.19
Posted by 구차니
회사일/STLinux2010. 2. 23. 20:27

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로 하려고 에러가 난다. 심볼릭 링크 걸고 하려니 산넘어 산..
그냥 풀 타겟에서 크로스컴파일 해서 넘기자 ㄱ-

# python setup.py install
Using OpenSSL version 0x0090800f from
 Headers:       /usr/include
 Library:       /usr/lib/libssl.so
running install
running build
running build_py
running build_ext
building '_hashlib' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include -I/usr/include/python2.4 -c Modules/_hashopenssl.c -o build/temp.
linux-sh4-2.4/Modules/_hashopenssl.o
gcc -shared build/temp.linux-sh4-2.4/Modules/_hashopenssl.o -L/usr/lib -lssl -lcrypto -o build/lib.linux-sh4-2.4/_hashlib.so
running install_lib
copying build/lib.linux-sh4-2.4/_hashlib.so -> /usr/lib/python2.4/site-packages
copying build/lib.linux-sh4-2.4/hashlib.py -> /usr/lib/python2.4/site-packages
byte-compiling /usr/lib/python2.4/site-packages/hashlib.py to hashlib.pyc

[링크 : http://trac.calendarserver.org/ticket/292]
[링크 : http://code.krypto.org/python/hashlib/] << 요기서 다운로드
Posted by 구차니
Linux2010. 2. 23. 18:05
일반적으로 패치는 diff -urN 옵션으로 만드는데
-u는 Unified의 약자이다.

아무튼 대충
diff -urN linux-2.6.17.14_stm22_0039_STFAE_ORI/.config.old linux-2.6.17.14_stm22_0039_STFAE/.config.old
--- linux-2.6.17.14_stm22_0039_STFAE_ORI/.config.old    2007-11-29 16:36:18.000000000 +0900
+++ linux-2.6.17.14_stm22_0039_STFAE/.config.old        2009-05-27 15:27:09.000000000 +0900
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.17.14
-# Thu Nov 29 16:36:17 2007
+# Wed May 27 15:27:09 2009
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
요런식으로 내용이 나오는데, 아래와 같은 의미이다.

비교된 파일은 --- linux-2.6.17.14_stm22_0039_STFAE_ORI/.config.old 파일로 부터 (원본)
+++ linux-2.6.17.14_stm22_0039_STFAE/.config.old 파일을 보고 작성되었으며 (수정본)

@@ -1,7 +1,7 @@
--- 파일의 1에서 7라인이 삭제되고  (~라인 까지가 아니다)
+++ 파일의 1에서 7라인이 추가된다. (~라인 까지가 아니다)
(7개 라인이라는데 8개 라인인 이유는, 추가/삭제된 표시 때문이다. 이를 제외하면 원래 길이인 7줄이 나온다)

삭제된 내용은 -# Thu Nov 29 16:36:17 2007
추가된 내용은 +# Wed May 27 15:27:09 2009
이다.

The unified output format starts with a two-line header, which looks like this:

--- from-file from-file-modification-time
+++ to-file to-file-modification-time

You can change the header's content with the `-L label' or `--label=label' option; see See section Showing Alternate File Names.

Next come one or more hunks of differences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-range to-file-range @@
 line-from-either-file
 line-from-either-file...

The lines common to both files begin with a space character. The lines that actually differ between the two files have one of the following indicator characters in the left column:

`+'    A line was added here to the first file.
`-'    A line was removed here from the first file.

[링크 : http://www.chemie.fu-berlin.de/chemnet/use/info/diff/diff_3.html]


2009/06/10 - [Linux] - diff 로 patch 파일 만들기

Posted by 구차니
회사일/STLinux2010. 2. 23. 10:27
/opt/STM/STLinux-2.2/devkit/sh4/target/usr/bin/python
/opt/STM/STLinux-2.2/devkit/sh4/target/lib/libutil-2.5.so
/opt/STM/STLinux-2.2/devkit/sh4/target/lib/libutil.so.1 -> libutil-2.5.so
/opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/python2.4/

아.. 미리 찾아볼껄 왜 이 삽질을 했을까 ㅠ.ㅠ
Posted by 구차니
Linux2010. 2. 23. 10:18
Posted by 구차니
개소리 왈왈2010. 2. 23. 02:28

반달인데 음.. 왜 저렇게 빨갛게 되었을까..

아무튼, 반달을 제외하면 초승달은 원호를 그린다.
지구가 크다고 해도 거리로 인해서 달을 아슬아슬하게 가린다고 하는데
그렇다면 곡면으로 가려지게 되므로
엄밀하게 반달을 생성되지 않아야 하는게 옳지 않을까라는 생각이 든다.


(요건 방향을 돌려놓은 것)

이렇게 왼쪾에서 부터 파먹어 들어가서 달이 점점 줄어드는데
도대체 어떻게 되어먹었길래 달을 파먹을수 잇을까?

만약에 달과 지구의 거리가 적절해서
달이 지구의 그림자의 크기와 비슷하다면 왼쪽과 같이
조금씩 파먹다가 완전히 가려지고 조금씩 생겨나서 반달은 불가능할테고

만약에 달과 지구의 거리가 짧아서 실질적으로 직선에 가깝다면
오른쪽과 같이 초승달은 불가능하지 않을까 싶은데 도대체 어떻게 된걸까?

음.. 오른쪽에 달이 구체이므로 초승달이 된다~
혹은 볼록달이 된다 쪽이 맞는걸려나?

'개소리 왈왈' 카테고리의 다른 글

검색엔진별 키워드 차이점  (2) 2010.02.24
티스토리 초대장 또 안줘!!!  (2) 2010.02.23
남한산성 라면산성?  (2) 2010.02.20
울면안돼~ 울면안돼~  (4) 2010.02.19
심장이 없어  (4) 2010.02.17
Posted by 구차니