Author: wyoung
Date: Thu Aug 7 08:07:21 2008
New Revision: 2336
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2336&view=rev
Log:
Clarifications to README-Solaris.txt and README-Linux.txt
Modified:
trunk/README-Linux.txt
trunk/README-Solaris.txt
Modified: trunk/README-Linux.txt
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/README-Linux.txt?rev=2336&r1=2335&r2=2336&view=diff
==============================================================================
--- trunk/README-Linux.txt (original)
+++ trunk/README-Linux.txt Thu Aug 7 08:07:21 2008
@@ -1,25 +1,84 @@
-For the most part, Linux is just another Unix variant as far as MySQL++
-is concerned. See README-Unix.txt for most of what you need to know
-to build and use MySQL++.
+Linux is basically Unix, so README-Unix.txt covers the generic bits.
+I'll just cover a few of the issues specific to Linux here.
-The biggest Linux-specific hurdle is dealing with the dynamic
-linker, ld.so. This program is called by the operating system when
-loading an executable to run. It locates any shared libraries the
-executable uses and links them up so the program will run. If ld.so
-can't find libmysqlpp, a program using MySQL++ won't run. It always
-looks in /lib and /usr/lib for shared libraries, but by default,
-MySQL++ installs in /usr/local/lib when you install from source.
-You can either change the installation directory, or you can clue
-ld.so in to the nonstandard location.
-The first thing ld.so looks at when trying to find a library is the
-LD_LIBRARY_PATH environment variable. This works like the shell's
-PATH variable: a colon-separated list of directories to search.
-This option is best used when you can't use the next option, and
-you can't install in /usr/lib. (Or /lib, yes, but one would never
-install a library like MySQL++ *there*, would one?)
+Prerequisite: Install the MySQL Development Files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MySQL++ is built on top of the MySQL C API library, so it needs the
+ C API development files to build against. Most distributions of
+ the MySQL server for Linux don't come with these development files;
+ they're packaged separately. This is because you don't actually
+ need the server on your development machine, though it's often more
+ convenient to use a local server than a remote one, for testing.
-The best way to tell ld.so about a nonstandard library directory is to
-put it in /etc/ld.so.conf or in one of the files included from there.
-Then, run ldconfig as root to rebuild the cache file ld.so uses to
-find libraries in these nonstandard directories.
+ There are about as many different ways to get the C API development
+ files on your system as there are major Linux distributions.
+ More actually, because you also have the option of the official
+ MySQL binaries from mysql.com:
+
+ http://dev.mysql.com/downloads/mysql/5.0.html#linux
+
+ For RPM-based distributions, MySQL comes in several different
+ packages. You need at least the -devel and the -shared packages
+ to build MySQL++.
+
+ The other binary distributions seem to come in just a single file,
+ presumably with everything included.
+
+ You can also build from source, in which case you will also get
+ the entire kit and kaboodle.
+
+ MySQL frequently comes with Linux distributions as well. If your
+ distribution doesn't come with at least MySQL v4.1, I recommend
+ using the official MySQL.com packages instead. MySQL++ can be
+ made to run with 4.0 and older, but it takes some work.
+
+ On Red Hat type systems with yum, say:
+
+ # yum install mysql-devel
+
+ If you want to use rpm directly, you need that package and probably
+ the base mysql package as well.
+
+ On Debian/Ubuntu type systems, say:
+
+ $ sudo apt-get install libmysqlclient15-dev
+
+ The version number is the ABI version of the MySQL C API library.
+ ABI version 15 corresponds to MySQL version 5.0, the recommended
+ stable version as of this writing.
+
+
+Dealing with the Dynamic Linker, ld.so
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ld.so is a system-level program on Linux which is used to run any
+ program that uses shared libraries (lib*.so). Its job is to find
+ the libraries and link them to the base executable so it will run.
+
+ Because ld.so only looks in a few places for libraries on most
+ systems, a common problem is a program that builds without error
+ but won't run, complaining about libmysqlpp.SOMETHING.
+
+ There are a number of ways to deal with this.
+
+ First, you could just configure MySQL++ to install under /usr
+ instead of /usr/local, like system-provided packages:
+
+ $ ./configure --prefix=/usr
+
+ This isn't recommended practice when building packages from source,
+ but it does work.
+
+ Second, you can add the MySQL++ library directory to the
+ LD_LIBRARY_PATH environment variable. This works like the shell's
+ PATH variable: a colon-separated list of directories to search.
+ This is best when the installation directory is something totally
+ uncommon, or you don't have root permissions on the box so you
+ can't do the next option.
+
+ Finally, the most robust way to tell ld.so about a nonstandard
+ library directory is to put it in /etc/ld.so.conf or in one of
+ the files included from there. Then, run ldconfig as root to
+ rebuild the cache file ld.so uses to find libraries in these
+ nonstandard directories. Running ldconfig isn't necessary for
+ the previous two methods.
Modified: trunk/README-Solaris.txt
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/README-Solaris.txt?rev=2336&r1=2335&r2=2336&view=diff
==============================================================================
--- trunk/README-Solaris.txt (original)
+++ trunk/README-Solaris.txt Thu Aug 7 08:07:21 2008
@@ -2,22 +2,36 @@
MySQL++ is concerned. See README-Unix.txt for most of what you need
to know to build and use MySQL++.
-MySQL++ is built atop the MySQL C API library, so you need those
-development files installed on your system before trying to build
-MySQL++. The easiest way to do that in Solaris 10 is to pull down the
-GNOME System menu, go to Administration, and then to Package Manager.
-Search for "mysql5" and install those packages. While there, you
-may also need to select the gcc and perl packages, if you haven't
-done that already.
-(Don't search for just "mysql" in Package Manager, as that will also
-bring up legacy MySQL 4.0 packages. MySQL++ may build against 4.0
-still; it's been a while since we've tested it. What is certain
-is that the examples won't run against 4.0 without modification,
-as they assume the availability of UTF-8 character set support,
-which was added in 4.1.)
+Prerequisite: Install the MySQL Development Files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MySQL++ is built on top of the MySQL C API library, so it needs the
+ C API development files to build against.
-It's no doubt possible to use the official binaries from mysql.com
-instead, or to build from source. We don't do that ourselves, though,
-and don't have reports from those who have, so we can't advise on
-how to do it.
+ With the current version of Solaris, at least, a MySQL package
+ is included on the operating system disk, but not installed
+ by default. To install it, oull down the GNOME System menu,
+ go to Administration, and then to Package Manager. Search for
+ "mysql5" and install those packages. While there, you may also
+ need to install the gcc packages, if you haven't done that already.
+ I'm not sure, but you may need to install Perl as well.
+
+ Don't search for just "mysql" in Package Manager, as that will also
+ bring up legacy MySQL 4.0 packages. MySQL++ may build against 4.0
+ still; it's been a while since we've tested it. What is certain
+ is that the examples won't run against 4.0 without modification,
+ as they assume the availability of UTF-8 character set support,
+ which was added in 4.1.
+
+ It's no doubt possible to use the official binaries from mysql.com
+ instead, or to build from source. We don't do that ourselves,
+ though, and don't have reports from those who have, so we can't
+ advise on how to do it.
+
+
+C API Development File Directories
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Sun's MySQL package installs the development files in relatively
+ uncommon locations. The libraries are in /usr/mysql/lib/mysql,
+ and the headers are in /usr/mysql/include/mysql. Way to be
+ redundant, guys. :)
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits