Pike Distribution on OSX
This procedure a fresh install of pike with all non-Apple dependencies as static libraries, so that they don't have to be installed on each machine.Note: If you just care about installing Pike locally, homebrew has recipes for all of the dependencies you might need, as well as a (hopefully) up-to-date recipe for pike itself. There’s no need to follow this procedure if you can use homebrew… it’s a much quicker process: just do a brew install pike.This process as-written also has a downside if you plan on installing external modules from source: The installed module build files will reference a bunch of paths from this build process, which likely won't exist on other machines, so you'd need to edit those files to correct the paths.Dependencies included: gmp, nettle, jpeg, pcre, mariadbAdditional library dependencies may be included, as long as they are compiled as static libs (and without shared libs) and installed into the devel-$SDKVER directory before Pike is built. Do not, for example, install any libraries through Homebrew or other package managers.Also, we're using the OSX 10.9 (Mavericks) SDK so that we can use the resulting Pike on any OSX machine running 10.9 and newer.Note: This process can be used for other OS/SDK version combinations.Note: When using the 10.11 and 10.12 SDKs, the openssl headers and libs have been removed (they have been deprecated since 10.7). The OS still includes the dynamic libs, so to enable SSL support in the MariaDB/MySQL driver, you should copy /usr/lib/libssl* from the base OS and the headers from a configured copy of openssl 0.9.8z+ into the SDK and devel-10.12/include respectively.1. Install fresh OSX 10.92. Install Command line tools for Xcode from developer.apple.com (much smaller download)3. Install HomeBrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew analytics off brew install wget brew install xz brew install cmake mkdir $HOME/devel cd $HOME/devel
wget https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/MacOSX10.9.sdk.tar.xz xz -d MacOSX10.9.sdk.tar.xz tar -xvf MacOSX10.9.sdk.tar
cat << EOF > $HOME/devel/pike_env SDKVER=10.9 CPPFLAGS="-isysroot $HOME/devel/MacOSX$SDKVER.sdk -I$HOME/devel/devel-$SDKVER/include" CFLAGS="$CPPFLAGS" LDFLAGS="-L$HOME/devel/devel-$SDKVER/lib" LDDFLAGS="$LDFLAGS" MACOSX_DEPLOYMENT_TARGET=$SDKVER PATH=$PATH:$HOME/devel/devel-$SDKVER/bin LC_LOCALE=C LOCALE=C LC_ALL=C export SDKVER CPPFLAGS CFLAGS LDFLAGS LDDFLAGS PATH MACOSX_DEPLOYMENT_TARGET export LOCALE LC_ALL EOF . $HOME/devel/pike_env
cd $HOME/devel wget https://gmplib.org/download/gmp/gmp-5.1.3.tar.xz xz -d gmp-5.1.3.tar.xz tar xvf gmp-5.1.3.tar cd gmp-5.1.3.tar ./configure --with-pic --disable-shared --enable-static --prefix=$HOME/devel/devel-$SDKVER make make install
cd $HOME/devel wget https://ftp.gnu.org/gnu/nettle/nettle-3.3.tar.gz tar zxvf nettle-3.3.tar.gz cd nettle-3.3 ./configure --disable-shared --enable-static --prefix=$HOME/devel/devel-$SDKVER make make install
cd $HOME/devel wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz tar zxvf jpegsrc.v8d.tar.gz cd jpeg-8d ./configure --disable-shared --enable-static --disable-dependency-tracking --prefix=$HOME/devel/devel-$SDKVER make make install
wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz tar xvf pcre-8.40.tar.gz cd pcre-8.40 ./configure --disable-shared --enable-static --disable-dependency-tracking --enable-utf8 --enable-pcre8 --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-jit --prefix=$HOME/devel/devel-$SDKVER make make install
wget https://downloads.mariadb.org/interstitial/connector-c-2.3.2/mariadb-connector-c-2.3.2-src.tar.gz/from/http%3A//sfo1.mirrors.digitalocean.com/mariadb/ tar xzvf mariadb-connector-c-2.3.2-src.tar.gz cd mariadb-connector-c-2.3.2-src cmake -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_INSTALL_PREFIX:PATH=$HOME/devel/devel-$SDKVER . make all install cp mariadb_config/mariadb_config /usr/local/bin rm $HOME/devel/devel-$SDKVER/lib/mariadb/*.dylib
cd $HOME/devel wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.gz tar xzvf freetype-2.5.5.tar.gz cd freetype-2.5.5 ./configure --disable-shared --enable-static --disable-dependency-tracking --prefix=$HOME/devel/devel-$SDKVER make make install
cd $HOME/devel wget http://pike.lysator.liu.se/pub/pike/latest-stable/Pike-v8.0.404.tar.gz tar zxvf Pike-v8.0.404.tar.gz cd Pike-v8.0.404 make make verify make bin_export cd build/darwin-14.5.0-x86_64
ls -l Pike-v8.0.404-darwin-14.5.0-x86_64 Powered by PikeWiki2 |
|||
gotpike.org | Copyright © 2004 - 2009 | Pike is a trademark of Department of Computer and Information Science, Linköping University |