Linux2010. 3. 9. 18:31
library 디렉토리를 보면
*.so
*.la
파일이 보인다.

so는 shared Object 이고
la는 머의 약자일려나?

2010.03.10 추가
la는 libtool archive ?

3.4 How to create a .la library (a.k.a. a libtool archive)?
[링크 : http://www.kdevelop.org/mediawiki/index.php/FAQ]

아무튼, la 파일은 텍스트 파일로, libtool에 의해서 사용되며,
라이브러리 정보를 포함하고 있다.

# cat /usr/lib/libgpg-error.la
# libgpg-error.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.5.10 (1.1220.2.130 2004/09/19 12:13:49)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libgpg-error.so.0'

# Names of this library.
library_names='libgpg-error.so.0.2.1 libgpg-error.so.0 libgpg-error.so'

# The name of the static archive.
old_library='libgpg-error.a'

# Libraries that this one depends upon.
dependency_libs=''

# Version information for libgpg-error.
current=2
age=2
revision=1

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=no

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/lib'                                             



[링크 : ttp://filext.com/file-extension/LA]

'Linux' 카테고리의 다른 글

glibc는.. 설치시 매~~~우 주의를 요합니다 ㄱ-  (0) 2010.03.11
glibc 컴파일하기  (0) 2010.03.11
fribidi - Unicode BIDIrectional Algorithm  (0) 2010.03.09
chkconfig  (0) 2010.03.06
ltrace, strace  (0) 2010.03.06
Posted by 구차니
컴파일 환경 자동화툴인
autoconf, automake, libtool을 설명한다.

컴파일시 각종 헤더들의 위치, 라이브러리들의위치
그리고 설치할 위치들을 설정하고,
컴파일할 프로그램의 세부 패키지를 설정한다.

아래는 ffmpeg의 configure --help 내용중 일부이다.
Standard options:
  --prefix=PREFIX         install in PREFIX          []

  --bindir=DIR            install binaries in DIR    [PREFIX/bin]
  --datadir=DIR           install data files in DIR  [PREFIX/share/ffmpeg]
  --libdir=DIR            install libs in DIR        [PREFIX/lib]
  --shlibdir=DIR          install shared libs in DIR [PREFIX/lib]
  --incdir=DIR            install includes in DIR    [PREFIX/include]
  --mandir=DIR            install man page in DIR    [PREFIX/share/man]

Advanced options (experts only):
  --enable-cross-compile   assume a cross-compiler is used
  --arch=ARCH              select architecture []
  --target-os=OS           compiler targets OS []
  --cross-prefix=PREFIX    use PREFIX for compilation tools []
  --source-path=PATH       path to source code [/home/morpheuz/st7109/target_ori/root/ffmpeg]
  --sysroot=PATH           root of cross-build tree
  --sysinclude=PATH        location of cross-build system headers
  --target-exec=CMD        command to run executables on target
  --target-path=DIR        path to view of build directory on target
  --nm=NM                  use nm tool
  --as=AS                  use assembler AS []
  --cc=CC                  use C compiler CC [gcc]
  --ld=LD                  use linker LD
  --host-cc=HOSTCC         use host C compiler HOSTCC
  --host-cflags=HCFLAGS    use HCFLAGS when compiling for host
  --host-ldflags=HLDFLAGS  use HLDFLAGS when linking for host
  --host-libs=HLIBS        use libs HLIBS when linking for host
  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS []
  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
  --extra-libs=ELIBS       add ELIBS []
  --extra-version=STRING   version string suffix []
  --build-suffix=SUFFIX    library name suffix []
  --cpu=CPU                select the minimum required CPU (affects
                           instruction selection, may crash on older CPUs)
  --disable-yasm           disable use of yasm assembler
  --enable-pic             build position-independent code

이녀석의 경우 arch 와 target-os를 조합해서 cross compiler prefix를 만들어 낸다.
예를들어 sh4-linux의 경우
--enable-cross-compile --arch=sh4 --target-os=linux 라고 하면
자동으로 sh4-linux- 접두를 붙이게 된다.

하지만, target 에만 존재하는 library를 끌어 오려면 어떤 옵션을 써야 하나.. 후우..

[링크 : http://wariua.springnote.com/pages/1041972] << 한글 번역
[링크 : http://sources.redhat.com/autobook/]
Posted by 구차니
프로그램 사용/libjpeg2009. 5. 20. 21:49
상당히 끙끙대게 하던 녀석인데.. 겨우겨우 해결이 되었다..
해결 방법은 의외로 간단하다.(안해보고 고생 안했으면 말을 하지마세요?!)

1. ./configure --prefix=$(TARGET_ROOT_FS)/usr CC=$(CROSS)-gcc

2. vi Makefile
 38 # If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty.^M
 39 LIBTOOL = ./libtool^M
※ libtool은 쉘스크립트로 내용을 수정해야 하므로, 편의상 jpeg-6b 디렉토리에 복사를 하였다.

3. vi libtool
262 # The linker used to build libraries.
263 LD=$(CROSS)-ld
264 #LD="/usr/bin/ld"
※ libtool은 쉘스크립트로 내용을 수정해야 하므로, 복사본을 사용하도록 한다.



make install 시에는
$(TARGET_ROOT_FS)/usr/bin 이 존재하지 않으면 에러가 발생하므로 미리 확인하거나
cjpeg / djpeg / jpegtran / rdjpegcom / wrjpegcom 이 필요 없다면 무시해도 된다.

[링크 : http://metastatic.org/text/libtool.html]
Posted by 구차니
프로그램 사용/libjpeg2009. 5. 18. 18:22
libtool: link: unable to infer tagged configuration
libtool: link: specify a tag with `--tag'

라는 에러가 날경우에는, make 파일에서
libtools를 찾은후 --tag=CXX 를 넣어 주면 된다.

vi jpeg-6b/Makefile
142 .c.lo:^M
143         $(LIBTOOL) --tag=CXX --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c^M

[링크 : http://www.geodynamics.org/roundup/issues/issue40]



위의 방법은 제대로 된 해결 방법이 아니다.
./configure --prefix 를 하면 위의 설정을 하지 않아도 제대로 작동한다.

2009/05/20 - [프로그램 사용/libjpeg] - libjpeg 크로스컴파일 하기 - libjpeg cross-compile using libtool

Posted by 구차니