Normally, you can use a Solaris 2.6 binary on Solaris 2.7 and 2.8. Most of the Solaris 2.6 issues also apply for Solaris 2.7 and 2.8.
MySQL should be able to detect new versions of Solaris automatically and enable workarounds for the following problems.
Solaris 2.7 / 2.8 has some bugs in the include files. You may see the following error when you use gcc:
/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 fix the problem by copying
          /usr/include/widec.h to
          .../lib/gcc-lib/os/gcc-version/include and
          changing line 41 from this:
        
#if !defined(lint) && !defined(__lint)
To this:
#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
          configure again.
        
          If you get the following errors when you run
          make, it is because
          configure didn't detect the
          curses.h file (probably because of the
          error in /usr/include/widec.h):
        
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 problem is to do one of the following:
              Configure with CFLAGS=-DHAVE_CURSES_H
              CXXFLAGS=-DHAVE_CURSES_H ./configure.
            
              Edit /usr/include/widec.h as
              indicated in the preceding discussion and re-run
              configure.
            
              Remove the #define HAVE_TERM line from
              the config.h file and run
              make again.
            
          If your linker cannot find -lz when linking
          client programs, the problem is probably that your
          libz.so file is installed in
          /usr/local/lib. You can fix this problem
          by one of the following methods:
        
              Add /usr/local/lib to
              LD_LIBRARY_PATH.
            
              Add a link to libz.so from
              /lib.
            
              If you are using Solaris 8, you can install the optional
              zlib from your Solaris 8 CD
              distribution.
            
              Run configure with the
              --with-named-z-libs=no option when
              building MySQL.
            


User Comments
Using Solaris 9, I installed the gcc compiler available on the Software Companion CD (installed under /opt/sfw). I also set LD_LIBRARY_PATH to /opt/swf/lib, per the installation notes for Solaris.
The compilation phase did not work, producing some error (which I've now lost, but it had to do with processing within the readline subdirectory).
I then downloaded the gcc compiler from www.sunfreeware.com, installed it, and set LD_LIBRARY_PATH to /usr/local/lib.
Configured as follows:
CC=gcc CFLAGS="-O3" \
CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-low-memory \
--enable-assembler
Much better.
Notice that I did not include the -m64 flags in CFLAGS or CXXFLAGS. They may have worked, but I didn't try them.
BTW, I wouldn't need to do this compilation at all if MySQL binary distributions for Solaris came with lib/libmysqlclient.so
Solaris 8 does have the libmysqlclient .so and .a libs in the binary mysql provided.
# ls lib/mysql/libmysqlclient*
lib/mysql/libmysqlclient.a lib/mysql/libmysqlclient.so.10
lib/mysql/libmysqlclient.la lib/mysql/libmysqlclient.so.10.0.0
lib/mysql/libmysqlclient.so
#
# uname -a
SunOS ck 5.8 Generic_117350-12 sun4u sparc SUNW,UltraAX-i2
#
Not true. The binary package I just downloaded did NOT include the .so files:
# pwd
/usr/local/mysql-standard-4.1.7-sun-solaris2.8-sparc
# ls lib/libmysqlclient*
lib/libmysqlclient.a lib/libmysqlclient_r.a
Add your own comment.