Results 1 to 2 of 2
Jan 1, 2002, 14:56 #1
- Join Date
- Nov 1999
- Brisbane, Australia
- 0 Post(s)
- 0 Thread(s)
[Plesk] mysql upgrade and gcc 2.96
Great now that there's a specific forum for this
the following question has yet to be answered on several forums i posted this so see if you guys can answer this
Okay i have yet to grab myself a Plesk server but am already trying to write up a guide for how i'm going to upgrade mysql from 3.23.36 to 3.23.47 compiling from source.
While writing this guide on how i'm going to upgrade mysql i came across a few issues.
1) according MySQL.com gcc version 2.96 compiler may result in problems with the compiled mysql binary and they recommend using gcc version >= 2.95.2 but NOT 2.96. Plesk uses gcc version 2.96.81 on RH 7.1 which may cause problems with mysql if i upgrade from source. Also redhat.com says there's bugs in 2.96.81 which 2.96.85 has fixed
2) i tried looking at down grading gcc to 2.95.3 but stuck on the instructions to do so. GCC web site said to install it into a version directory of it's own since it doesn't support make uninstall command so that simply removing that directory when you do not need that specific version of GCC any longer, and, if shared libraries are installed there as well, no more binaries exist that use them.
3) if with your help i figure out how to down grade gcc to 2.95.3, how do you tell it to use that version in it's own directory as opposed to the default one located at /usr/bin/gcc ??
Below is the thread containing partially completed guide and with your folks help and can finish the guide
Jan 1, 2002, 14:57 #2
- Join Date
- Nov 1999
- Brisbane, Australia
- 0 Post(s)
- 0 Thread(s)
1) I do not yet have a plesk powered web server, this guide is wholy based on theory - in other words what SHOULD work not what HAS worked.
2) This guide assumes you have Plesk standard installation and NOT Plesk rpm version installed. And was written mainly for me planning to get one of Rackshack.net's Intel based Plesk web servers.
4) # denotes the shell/telnet prompt
5) to find out which version of gcc compiler you have type
Rackshack.net's Intel based Plesk web servers with RH 7.1 seem to use gcc version 2.96 which according to MySQL.com may cause problems with the mysql binary that gets compiled.
You need the following tools to build and install MySQL from source:
[*] GNU gunzip to uncompress the distribution. [*] A reasonable tar to unpack the distribution. GNU tar is known to work. Sun tar is known to have problems. [*] A working ANSI C++ compiler. gcc >= 2.95.2, egcs >= 1.0.2 or egcs 2.91.66, SGI C++, and SunPro C++ are some of the compilers that are known to work.[*] A good make program, GNU make 3.75 or newer
Several of our users have reported random crashes and table corruption with MySQL binaries compiled with gcc 2.96 on the x86 Linux platform. Although we were unable to duplicate the problems ourselves or understand their exact cause, we suspect with a great degree of confidence that the problem was compiler related. Replacing the faulty binary with our binary always eliminated the problem.
We recommend that MySQL be compiled with gcc 2.95 if you have to compile your own binary at all. It is also acceptable to compile it with gcc 2.91 - builds with these compilers have been tested extensively. We would suggest, however, that you stay away from gcc 3.0 series until we have had some time to do some more extensive testing.
To determine if you should be concerned about this compiler issue, execute gcc -v from the command prompt on your system. If the compiler reports version 2.96, then there is a problem (this is the case, for example on RH 7.x series or Mandrake 8.x). In this case, you should not try to compile your own binary before downgrading to one of the compilers mentioned above. You should also NOT use the MySQL server provided with your distribution -- as this copy of MySQL was compiled with the same ill-advised compiler version.
Downgrade gcc compiler from 2.96 20000731 to 2.95.3
Since MySQL.com has warned that gcc 2.96 compiler may result in problems with the MySQL compiled binary, we might need to down grade to gcc 2.95.3 compiler.
a) Download gcc 2.95.3 from one of the following mirrors at http://www.gnu.org/order/ftp.html
b) To be completed soon.....
1. log into telnet and switch to root user
2. using wget grab the latest MySQL source tarball from one of the mirror download sites at http://www.mysql.com/Downloads/MySQL-3.23/
for convenience try
to download the source tarball straight to your plesk web server.
# cd /usr/local/src
# wget http://mysql.valueclick.com/Download...3.23.47.tar.gz
wait for your server to download the source tarball.
3. type the following commands at prompt # still in /usr/local/src as root user to begin with where VERSION is the mysql version number of the source tarball in this case 3.23.47
# groupadd mysql
# useradd -g mysql mysql
# gunzip < mysql-VERSION.tar.gz | tar -xvf -
# cd mysql-VERSION
# CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/psa/mysql --localstatedir=/usr/local/psa/mysql/var --with-unix-socket-path=/usr/local/psa/mysql/var/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-innodb --with-berkeley-db
# strip sql/mysqld
# make install
# chown -R root /usr/local/psa/mysql
# chown -R mysql /usr/local/psa/mysql/var
# chgrp -R mysql /usr/local/psa/mysql
# cp support-files/my-large.cnf /etc/my.cnf
# /usr/local/psa/mysql/bin/safe_mysqld --user=mysql &
Note this guide is written with Rackshack.net's Intel Plesk based standard install servers in mind and is based on theory and not practise.
i did some digging and even the authors of gcc don't recommend 2.96 even though this is an old message http://gcc.gnu.org/gcc-2.96.html
October 6th, 2000
It has come to our attention that some GNU/Linux distributions are currently shipping with ``GCC 2.96''.
We would like to point out that GCC 2.96 is not a formal GCC release nor will there ever be such a release. Rather, GCC 2.96 has been the code- name for our development branch that will eventually become GCC 3.0.
Current snapshots of GCC, and any version labeled 2.96, produce object files that are not compatible with those produced by either GCC 2.95.2 or the forthcoming GCC 3.0. Therefore, programs built with these snapshots will not be compatible with any official GCC release. Actually, C and Fortran code will probably be compatible, but code in other languages, most notably C++ due to incompatibilities in symbol encoding (``mangling''), the standard library and the application binary interface (ABI), is likely to fail in some way. Static linking against C++ libraries may make a binary more portable, at the cost of increasing file size and memory use.
To avoid any confusion, we have bumped the version of our current development branch to GCC 2.97.
Please note that both GCC 2.96 and 2.97 are development versions; we do not recommend using them for production purposes. Binaries built using any version of GCC 2.96 or 2.97 will not be portable to systems based on one of our regular releases.
If you encounter a bug in a compiler labeled 2.96, we suggest you contact whoever supplied the compiler as we can not support 2.96 versions that were not issued by the GCC team.
Please see http://gcc.gnu.org/snapshots.html if you want to use our latest snapshots. We suggest you use 2.95.2 if you are uncertain.
The GCC Steering Committee