반응형

 

AIX에서 각각의 라이브러리 버전을 확인하고자 할 때 어떻게 해야하는지 한참 찾다가 드디어 발견..

컴파일 후 다른 머신에서 실행시 발생하는 동적 라이브러리 버전 때문에 확인해야 할 경우 미리 확인하면 유용할 듯..

 

--------------------------------------------------------------------------------------

exec(): 0509-036 다음 오류 때문에 <프로그램 명> 프로그램을 로드할 수 없습니다.
0509-130 <프로그램 명>에 대한 기호 해상도가 다음 이유 때문에 실패했습니다.
0509-136 __pth_init(번호 134) 기호가 종속 모듈
/lib/libpthread.a[shr_xpg5_64.o]에서 반출되지 않았습니다.
0509-192 'dump -Tv' 명령으로 .loader 섹션 기호를
시험하십시오.

--------------------------------------------------------------------------------------

뭐 대략 이런 에러 .... ㅡㅡ... 산산조각 깨졌네요 허허허

해당 에러가 나올 때는 AIX 라이브러리 셋 을 570+으로 업그레이드 하라는데...

5.3.7.0 이상으로 하라는건가...? 뭐 어쨋든 컴파일한 머신과 라이브러리 버전이 같다면 큰 문제는 없을듯.

 

근데 어디서 어떻게 라이브러리를 업데이트 받는걸까..

혹시 지나가시다가 아시는 분 생기시면 댓글 달아주시면 정말 감사드릴텐데.. ㅋ

 

 

명령어

lslpp -al

옵션은 al 정도만 사용해도 충분하게 다 커버할 수 있는 듯하다 필요하다면 man으로 자세한 내용을 확인하자

아래는 실제로 커맨드시 출력되는 내용들

 

 

 

 

우선 OSLEVEL을 확인하시려면

#> oslevel -r

5300-04

 

와 같이 뜨구요.

xlC 컴파일러 라이브러리 파일셋을 보려면

 

#> lslpp -l xlC*rte

  파일 세트                     레벨  상태       설명
  ----------------------------------------------------------------------------
경로: /usr/lib/objrepos
  xlC.aix43.rte              4.0.2.2  확정됨     C Set ++ Runtime for AIX 4.3
  xlC.aix50.rte             10.1.0.0  확정됨     XL C/C++ Runtime for AIX 5.3
  xlC.rte                     10.1.0.0  확정됨     XL C/C++ Runtime

 

뭐 요렇게 나오네요..

또한 해당 라이브러리의 파일셋이 어디인지 알고 싶다면 -w 옵션을 사용.

#> lslpp -w /usr/lib/libpthreads.a

  파일                                        파일 세트             유형
  ----------------------------------------------------------------------------
  /usr/lib/libpthreads.a             bos.rte.libpthreads   Symlink

 

해당 라이브러리의 인스톨 및 언데이트 히스토리를 알고 싶다면 -h 옵션을 사용

 

#> lslpp -h bos.rte.libpthreads

  파일 세트       레벨      조치         상태         날짜         시간
  ----------------------------------------------------------------------------
경로: /usr/lib/objrepos
  bos.rte.libpthreads
                  5.3.8.0   확정         완료         09/07/09     01:20:56
                  5.3.9.0   확정         완료         10/03/25     14:55:11

이것도 요렇게 친절하게 나옵니다..

 

 

 

 

 

 

반응형
반응형

 

-------------------------------------------------------

file [바이너리명]

: 몇 비트 파일인지 확인 할 수 있다.

 

-------------------------------------------------------

nm 사용법 -> 알아봅시다.

 

 

-------------------------------------------------------

- 해석되지 않은 심볼
현상 : ld: 0711-317 ERROR: Undefined symbol: .pow
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
원인 : 심볼을 해석하지 못한 에러는 다양한 경우에 발생할 수 있지만 대부분의 이유는 필요한 파일을 제대로 주지 않은 경우이다.
조치 : 라이브러리에 들어있지 않은 라이브러리 함수를 호출하는 경우 해당하는 함수가 들어있는 라이브러리를 지정해주어야 한다.

