views:

31

answers:

1

I've successfully installed native Oracle on 10.6, and can successfully compile and execute the example Pro*C code using the 'oracle' account (i.e. the same OS user that the software was installed under). That was a fun job. It even works with clang.

However, in our normal development environment, the source, build scripts, make files, etc, are owned by a different Unix group and user - with access to a restricted set of Oracle tools (sqlplus, exp, proc, etc).

Trying to use sqlplus from the oracle install gave the (known problem)

dyld: Library not loaded: /b/227/sqlplus/lib/libsqlplus.dylib

This is despite DYLD_LIBRARY_PATH definitely being set correctly. Someone who had done more investigation thought that somewhere along the line the library path was being unset before the process started.

I gave up and just went with using the instantclient instead.

Unfortunately, the instantclient SDK is OCCI only - it doesn't include the pro*c compiler.

So I am back to trying to get the 'dev' user to be able to execute 'proc' in the oracle bin directory. I've already solved one dylib issue (using a symbolic link), and various file permission issues (need to grant -r to files in the /precomp directory hierarchy).

Now I'm getting a core dump (which doesn't occur when running under the oracle user)

System default option values taken from:    
/Users/oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg

INTERNAL ERROR: Failed assertion [PGE Code=90105]

Segmentation fault

Any suggestions? Has anyone actually successfully done this?

+1  A: 

The first problem I had was solved by granting read access to the /precomp directory and sub-directories under the oracle install (the question was then edited for my next problem).

By default the proc compiler writes into the directory where the source code file exists, not local. Simple fix - specify the target filename by path. This successfully produced the .c file.

Getting this to compile is a case of giving access to, and specifying, the right libraries to link in (the instantclient 64 bit ones will work here).

Finally, hack the example make into shape.

JulesLt