« hotwire and hightail | Main | we are glass »

oracle 9i ( on debian (unstable)

Trying to make Oracle 9i work under Debian (specifically Debian unstable) ? Me too.

  • I got it to install ok - read this to see how to fix that "Error in invoking target install of makefile /opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk" error during installation.

  • When I went to run dbca, the JVM segfaulted. Ok. I editted it (it's a script), and changed JRE_DIR to point at a newer version of a JRE/JDK I had around ("and here's one I prepared earlier..."). Also, right at the very end of the file, it has 2 lines where it runs $JRE_DIR/bin/jre - I had to change these to $JRE_DIR/bin/java.

  • The next hurdle appeared when I reached the end of the dbca config process and hit "finish" to go ahead and create the database. Somewhere in here, it bombed out with an ORA-03113 "end-of-file on communication channel" error. If you poke around in the bdump (and such) directories before closing the ORA-03113 error dialog box, you'll find an alert log with this at the end :

    Errors in file /u01/app/oracle/admin/yourdb/udump/yourdb_ora_1234.trc:
    ORA-07445: exception encountered: core dump [skgmidrealm()+338] [SIGSEGV] [Address not mapped to object] [0x3320DFFC] [] []
  • After a fair bit of poking around on the web, I found this helpful page over in the Gentoo Linux forums, which explains that there's a bug in glibc 2.3.1, which has been fixed in 2.3.2, though you can patch the source to fix it for now. Debian unstable is currently using glibc 2.3.1, so I did an apt-get source libc6 and after poking around, discovered that I had to create a new "dpatch" file in glibc-2.3.1/debian/patches, which I called oracle-dl-runtime.dpatch :

    #! /bin/sh -e
    # DP: Oracle fix for dl-runtime.c, as per http://forums.gentoo.org/viewtopic.php?t=35340
    if [ $# -ne 2 ]; then
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
    case "$1" in
        -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
        -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
            echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
            exit 1
    exit 0
    --- glibc-2.3.1/elf/dl-runtime.c~       2003-05-22 13:00:29.000000000 +1000
    +++ glibc-2.3.1/elf/dl-runtime.c        2003-05-22 13:00:50.000000000 +1000
    @@ -84,7 +84,7 @@
                const ElfW(Half) *vernum =
                  (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]);
    -           ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff];
    +           ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff;
                const struct r_found_version *version = &l->l_versions[ndx];
                if (version->hash != 0)
    @@ -179,7 +179,7 @@
                    const ElfW(Half) *vernum =
                      (const void *) D_PTR (l,l_info[VERSYMIDX (DT_VERSYM)]);
    -               ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info) & 0x7fff];
    +               ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)] & 0x7fff;
                    const struct r_found_version *version = &l->l_versions[ndx];
                    if (version->hash != 0)

    I then added oracle-dl-runtime to the end of the 0list file (also in the glibc-2.3.1/debian/patches directory). A dpkg-buildpackage later and I've got a new libc6_2.3.1-17_i386.deb package (note: it's a good idea to change the debian part of the version number when you do this. I didn't do it yet, 'cause I wanted to make sure it actually worked). After installing it, database creation completed successfully. Woo!

  • NOTE: I've been using Linux since 1992, and I still get the willies having to do stuff like patching libc. Exercise extreme caution, and beware that if you screw it up, your whole system may fall over sideways and give you the finger. Presumably glibc 2.3.2 will make it into Debian soon enough, and you won't have to worry about all this. The main reason I posted this is so it's in one place for the next poor sap trying to make it go...

* 14:12 * geek