Project

General

Profile

Notes on cross-compiling PostgreSQL for PPC

09-Apr-2012, KAB - cross-compilation on novatest01

  • First set up the ups products area
    • ksu root
    • su products
    • cd /nova/ups/postgres
    • mkdir v9_1_3
    • mkdir v9_1_3/LinuxPPC-GCC_4_5_0
    • mkdir v9_1_3/LinuxPPC-GCC_4_5_0/ups
    • cd v9_1_3/LinuxPPC-GCC_4_5_0/ups
    • (create the postgres.table)
  • Build a cross-compiled version of postgres
    • cd /scratch/products
    • mkdir postgres
    • cd postgres
    • wget http://ftp.postgresql.org/pub/source/v9.1.3/postgresql-9.1.3.tar.gz
    • tar --gunzip -xvf postgresql-9.1.3.tar.gz
    • cd postgresql-9.1.3
    • setup nova_crosscompiler v4_5_0-2_10_1 -q powerpc-603
    • export ZIC=/usr/sbin/zic [tried export ZIC=/export/dcm/usr/sbin/zic with no success]
    • ./configure --prefix=/nova/ups/postgres/v9_1_3/LinuxPPC-GCC_4_5_0 --exec-prefix=/nova/ups/postgres/v9_1_3/LinuxPPC-GCC_4_5_0 --host=powerpc-603-linux-gnu CXX=powerpc-603-linux-gnu-g++ CC=powerpc-603-linux-gnu-gcc --without-readline --without-zlib
    • gmake
    • gmake install
  • Declare the product
    • ups declare -f LinuxPPC -q GCC_4_5_0 -r /nova/ups/postgres/v9_1_3/LinuxPPC-GCC_4_5_0 -m postgres.table postgres v9_1_3