Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Installing Oracle 9i on Mac OS X, Part 3
Subject:   Native Compilation
Date:   2003-07-19 09:58:48
From:   williamr
One of 9i's new features I have been wanting to try out is Native Compilation, which allows you to compile your PL/SQL packages as native C programs. However the makefile supplied doesn't work, and seems to have been lifted untested from a Solaris installation. Has anyone been able to get this to work?


e.g. make these settings in your init${ORACLE_SID}.ora file:
plsql_native_library_dir = '/Users/oracle/9iR2/orahome/plsql_compiled_code'
plsql_native_library_subdir_count = 0


Then at the SQL> prompt:
alter session set plsql_compiler_flags = native;
alter package somepackage compile;


(For some reason you get more error information if you do this from the 'oracle' Unix account rather than over a SQL*Net connection.)


Even when you have corrected the obvious errors to do with missing directories and the wrong path for gcc (which itself needs installing with the Apple Developer CDs) you'll see compiler errors about .so files, which AFAIK don't exist on Macs. Not speaking C, I can't go much further. Any thoughts?


Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Native Compilation
    2003-07-19 10:36:40  dsimpson1 [View]

    The native compilation feature does not yet appear to be implemented on MacOS X. Even on Solaris there are some significant issues with this feature in certain situations. Here is my example Solaris makefile with some additional notes: http://www.dotcomsolutionsinc.net/products/installgen/sol_920_64bit_files/installgen_sol920_63_.html

    This feature is best limited to PL/SQL code which you have written yourself as opposed to compiling all of the PL/SQL in the database at this time. And it does seem to work well under Solaris - my little test program which just runs a loop runs about 2x faster, and I think that some types of code may run 8x faster.

    However the good news that I am seeing posted on the MacOS X specific newsgroup at Oracle's OTN is that MacOS X will be fully supported in the next major release. There have been hints that Oracle 10i will be announced at OracleWorld Sept 7 - 11th in San Francisco. Apple is scheduled to have a booth at OracleWorld too.
    • Native Compilation
      2003-07-23 15:58:36  williamr [View]

      Well everything seems to be in place for native compilation - 'alter package compile' gets as far as calling gcc, make and ld, it's just that the makefile seems to be designed for creating shared libraries on Solaris. I wonder what the makefile from an HP machine would look like for example. It's frustrating since I don't know C - if I could just spend six months at college learning about relinking object files or whatever they're called, I feel I might be able to get this feature to work...