Pre-Requisite

  • subversion 및 의존성 있는 library/app 는 /home/lesstif/local 폴더에 설치된다고 가정
  • 아래의 순서대로 library 를 설치 & compile 해놓아야 함
  1. subversion 소스 압축 해제 (ex: tar zxvf subversion-1.7.13.tar.gz)
  2. cd subversion-1.7.13
  3. 의존성 있는 소스 download
    1. sh get-deps.sh

openssl

OpenSSL 빌드 참고

  1. wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz
  2. tar zxvf openssl-1.0.1e.tar.gz
  3. cd openssl-1.0.1e
  4. ./Configure hpux-parisc2-cc --prefix=/home/lesstif/local/ssl32
  5. vi Makefile
    1. CFLAG 를 찾아서 맨뒤에 +z 추가
  6. make && make install

Serf

  1. cd serf
  2. ./configure --with-openssl=/home/lesstif/local/ssl32/ && make
  3. make && make install

Unzip

  1. http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz/download 에서 소스 다운로드
  2. 압축 해제 및 cd
  3. make -f unix/Makefile hpux
  4. cp unzip /usr/local/bin

zlib

  1. wget http://zlib.net/zlib-1.2.8.tar.gz
  2. ./configure --prefix=/home/lesstif/local && make install

 

apache httpd

필요한건 apr, apr-util 이므로 httpd 를 컴파일하지 않고 apr 과 apr-util 만 컴파일해도 된다.

  1. http://apache.mirror.cdnetworks.com//httpd/httpd-2.2.25.tar.gz 다운로드
  2. tar zxvf httpd-2.2.25.tar.gz
  3. cd httpd-2.2.25
  4.  ./configure --enable-ssl --with-ssl=/home/lesstif/local/ssl32/ --prefix=/home/lesstif/local/apache-httpd && make
  5. compile 하다가 다음 linker 에러가 발생할수 있음

    libtool: link: warning: this platform does not like uninstalled shared libraries
    libtool: link: `htpasswd’ will be relinked during installation
    /usr/ccs/bin/ld: Unsatisfied symbols:
    apr_generate_random_bytes (first referenced in .libs/htpasswd.o) (code)
    collect2: ld returned 1 exit status
    gmake[2]: *** [htpasswd] Error 1 

     

    1. HP-UX 버전이 낮거나 OS patch가 안 되어서 kernel random device(/dev/random or /dev/urandom) 를 사용할수 없어서 발생
    2. 다음 Workaround 로 해결 (임시로 htpasswd 파일을 생성해서 컴파일 단계를 통과)

      cd support
      touch htpasswd
      cd ..
      make
      CODE

       

    3. http://dino.ciuffetti.info/2011/11/how-to-compile-apache-hpux-11-11-parisc/ 참고

apr, apr-util

  1. cd apr
  2. ./configure --prefix=/home/lesstif/local/ && make 
  3. make install
  4. cd ../apr-util
  5. ./configure --prefix=/home/lesstif/local/ --with-apr=/home/lesstif/local/bin/  && make (apr-util 은 apr 이 필요하므로 --with-apr 옵션 추가)
  6. make
  7. make install

Subversion compile

  1. svn source 다운로드
  2. sqlite-amalgamation 소스 다운로드

    1. wget http://www.sqlite.org/2013/sqlite-amalgamation-3080002.zip
    2. unzip sqlite-amalgamation-3080002.zip
    3. mv sqlite-amalgamation-3080002 sqlite-amalgamation
  3. configure

    ./configure --prefix=/home/lesstif/local --with-openssl=/home/lesstif/local/ssl32/ --with-apxs=/home/lesstif/local/bin/apxs  --with-zlib=/home/lesstif/local/ --with-serf=serf
    BASH
  4. make
  5. 다음 linker 에러가 발생할 경우 조치

    /usr/ccs/bin/ld: Can't find library: "dl"

     

    1. 원인: 32bit shared library 는 libdld.sl 인데 libtool 이 libdl.sl 을 찾아서 발생

    2. 조치: linker 가 찾는 library directory 에 symbolic link 추가

      1.  ln /usr/lib/libdld.sl /home/lesstif/local/lib/libdl.sl
      2. Makefile에 SVN_APR_LIBS 항목에 명시적으로 -ldl 을 추가해서 linker 가 찾을수 있게 설정
  6. make install

 

TroubleShoot

  1. 실행시 다음 에러 발생

    /usr/lib/dld.sl: Can't find path for shared library: libdld.2

  2. subversion 소스로 이동
  3. make clean 하여 기존 소스 cleaning
  4. vi Makefile

    ## Before
    LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
    ## After
    LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath /usr/lib $(libdir)
    BASH

     

    1. -rpath 를 찾아서 /usr/lib 을 추가
  5. make && make install