4.11 System-specific issuesThe following sections indicate some of the issues that have been observed to occur on particular systems when installing MySQL from a source distribution. 4.11.1 Solaris notes
On Solaris, you may run into trouble even before you get the MySQL
distribution unpacked! Solaris x mysql-3.22.12-beta/bench/Results/ATIS-mysql_odbc-NT_4.0-cmp-db2,informix,ms-sql,mysql,oracle,solid,sybase, 0 bytes, 0 tape blocks tar: directory checksum error
In this case, you must use GNU Sun native threads work only on Solaris 2.5 and higher. For 2.4 and earlier versions, MySQL will automatically use MIT-pthreads. 4.9 MIT-pthreads notes. If you get the following error from configure: checking for restartable system calls... configure: error can not run test programs while cross compiling
This means that you have something wrong with your compiler installation!
In this case you should upgrade your compiler to a newer version. You may
also be able to solve this problem by inserting the following row into the
ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
If you are using Solaris on a SPARC, the recommended compiler is
The recommended shell> CC=gcc CFLAGS="-O6" \ CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti" \ ./configure --prefix=/usr/local/mysql --with-low-memory
If you have the Sun Workshop 4.2 compiler, you can run CC=cc CFLAGS="-xstrconst -Xa -xO4 -native -mt" CXX=CC CXXFLAGS="-xO4 -native -noex -mt" ./configure --prefix=/usr/local/mysql shell> CC=cc CFLAGS="-Xa -fast -xO4 -native -xstrconst -mt" \ CXX=CC CXXFLAGS="-noex -XO4 -mt" \ ./configure
You may also have to edit the #if !defined(__STDC__) || __STDC__ != 1 to this: #if !defined(__STDC__)
If you turn on
If libc internal error: _rmutex_unlock: rmutex not held
Add
If you get the following error when compiling MySQL with shell> gcc -O3 -g -O2 -DDBUG_OFF -o thr_alarm ... ./thr_alarm.c: In function `signal_hand': ./thr_alarm.c:556: too many arguments to function `sigwait'
The proper thing to do in this case is to get the newest version of
Solaris doesn't provide static versions of all system libraries
( ld: fatal: library -ldl: not found
If too many processes try to connect very rapidly to Error in accept: Protocol error
You might try starting the server with the If you are linking your own MySQL client, you might get the following error when you try to execute it: ld.so.1: ./my: fatal: libmysqlclient.so.#: open failed: No such file or directory The problem can be avoided by one of the following methods:
4.11.2 Solaris 2.7 notesYou can normally use a Solaris 2.6 binary on Solaris 2.7. Most of the Solaris 2.6 issues also apply for Solaris 2.7. Note that MySQL 3.23.4 and above should be able to autodetect Solaris 2.7 and enable workarounds for the following problems!
Solaris 2.7 has some bugs in the include files. You may see the following
error when you use /usr/include/widec.h:42: warning: `getwc' redefined /usr/include/wchar.h:326: warning: this is the location of the previous definition If this occurs, you can do the following to fix the problem:
Copy #if !defined(lint) && !defined(__lint) to #if !defined(lint) && !defined(__lint) && !defined(getwc)
Alternatively, you can edit `/usr/include/widec.h' directly. Either
way, after you make the fix, you should remove `config.cache' and run
If you get errors like this when you run In file included from mysql.cc:50: /usr/include/term.h:1060: syntax error before `,' /usr/include/term.h:1081: syntax error before `;' The solution to this is to do one of the following steps:
4.11.3 Solaris x86 notes
If you are using shell> CC=gcc CFLAGS="-O6 -fomit-frame-pointer" \ CXX=gcc \ CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" \ ./configure --prefix=/usr/local/mysql
This will avoid problems with the
If this doesn't help, you should compile a debug version and run
it with a trace file or under 4.11.4 SunOS 4 notes
On SunOS 4, MIT-pthreads is needed to compile MySQL, which in turn
means you will need GNU
Some SunOS 4 systems have problems with dynamic libraries and
shell> ./configure --disable-shared --with-mysqld-ldflags=-all-static
When compiling
When compiling 4.11.5 Linux notes (all Linux versions)
MySQL uses LinuxThreads on Linux. If you are using an old Linux
version that doesn't have
If you can't start
One known problem with the binary distribution is that with older Linux
systems that use
When using LinuxThreads you will see a minimum of three processes running. These are in fact threads. There will be one thread for the LinuxThreads manager, one thread to handle connections, and one thread to handle alarms and signals.
If you see a dead
If you are using LinuxThreads and If you are using RedHat, you might get errors like this: /usr/bin/perl is needed... /usr/sh is needed... /usr/sh is needed...
If so, you should upgrade your version of You can get the upgrades of libraries to RedHat 4.2 from ftp://ftp.redhat.com/updates/4.2/i386. Or http://www.sunsite.unc.edu/pub/Linux/distributions/redhat/code/rpm/ for other distributions. If you are linking your own MySQL client and get the error: ld.so.1: ./my: fatal: libmysqlclient.so.4: open failed: No such file or directory when executing them, the problem can be avoided by one of the following methods:
If you are using the Fujitsu compiler
The following CC=fcc CFLAGS="-O -K fast -K lib -K omitfp -Kpreex -D_GNU_SOURCE -DCONST=const -DNO_STRTOLL_PROTO" CXX=FCC CXXFLAGS="-O -K fast -K lib -K omitfp -K preex --no_exceptions --no_rtti -D_GNU_SOURCE -DCONST=const -Dalloca=__builtin_alloca -DNO_STRTOLL_PROTO '-D_EXTERN_INLINE=static __inline'" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-low-memory 4.11.5.1 Linux-x86 notes
MySQL requires
On some older Linux distributions, Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual.
Just do what the error message says and add an extra underscore to the
You may get some warnings when compiling; those shown below can be ignored: mysqld.cc -o objs-thread/mysqld.o mysqld.cc: In function `void init_signals()': mysqld.cc:315: warning: assignment of negative value `-1' to `long unsigned int' mysqld.cc: In function `void * signal_hand(void *)': mysqld.cc:346: warning: assignment of negative value `-1' to `long unsigned int' In Debian GNU/Linux, if you want MySQL to start automatically when the system boots, do the following: shell> cp support-files/mysql.server /etc/init.d/mysql.server shell> /usr/sbin/update-rc.d mysql.server defaults 99
If
If you get the following error when linking /usr/lib/libc.a(putc.o): In function `_IO_putc': putc.o(.text+0x0): multiple definition of `_IO_putc'
You can avoid using `libg++.a' by running shell> CXX=gcc ./configure 4.11.5.2 RedHat 5.0 notes
If you have any problems with MySQL on RedHat, you should start by
upgrading
If you install all the official RedHat patches (including
The updates are needed since there is a bug in
If you have an incorrect version of
Another symptom of incorrect libraries is that shell> ./configure --with-mysqld-ldflags=-all-static
On Redhat 5.0, the easy way out is to install the
For the source distribution of http://www.mysql.com/Download/Linux/glibc-2.0.7-total-patch.tar.gz If you experience crashes like these when you build MySQL, you can always download the newest binary version of MySQL. This is statically-linked to avoid library conflicts and should work on all Linux systems! MySQL comes with an internal debugger that can generate trace files with a lot of information that can be used to find and solve a wide range of different problems. G.1 Debugging a MySQL server. 4.11.5.3 RedHat 5.1 notes
The Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for any possible OS dependent bug
After you have upgraded to
You can check which version of 4.11.5.4 Linux-SPARC notes
In some implementations,
Some problems will require patching your Linux installation. The patch can
be found at
http://www.mysql.com/patches/Linux-sparc-2.0.30.diff. This patch is
against the Linux distribution `sparclinux-2.0.30.tar.gz' that is
available at Thanks to jacques@solucorp.qc.ca for this information. 4.11.5.5 Linux-Alpha notes
The big problem on Linux-Alpha is that there are still some problems with
threads in
Note that before you run any programs that use threads (like Configure MySQL with the following command: shell> CC=gcc CCFLAGS="-Dalpha_linux_port" \ CXX=gcc CXXFLAGS="-O3 -Dalpha_linux_port -felide-constructors -fno-exceptions -fno-rtti" \ ./configure --prefix=/usr/local/mysql
Try to compile
After installing MySQL, uncomment the
Note that Linux-Alpha is still an alpha-quality platform for MySQL.
With the newest If you have problems with signals (MySQL dies unexpectedly under high load) you may have found an OS bug with threads and signals. In this case you can tell MySQL not to use signals by configuring with: shell> CFLAGS=-DDONT_USE_THR_ALARM \ CXXFLAGS=-DDONT_USE_THR_ALARM \ ./configure ...
This doesn't affect the performance of MySQL, but has the side
effect that you can't kill clients that are ``sleeping'' on a connection with
4.11.5.6 MkLinux notes
MySQL should work on MkLinux with the newest 4.11.5.7 Qube2 Linux notes
To get MySQL to work on Qube2, (Linux Mips), you need the newest
4.11.6 Alpha-DEC-Unix notes
When compiling threaded programs under Digital UNIX, the documentation
recommends using the shell> CC="cc -pthread" CXX="cxx -pthread -O" \ ./configure --with-named-thread-libs="-lpthread -lmach -lexc -lc"
When compiling mysqld.cc: In function void handle_connections()': mysqld.cc:626: passing long unsigned int *' as argument 3 of accept(int,sockadddr *, int *)'
You can safely ignore these warnings. They occur because
If you start the server directly from the command line, you may have problems
with it dying when you log out. (When you log out, your outstanding processes
receive a shell> nohup mysqld [options] &
4.11.7 Alpha-DEC-OSF1 notes
If you have problems compiling and have DEC shell> CC=cc CFLAGS=-O CXX=gcc CXXFLAGS=-O3 \ ./configure --prefix=/usr/local/mysql If you get problems with the `c_asm.h' file, you can create and use a 'dummy' `c_asm.h' file with: shell> touch include/c_asm.h shell> CC=gcc CFLAGS=-I./include \ CXX=gcc CXXFLAGS=-O3 \ ./configure --prefix=/usr/local/mysql
On OSF1 V4.0D and compiler "DEC C V5.6-071 on Digital UNIX V4.0 (Rev. 878)"
the compiler had some strange behavior (undefined shell> CC=gcc CXX=gcc CXXFLAGS=-O3 ./configure --prefix=/usr/local/mysql
In some versions of OSF1, the
The
When using shell> CFLAGS=-D_PTHREAD_USE_D4 CXX=gcc CXXFLAGS=-O3 ./configure .... If you have problems with signals (MySQL dies unexpectedly under high load) you may have found an OS bug with threads and signals. In this case you can tell MySQL not to use signals by configuring with: shell> CFLAGS=-DDONT_USE_THR_ALARM \ CXXFLAGS=-DDONT_USE_THR_ALARM \ ./configure ...
This doesn't affect the performance of MySQL, but has the side
effect that you can't kill clients that are ``sleeping'' on a connection with
4.11.8 SGI-Irix notes
You may have to undefine some things in `config.h' after running
In some Irix implementations, the SGI recommends that you install all of the patches on this page as a set: http://support.sgi.com/surfzone/patches/patchset/6.2_indigo.rps.html
At the very minimum, you should install the latest kernel rollup, the
latest You definately need all the POSIX patches on this page, for pthreads support: http://support.sgi.com/surfzone/patches/patchset/6.2_posix.rps.html If you get the something like the following error when compiling `mysql.cc': "/usr/include/curses.h", line 82: error(1084): invalid combination of type Then type the following in the top-level directory of your MySQL source tree: shell> extra/replace bool curses_bool < /usr/include/curses.h > include/curses.h shell> make There have also been reports of scheduling problems. If only one thread is running, things go slow. Avoid this by starting another client. This may lead to a 2-to-10-fold increase in execution speed thereafter for the other thread. This is a poorly-understood problem with Irix threads; you may have to improvise to find solutions until this can be fixed.
If you are compiling with shell> CC=gcc CXX=gcc CXXFLAGS=-O3 \ ./configure --prefix=/usr/local/mysql --with-thread-safe-client --with-named-thread-libs=-lpthread 4.11.9 FreeBSD notesThe easiest and therefor the preferred way to install is to use the mysql-server and mysql-client ports available on http://www.freebsd.org Using these gives you:
It is recomended to use MIT-pthreads on FreeBSD 2.x and native threads on versions 3 and up. It is possible to run with with native threads on some late 2.2.x versions but you may encounter problems shutting down mysqld. Be sure to have your name resolver setup correct. Otherwise you may experience resolver delays or failures when connecting to mysqld.
Make sure that the 127.0.0.1 localhost localhost.your.domain
If you notice that
If you get an error from shell> rm config.cache shell> ./configure --with-mit-threads
The behavior of FreeBSD FreeBSD is also known to have a very low default file handle limit. 18.11 File not found. Uncomment the ulimit -n section in safe_mysqld or raise the limits for the mysqld user in /etc/login.conf (and rebuild it witg cap_mkdb /etc/login.conf) also be sure you set the appropriate Class for this user in the password file if you are not using the default (use: chpass mysqld-user-name)
If you have a problem with
To get a secure and stable system you should only use FreeBSD kernels
that are marked 4.11.10 NetBSD notes
To compile on NetBSD you need GNU 4.11.11 BSD/OS notes4.11.11.1 BSD/OS 2.x notes
If you get the following error when compiling MySQL, your
item_func.h: In method `Item_func_ge::Item_func_ge(const Item_func_ge &)': item_func.h:28: virtual memory exhausted make[2]: *** [item_func.o] Error 1
Try using
If you are using
If you have a problem with 4.11.11.2 BSD/OS 3.x notesUpgrade to BSD/OS 3.1. If that is not possible, install BSDIpatch M300-038. Use the following command when configuring MySQL: shell> env CXX=shlicc++ CC=shlicc2 \ ./configure \ --prefix=/usr/local/mysql \ --localstatedir=/var/mysql \ --without-perl \ --with-unix-socket-path=/var/mysql/mysql.sock The following is also known to work: shell> env CC=gcc CXX=gcc CXXFLAGS=-O3 \ ./configure \ --prefix=/usr/local/mysql \ --with-unix-socket-path=/var/mysql/mysql.sock You can change the directory locations if you wish, or just use the defaults by not specifying any locations.
If you have problems with performance under heavy load, try using the
If you get the error 4.11.11.3 BSD/OS 4.x notesBSDI 4.x has some thread related bugs. If you want to use MySQL on this, you should install all thread related patches. At least M400-023 should be installed. 4.11.12 SCO notesThe current port is tested only on a ``sco3.2v5.0.4'' and ``sco3.2v5.0.5'' system. There has also been a lot of progress on a port to ``sco 3.2v4.2''.
SCO development notes:
If you want to install DBI on SCO, you have to edit the `Makefiles' in DBI-xxx and each subdirectory: OLD: NEW: CC = cc CC = gcc -belf CCCDLFLAGS = -KPIC -W1,-Bexport CCCDLFLAGS = -fpic CCDLFLAGS = -wl,-Bexport CCDLFLAGS = LD = ld LD = gcc -belf -G -fpic LDDLFLAGS = -G -L/usr/local/lib LDDLFLAGS = -L/usr/local/lib LDFLAGS = -belf -L/usr/local/lib LDFLAGS = -L/usr/local/lib LD = ld LD = gcc -belf -G -fpic OPTIMISE = -Od OPTIMISE = -O1 OLD: CCCFLAGS = -belf -dy -w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include NEW: CCFLAGS = -U M_XENIX -DPERL_SCO5 -I/usr/local/include
This is because the Perl dynaloader will not load the
Perl works best when compiled with 4.11.13 SCO Unixware 7.0 notesYou must use a version of MySQL at least as recent as 3.22.13, since that version fixes some portability problems under Unixware.
We have been able to compile MySQL with the following shell> CC=cc CXX=CC ./configure --prefix=/usr/local/mysql 4.11.14 IBM-AIX notes
Automatic detection of shell> CC="xlc_r -ma -O3 -qstrict -DHAVE_INT_8_16_32" \ CXX="xlC_r -ma -O3 -qstrict -DHAVE_INT_8_16_32" \ ./configure
If you are using shell> CXX=gcc \ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti" \ ./configure --prefix=/home/monty --with-debug --with-low-memory If you have problems with signals (MySQL dies unexpectedly under high load) you may have found an OS bug with threads and signals. In this case you can tell MySQL not to use signals by configuring with: shell> CFLAGS=-DDONT_USE_THR_ALARM CXX=gcc \ CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -DDONT_USE_THR_ALARM" \ ./configure --prefix=/home/monty --with-debug --with-low-memory
This doesn't affect the performance of MySQL, but has the side
effect that you can't kill clients that are ``sleeping'' on a connection with
4.11.15 HP-UX notes
There are a couple of ``small'' problems when compiling MySQL on
HP-UX. We recommend that you use We recommend one to use gcc 2.95 on HP-UX. Don't use high optimization flags (like -O6) as this may not be safe on HP-UX.
Note that MIT-pthreads can't be compiled with the HP-UX compiler,
because it can't compile The following configure line should work: CFLAGS="-DHPUX -I/opt/dce/include" CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors -fno-exceptions -fno-rtti" CXX=gcc ./configure --with-pthread --with-named-thread-libs='-ldce' --prefix=/usr/local/mysql --disable-shared
If you are compiling |