*** On GNU/Linux systems the GNU C Library should not be installed into
*** /usr/local since this might make your system totally unusable.
*** We strongly advise to use a different prefix. For details read the
FAQ.
*** If you really mean to do this, run configure again using the extra
*** parameter `--disable-sanity-checks'.
이런 에러가 발생한다.
원래 sanity check는
Optional Features:
--disable-sanity-checks really do not use threads (should not be used except
in special situations) [default=yes]
thread를 사용하지 않도록 하는 거라는데 음..
/usr/local에 설치하도록 강요하는게 왜 .. 이 옵션일까?
pkg-config는 라이브러리의 컴파일 당시 옵션이나
링킹시 필요한 옵션을 알려주는 역활을 하는 녀석이라고 한다.
아무튼 pkg-config가 존재하지 않는 시스템에서(예를 들어 STLinux Target)
vlc를 컴파일하려고 하니 에러가 발생한다(Fedora Core 6에는 존재한다.)
이러니 별별 변수를 다 쓰고
/usr/local/lib/pkg-config/*.pc
파일까지 복사해줘도 안되지 ㄱ-
vlc 컴파일 옵션중
# ./configure --help | grep AVCODEC
AVCODEC_CFLAGS
C compiler flags for AVCODEC, overriding pkg-config
AVCODEC_LIBS
linker flags for AVCODEC, overriding pkg-config
이녀석을 설정해도 안되고,
컴파일 시에도 이러한 에러가 나오지만 무시하고 넘어간다.
checking pkg-config is at least version 0.9.0... ./configure: line 23831: pkg-config: command not found
no
중요한건
혹시 모를
PKG_CONFIG_PATH 경로를 확인해야 한다는 점이다.
FC6에서는 /usr/local/lib/pkgconfig 였는데
타겟에서는 /lib/pkgconfig 였다 ㄱ-
pkg-config is a helper tool used when compiling applications and
libraries. It helps you insert the correct compiler options on the
command line so an application can use gcc -o test test.c `pkg-config --libs --cflags glib-2.0`
for instance, rather than hard-coding values on where to find glib (or
other libraries). It is language-agnostic, so it can be used for
defining the location of documentation tools, for instance.
libavcodec/vorbis_dec.c:1409: warning: no previous prototype for 'vorbis_inverse_coupling'
libavcodec/vorbis_dec.c: In function 'vorbis_decode_init':
libavcodec/vorbis_dec.c:575: warning: 'book_idx' is used uninitialized in this function
libavcodec/vorbis_dec.c:998: internal compiler error: in schedule_insns, at sched-rgn.c:2605
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://bugzilla.stlinux.com> for instructions.
make: *** [libavcodec/vorbis_dec.o] Error 1
요런 에러가 발생한다.
물론, 컴파일도 제대로 완료되지 못하고 결과물도 생성되지 않는다.
버그리폿하려다가 그냥 STLinux2.3에 들어있는 sh4-linux-gcc로 하니 문제없이 해결!
뭥미? ㄱ-
아무튼, PATH 변수의 경로를 바꾸는 법이 있다지만, 귀차니즘으로 인해
config.mak 파일의 CC= AS= 등에
전부 절대경로로 바꾸어 넣어주었다.
파이썬을 크로스 컴파일(라고 하지만 엄밀하게는 타겟보드에서 컴파일)하는데 에러가 두가지가 났다.
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로 하려고 에러가 난다. 심볼릭 링크 걸고 하려니 산넘어 산..
그냥 풀 타겟에서 크로스컴파일 해서 넘기자 ㄱ-