2009년 1월 5일 월요일

솔라리스(64bit) 에서 gcc 및 Apache 설치관련

솔라리스9(64bit) 에서 gcc 및 Apache 설치관련

# uname -a
SunOS MINSAPP1 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V240

# isainfo -b
64

솔라리스는 기본적으로 gcc가 설치되어 있지않다
먼저, gcc를 설치한다

http://sunfreeware.com 에서 gcc 를 받는다.(64bit 걸 받는다)

# pkgadd -d gcc...

/usr/local/bin 아래 gcc가 설치된다
file /usr/local/bin/gcc
/usr/local/bin/gcc:     ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped
(64bit 바이너리 포맷으로 컴파일되었음)

여기서 아파치를 설치하면 libgcc 관련 동적라이브러리를 설치하라고 하는 메시지를 받는다

libgcc 패키지를 설치한다.
역시, http://sunfreeware.com 에서 libgcc를 받는다

# pkgadd -d libgcc...

/usr/local/lib 아래 해당 동적 라이브러리들이 설치된다

<주의사항>
/usr/local/lib 아래에 있는 파일들은 32bit 바이너리 포맷으로 컴파일되어있다
64bit 바이너리 포맷으로 컴파일된 동적 라이브러리는 /usr/local/lib/sparcv9 아래에 있다

# file `ls -l /usr/local/lib/*so | grep -v ^d | awk '{print $9}'`
lib-org-w3c-dom.so:     ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
lib-org-w3c-dom.so.5:   ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
lib-org-w3c-dom.so.5.0.0:       ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
lib-org-xml-sax.so:     ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
lib-org-xml-sax.so.5:   ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
lib-org-xml-sax.so.5.0.0:       ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libffi-2.00-beta.so:    ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libffi.so:      ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libg2c.so:      ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libg2c.so.0:    ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libg2c.so.0.0.0:        ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libgcc_s.so:    ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
libgcc_s.so.1:  ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
libgcc_s_sparcv7.so:    ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
libgcj.so:      ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libgcj.so.5:    ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libgcj.so.5.0.0:        ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libobjc.so:     ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libobjc.so.1:   ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libobjc.so.1.0.0:       ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped
libstdc++.so:   ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
libstdc++.so.6: ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
libstdc++.so.6.0.1:     ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
libstdc++.so.6.0.3:     ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped

동적 라이브러리는 모두 32bit 바이너리 포맷이다
따라서 여기에 있는 libgcc_s.so.1 을 사용하면 링크과정에서 에러를 발생시킨다

# file `ls -l /usr/local/lib/sparcv9/*so | grep -v ^d | awk '{print $9}'`

lib-org-w3c-dom.so:     ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
lib-org-w3c-dom.so.5:   ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
lib-org-w3c-dom.so.5.0.0:       ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
lib-org-xml-sax.so:     ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
lib-org-xml-sax.so.5:   ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
lib-org-xml-sax.so.5.0.0:       ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libffi-2.00-beta.so:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libffi.so:      ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libg2c.so:      ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libg2c.so.0:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libg2c.so.0.0.0:        ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libgcc_s.so:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libgcc_s.so.1:  ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libgcc_s_sparcv9.so:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libgcj.so:      ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libgcj.so.5:    ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libgcj.so.5.0.0:        ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libobjc.so:     ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libobjc.so.1:   ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libobjc.so.1.0.0:       ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libstdc++.so:   ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libstdc++.so.6: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libstdc++.so.6.0.1:     ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped
libstdc++.so.6.0.3:     ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped

64bit 바이너리 포맷으로 컴파일 되었다

# vi /etc/profile
에서 LD_LIBRARY_PATH 에 /usr/local/lib/sparcv9 를 추가한다.(/usr/local/lib 가 아니다)

이제 본격적으로 아파치를 설치한다.
단, 컴파일 옵션에 -m64 옵션을 넣어준다

# CC="gcc -m64" ./configure --prefix=/usr/local/apache2 --enable-rule=SHARED_CORE --enable-module=so
# make && make install

참조url :

http://sunfreeware.com

http://pari.math.u-bordeaux.fr/archives/pari-dev-0310/msg00037.html

댓글 없음:

댓글 쓰기