- 동일한 심볼을 중복해서 정의할 경우 프로그래밍 에러가 발생.
현상 : ld: 0711-224 WARNING: Duplicate symbol:
.A<int>::f()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
원인 : 이 경우 링커는 첫번째 심볼 만을 인정하기 때문에 의도하지 않은 결과가 발생할 수 있다. 함수의 이름을 바꾸던가 정적(static) 함수를 사용해야 한다.
조치 : 심볼이 중복되어 똑같이 정의되어 있으므로 -bhalt:5 옵션을사용해서 링커에게 메시지를 보여주지 않도록 해야 한다.
-bhalt 링커 옵션은 링킹 과정 중 지정한 숫자보다 적은 에러메시지가 발생하면 이 메시지를 보여주지 않도록 한다.

- 링킹과정 중 메모리가 충분하지 않을 때
현상 : ld: 0711-101 fatal error, allocation of bytes fail in routine initsymtab_info.
There is not enough memory.
원인 : 대부분 원인은 페이징 공간이 너무 크기가 작거나, 링커명령을 사용한 사용자의 자원제한이 너무 낮아서 발생한다.
조치 : 위와 같은 에러가 발생하면 다음 사항을 체크해보고 가능하다면 페이징 공간을 늘리는 편이 좋다.
1.시스템 내의 가용한 페이징 공간
2.링커를 사용한 사용자가 사용할 수 있는 자원의 제한. 이 상황은 ulimit 명령으로 알아볼 수 있다.

-------------------------------------------------------

-lm

/bin/sh ./libtool --silent --tag=CC --mode=link gcc -g -O2 -Wall -W -D_THREAD_SAFE -o utilities/animate utilities/animate.o magick/libMagick.la wand/libWand.la
ld: 0711-317 ERROR: Undefined symbol: .fmod
ld: 0711-317 ERROR: Undefined symbol: .cos
ld: 0711-317 ERROR: Undefined symbol: .sin
ld: 0711-317 ERROR: Undefined symbol: .pow
ld: 0711-317 ERROR: Undefined symbol: .ceil
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-317 ERROR: Undefined symbol: .cexp
ld: 0711-317 ERROR: Undefined symbol: .exp
ld: 0711-317 ERROR: Undefined symbol: .floor
ld: 0711-317 ERROR: Undefined symbol: .atan2
ld: 0711-317 ERROR: Undefined symbol: .hypot
ld: 0711-317 ERROR: Undefined symbol: .tan
ld: 0711-317 ERROR: Undefined symbol: .log
ld: 0711-317 ERROR: Undefined symbol: .log10
ld: 0711-317 ERROR: Undefined symbol: .acos
ld: 0711-317 ERROR: Undefined symbol: .asin
ld: 0711-317 ERROR: Undefined symbol: .atan
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.

에러 제거시

You're obviously missing libm.so (or libm.a or libm.sl or whatever the
extension for (shared) libraries is on your system).

You can check config.sh to see if Configure includes -lm in the 'libs='
line

libs='-lbind -lnsl -ldbm -ldb -ldl -lld -lm -lcrypt -lc -lbsd';

if it does, check to see if libm.a is in any of the path's shown for
libs

libdirs=' /usr/local/ppc64/lib64  /lib /pro/local/lib';
libpth='/usr/local/ppc64/lib64 /lib /usr/lib /usr/ccs/lib /usr/local/lib';
libsdirs=' /lib /usr/local/ppc64/lib64';
libld.a /lib/libm.a /lib/libcrypt.a /lib/libc.a /lib/libbsd.a';
libspath=' /usr/local/ppc64/lib64 /lib /usr/lib /usr/ccs/lib /usr/local/lib';

-------------------------------------------------------

반응형

'OS > Common' 카테고리의 다른 글

Z 확장자 압축해제  (0) 2013.07.09
aix hpux solaris 특징 및 명령어 비교  (0) 2012.12.05
ftp 사용법 [명령어]  (0) 2011.10.20
Tar 와 Gzip Bzip2사용법  (0) 2011.10.20
unix/linux의 OS 32/64bit 확인 방법  (0) 2011.10.04

+ Recent posts