⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 mysql数据库源代码
💻
📖 第 1 页 / 共 2 页
字号:
described in the "Incompatible versions of db.h and libdb" section ofthis file.To make matters worse, prior to Perl 5.6.1, the perl binary itself*always* included the Berkeley DB library.If you want to use a newer version of Berkeley DB with this module, theeasiest solution is to use Perl 5.6.1 (or better) and Berkeley DB 3.x(or better).There are two approaches you can use to get older versions of Perl towork with specific versions of Berkeley DB. Both have their advantagesand disadvantages.The first approach will only work when you want to build a version ofPerl older than 5.6.1 along with Berkeley DB 3.x. If you want to useBerkeley DB 2.x, you must use the next approach. This approach involvesrebuilding your existing version of Perl after applying an unofficialpatch. The "patches" directory in the this module's source distributioncontains a number of patch files. There is one patch file for everystable version of Perl since 5.004. Apply the appropriate patch to yourPerl source tree before re-building and installing Perl from scratch.For example, assuming you are in the top-level source directory forPerl 5.6.0, the command below will apply the necessary patch. Rememberto replace the path shown below with one that points to this module'spatches directory.    patch -p1 -N </path/to/DB_File/patches/5.6.0Now rebuild & install perl. You should now have a perl binary that canbe used to build this module. Follow the instructions in "BUILDING THEMODULE", remembering to set the INCLUDE and LIB variables in config.in.The second approach will work with both Berkeley DB 2.x and 3.x.Start by building Berkeley DB as a shared library. This is fromthe Berkeley DB build instructions:    Building Shared Libraries for the GNU GCC compiler    If you're using gcc and there's no better shared library example for    your architecture, the following shared library build procedure will    probably work.    Add the -fpic option to the CFLAGS value in the Makefile.    Rebuild all of your .o files. This will create a Berkeley DB library    that contains .o files with PIC code. To build the shared library,    then take the following steps in the library build directory:    % mkdir tmp    % cd tmp    % ar xv ../libdb.a    % gcc -shared -o libdb.so *.o    % mv libdb.so ..    % cd ..    % rm -rf tmp    Note, you may have to change the gcc line depending on the    requirements of your system.    The file libdb.so is your shared libraryOnce you have built libdb.so, you will need to store it somewhere safe.    cp libdb.so /usr/local/BerkeleyDB/libIf you now set the LD_PRELOAD environment variable to point to thisshared library, Perl will use it instead of the version of Berkeley DBthat shipped with your Linux distribution.    export LD_PRELOAD=/usr/local/BerkeleyDB/lib/libdb.soFinally follow the instructions in "BUILDING THE MODULE" to build,test and install this module. Don't forget to set the INCLUDE and LIBvariables in config.in.Remember, you will need to have the LD_PRELOAD variable set anytime youwant to use Perl with Berkeley DB. Also note that if you have LD_PRELOADpermanently set it will affect ALL commands you execute. This may be aproblem if you run any commands that access a database created by theversion of Berkeley DB that shipped with your Linux distribution.Solaris Notes-------------If you are running Solaris 2.5, and you get this error when you run theDB_File test harness:    libc internal error: _rmutex_unlock: rmutex not held.you probably need to install a Sun patch. It has been reported thatSun patch 103187-25 (or later revisions) fixes this problem.To find out if you have the patch installed, the command "showrev -p"will display the patches that are currently installed on your system.HP-UX 10 Notes--------------Some people running HP-UX 10 have reported getting an error like thiswhen building DB_File with the native HP-UX compiler.    ld: (Warning) At least one PA 2.0 object file (DB_File.o) was detected.    The linked output may not run on a PA 1.x system.    ld: Invalid loader fixup for symbol "$000000A5".If this is the case for you, Berkeley DB needs to be recompiled withthe +z or +Z option and the resulting library placed in a .sl file. Thefollowing steps should do the trick:  1: Configure the Berkeley DB distribution with the +z or +Z C compiler     flag:        env "CFLAGS=+z" ../dist/configure ...  2: Edit the Berkeley DB Makefile and change:        "libdb= libdb.a" to "libdb= libdb.sl".  3: Build and install the Berkeley DB distribution as usual.HP-UX 11 Notes--------------Some people running the combination of HP-UX 11 and Berkeley DB 2.7.7 havereported getting this error when the run the test harness for DB_File    ...    lib/db-btree.........Can't call method "DELETE" on an undefined value at lib/db-btree.t line 216.    FAILED at test 26    lib/db-hash..........Can't call method "DELETE" on an undefined value at lib/db-hash.t line 183.    FAILED at test 22    ...The fix for this is to rebuild and install Berkeley DB with the bigfileoption disabled.IRIX NOTES----------If you are running IRIX, and want to use Berkeley DB version 1, you canget it from http://reality.sgi.com/ariel. It has the patches necessaryto compile properly on IRIX 5.3.FEEDBACK========How to report a problem with DB_File.When reporting any problem, I need the information requested below.  1. The *complete* output from running this        perl -V    Do not edit the output in any way.     Note, I want you to run "perl -V" and NOT "perl -v".    If your perl does not understand the "-V" option it is too    old. DB_File needs Perl version 5.00405 or better. 2. The version of DB_File you have.    If you have successfully installed DB_File, this one-liner will    tell you:       perl -e 'use DB_File; print qq{DB_File ver $DB_File::VERSION\n}'    If you haven't installed DB_File then search DB_File.pm for a line    like this:      $VERSION = "1.20" ; 3. The version of Berkeley DB you are using.    If you are using a version older than 1.85, think about upgrading. One    point to note if you are considering upgrading Berkeley DB - the    file formats for 1.85, 1.86, 2.0, 3.0 & 3.1 are all different.    If you have successfully installed DB_File, this command will display    the version of Berkeley DB it was built with:       perl -e 'use DB_File; print qq{Berkeley DB ver $DB_File::db_ver\n}' 4. A copy the file config.in from the DB_File main source directory. 5. A listing of directories where Berkeley DB is installed.    For example, if Berkeley DB is installed in /usr/BerkeleDB/lib and    /usr/BerkeleyDB/include, I need the output from running this        ls -l /usr/BerkeleyDB/lib        ls -l /usr/BerkeleyDB/include 6. If you are having problems building DB_File, send me a complete log    of what happened. Start by unpacking the DB_File module into a fresh    directory and keep a log of all the steps        [edit config.in, if necessary]        perl Makefile.PL        make         make test TEST_VERBOSE=1 7. Now the difficult one. If you think you have found a bug in DB_File    and you want me to fix it, you will *greatly* enhance the chances    of me being able to track it down by sending me a small    self-contained Perl script that illustrates the problem you are    encountering. Include a summary of what you think the problem is    and a log of what happens when you run the script, in case I can't    reproduce your problem on my system. If possible, don't have the    script dependent on an existing 20Meg database. If the script you    send me can create the database itself then that is preferred.    I realise that in some cases this is easier said than done, so if    you can only reproduce the problem in your existing script, then    you can post me that if you want. Just don't expect me to find your    problem in a hurry, or at all. :-)CHANGES-------See the Changes file.Paul Marquess <Paul.Marquess@btinternet.com>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -