note 60755 added to install.unix.solaris

From: Date: Mon, 16 Jan 2006 00:53:50 +0000
Subject: note 60755 added to install.unix.solaris
Groups: php.notes 
Request: Send a blank email to php-notes+get-101880@lists.php.net to get a copy of this message
building php versions 5.1 or later on solaris with mysql support (where mysql was installed from a binary package) results in this error: ld: fatal: relocations remain against allocatable but non-writable sections root cause: mysql binary packages do not include shared libraries (or static libraries with relocatable code). it does not matter whose ld is used; i tried both /usr/ccs/bin and the current gnu binutils. fix: build mysql from source. i used these options: CFLAGS="-O3 -mcpu=v8 -Wa,-xarch=v8plusa" \ CXX=gcc \ CXXFLAGS="-O3 -mcpu=v8 -Wa,-xarch=v8plusa \ -felide-constructors -fno-exceptions -fno-rtti" \ ./configure \ --prefix=/usr/local/mysql --enable-assembler \ --with-unix-socket-path=/tmp/mysql.sock \ --with-mysqld-user=mysql --with-zlib-dir=/usr/local \ --with-openssl=/usr/local --prefix=/opt/mysql note that the v8 cpu options assume ultrasparc; anyone running supersparc hardware should upgrade to netbsd first. mysql documentation recommends the "--with-mysqld-ldflags=-all-static" option, but this is not compatible with ssl support. after the compile finishes (with older machines, this takes long enough for coffee or a quick lunch), install. inform solaris of the new libraries with an appropriate incantation of crle(1), such as crle -c /var/ld/ld.config -l CURRENT_LIB_PATH:/opt/mysql/lib/mysql next, build php. i used the following options: CFLAGS="-mcpu=v8 -Wa,-xarch=v8plusa" \ CXXFLAGS="-mcpu=v8 -Wa,-xarch=v8plusa \ -felide-constructors -fno-exceptions -fno-rtti" \ './configure' \ '--prefix=/usr/local' \ '--with-apxs2=/usr/local/bin/apxs' \ '--with-mysql=/opt/mysql' \ '--with-xsl=/usr/local' \ '--with-openssl=/usr/local' \ '--with-gd=/usr/local' \ '--with-mysql-sock=/tmp/mysql.sock' \ '--with-zlib' \ '--with-zlib-dir=/usr/local' \ '--enable-sockets' compile and install. hopefully the above will help someone; i burned way too much development time tracking this down (and waiting for multiple compile runs)... the resulting php fails tests for these bugs: 24640 32555 33532 35785 and 32001. everything else "seems to work". ---- Manual Page -- http://www.php.net/manual/en/install.unix.solaris.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60755 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60755&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60755&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#101880) next »