Solaris Notes
167
#if !defined(__STDC__) || __STDC__ != 1
To this:
#if !defined(__STDC__)
If you turn on
__STDC__
with the
-Xc
option, the Sun compiler can't compile with the Solaris
pthread.h
header file. This is a Sun bug (broken compiler or broken include file).
If
mysqld
issues the following error message when you run it, you have tried to compile MySQL with
the Sun compiler without enabling the
-mt
multi-thread option:
libc internal error: _rmutex_unlock: rmutex not held
Add
-mt
to
CFLAGS
and
CXXFLAGS
and recompile.
If you are using the SFW version of
gcc
(which comes with Solaris 8), you must add
/opt/sfw/lib
to the environment variable
LD_LIBRARY_PATH
before running
configure
.
If you are using the
gcc
available from
sunfreeware.com
, you may have many problems. To avoid
this, you should recompile
gcc
and GNU
binutils
on the machine where you are running them.
If you get the following error when compiling MySQL with
gcc
, it means that your
gcc
is not configured
for your version of Solaris:
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
gcc
and compile it with your current
gcc
compiler. At least for Solaris 2.5, almost all binary versions of
gcc
have old, unusable include files
that break all programs that use threads, and possibly other programs as well.
Solaris does not provide static versions of all system libraries (
libpthreads
and
libdl
), so you
cannot compile MySQL with
--static
. If you try to do so, you get one of the following errors:
ld: fatal: library -ldl: not found
undefined reference to `dlopen'
cannot find -lrt
If you link your own MySQL client programs, you may see the following error at runtime:
ld.so.1: fatal: libmysqlclient.so.#:
open failed: No such file or directory
This problem can be avoided by one of the following methods:
• Link clients with the
-Wl,r/full/path/to/libmysqlclient.so
flag rather than with
-Lpath
).
• Copy
libmysqclient.so
to
/usr/lib
.
• Add the path name of the directory where
libmysqlclient.so
is located to the
LD_RUN_PATH
environment variable before running your client.
If you have problems with
configure
trying to link with
-lz
when you do not have
zlib
installed, you
have two options:
• If you want to be able to use the compressed communication protocol, you need to get and install
zlib
from
ftp.gnu.org
.
• Run
configure
with the
--with-named-z-libs=no
option when building MySQL.
If you are using
gcc
and have problems with loading user-defined functions (UDFs) into MySQL, try
adding
-lgcc
to the link line for the UDF.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...