Results 1 to 3 of 3

Thread: PTS 2.6.0 Alpha 1 on CentOS 5

  1. #1
    Join Date
    Jan 2008
    Posts
    5

    Default PTS 2.6.0 Alpha 1 on CentOS 5

    Hi all,

    I wrote an installation script (below) for installing PTS and optional PHP dependencies on CentOS 5. I seem to be getting a segmentation fault when attempting to run "phoronix-test-suite gui". It looks to be coming from PHP. Does anyone know what the problem is? Or have suggestions for improving installation? This is my first experience with PTS.

    Thanks,
    Justin


    Code:
    #!/bin/sh
    
    # Exit when execution fails
    set -e
    
    # Exit if OS not supported
    if [ -z "`grep 'CentOS release 5' /etc/redhat-release 2>/dev/null`" ]; then
      echo "Script currently supports CentOS 5 only!" 1>&2
      exit 1
    fi
    
    # Add distribution's testing repository for PHP 5.2
    [ -f /etc/yum.repos.d/CentOS-Testing.repo ] ||\
    cat > /etc/yum.repos.d/CentOS-Testing.repo << EOF
    [c5-testing]
    name=CentOS-5 Testing
    baseurl=http://dev.centos.org/centos/\$releasever/testing/\$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
    includepkgs=php*
    EOF
    
    # Define machine dependent variables
    arch=""
    usrlib="/usr/lib"
    if [ "`uname -m`" = "x86_64" ]; then
      arch=".x86_64"
      usrlib="/usr/lib64"
    fi
    
    # Echo subsequent commands
    set -x
    
    # Install dependencies from distribution
    yum install -y --nogpgcheck\
      php-cli${arch} php-gd${arch} php-devel${arch}\
      gcc${arch} make${arch}\
      glib2-devel${arch} gtk2-devel${arch} byacc${arch} flex${arch}\
      freetype-devel${arch} libpng-devel${arch}
    
    # Prepare environment for local packages
    export CPATH=/usr/local/include
    export LIBRARY_PATH=/usr/local/lib
    export LD_LIBRARY_PATH=/usr/local/lib
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    
    # Build/install pixman (for cairo)
    cd /usr/local/src
    wget http://cairographics.org/releases/pixman-0.17.10.tar.gz
    tar xzf pixman-0.17.10.tar.gz
    cd pixman-0.17.10
    ./configure
    make
    make install
    cd .. && rm -fr pixman-0.17.10*
    
    # Build/install cairo (for php-gtk)
    cd /usr/local/src
    wget http://cairographics.org/releases/cairo-1.8.10.tar.gz
    tar xzf cairo-1.8.10.tar.gz
    cd cairo-1.8.10
    ./configure
    make
    make install
    cd .. && rm -fr cairo-1.8.10*
    
    # Build/install php_cairo (for php-gtk)
    cd /usr/local/src
    wget http://pecl.php.net/get/Cairo-0.2.0.tgz
    tar xzf Cairo-0.2.0.tgz
    cd Cairo-0.2.0
    phpize
    ./configure
    make
    make install
    cat > /etc/php.d/cairo.ini << EOF
    ; Enable cairo extension module
    extension=cairo.so
    EOF
    cd .. && rm -fr Cairo-0.2.0*
    
    # Build/install php-gtk
    cd /usr/local/src
    wget 'http://gtk.php.net/do_download.php?download_file=php-gtk-2.0.1.tar.gz' -O php-gtk-2.0.1.tar.gz
    tar xzf php-gtk-2.0.1.tar.gz
    cd php-gtk-2.0.1
    ./buildconf
    ./configure
    make
    make install
    cat > /etc/php.d/php_gtk2.ini << EOF
    ; Enable php_gtk2 extension module
    extension=php_gtk2.so
    EOF
    cd .. && rm -fr php-gtk-*
    
    # Build/install php-ming
    cd /usr/local/src
    wget 'http://sourceforge.net/projects/ming/files/Releases/Ming%200.4.3/ming-0.4.3.tar.gz/download' -O ming-0.4.3.tar.gz
    tar xzf ming-0.4.3.tar.gz
    cd ming-0.4.3
    ./configure --enable-php
    make
    make install
    cat > /etc/php.d/ming.ini << EOF
    ; Enable ming extension module
    extension=ming.so
    EOF
    cd .. && rm -fr ming-0.4.3*
    
    # Download/install php-fpdf
    cd /usr/share/doc
    wget 'http://www.fpdf.org/en/dl.php?v=16&f=tgz' -O fpdf16.tgz
    tar xzf fpdf16.tgz
    mv fpdf16/fpdf.php fpdf16/font $usrlib/php/pear
    mv fpdf16 php-fpdf
    rm -f fpdf16.tgz
    
    # Install Phoronix Test Suite
    cd /usr/local/src
    wget 'http://www.phoronix-test-suite.com/download.php?file=development/phoronix-test-suite-2.6.0a1' -O phoronix-test-suite-2.6.0a1.tar.gz
    tar xzf phoronix-test-suite-2.6.0a1.tar.gz
    cd phoronix-test-suite
    ./install-sh
    cd .. && rm -fr phoronix-test-suite*

  2. #2

    Default

    Is CentOS 5 using PHP 5.3 or what release? With some PHP + PHP-GTK combinations there seems to be a bug within PHP-GTK causing a segv.

    Nice script.

  3. #3
    Join Date
    Jan 2008
    Posts
    5

    Default

    The CentOS Testing repository has PHP 5.2. I just noticed that gtk2-devel depends on an older cairo-devel (1.2.4) from the distribution. Both cairo 1.2.4 and 1.8.10 produce libcairo.so.2. I tried linking /usr/lib64/libcairo.so.2 to /usr/local/lib/libcairo.so.2 with no improvement.

    Is there a way to specicfy LD_LIBRARY_PATH for PHP extensions (e.g. /usr/local/lib), or will it only look in system directories (configured by ldconfig)? I added links to other libraries in /usr/local/lib and still found no improvement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •