Native Compilation with MinGW on 10GR2

I have downloaded and installed 10gR2 on Windows 2000. It looks like the MinGW compiler is now supported on Windows. After looking in the spnc_commands file, I see the following near the end of the file:
#GCC (MINGW) is now supported for plsql native comp on windows.
#Download MinGW-3.1.0-1.exe from http://www.mingw.org.
#The following two commands assume that GCC is installed at the default
#location which is c:/MinGW. Change the paths to gcc and ld appropriately
#if the installation is done in a different directory.
#Finally, to use GCC for native comp, comment the above command line for cl.exe
#and uncomment the following two comand lines.
c:/MinGW/bin/gcc -c %(src) -O1 -I$(ORACLE_HOME)/plsql/public -I$(ORACLE_HOME)/plsql/include -o %(obj)
c:/MinGW/bin/ld -shared -e 0x0 %(obj) $(ORACLE_HOME)/plsql/lib/libpncrt.a $(ORACLE_HOME)/lib/orapls10.lib -o %(dll)
The last line references ORACLE_HOME/plsql/lib/libpncrt.a
However, this directory or file does not exist anywhere on my Oracle installation or my MinGW directory.
Does anyone know what this file is?
Brett

Thanks Brett,
In reading Jens' paper, it almost looks like you can generate your own library file, but I think my unfamiliarity with the native compile option may be confusing me. I can't tell if the libraries being generated are the actual PL/SQL routines getting stored on the operating system or if I can generate "libpncrt.a" from some other file that is in unix format using a home brew "makefile" utility (not supplied in the paper).
Since 10g has depricated the parameters PLSQL_NATIVE_MAKE_FILE_NAME and PLSQL_NATIVE_MAKE_UTILITY then the instructions in Jens' paper seem to be incompatable.
Can you explain what "port-specific" means?
Thanks Again,
Bill

Similar Messages

  • Compiling with MinGW JVMPI calls

    I want to build a dll of a simple C program that is registerd as profiling agent and supplies the CPU-time.
    I want to build it with the MinGW framework.
    First I patched the jni_md.h as found in this forum,
    then I tried to compile and link with
    gcc -g -O2 -c -Id:/jdk1.4.1/include -Id:/jdk1.4.1/include/win32
    -g -Id:/java/chess/c/include cputime.cpp
    dllwrap --add-stdcall-alias -o cputime.dll -s cputime.o
    While compiling succeded, the linking failed with
    cputime.o(.eh_frame+0x11): In function `JVM_OnLoad':
    d:/jdk1.4.1/include/jni.h:1913: undefined reference to `___gxx_personality_v0'
    collect2: ld returned 1 exit status
    What am I doing wrong?

    Now I know a little bit more.
    (Thanks to a kind person on the MinGW Forum).
    I need to add the libstdc++ library.
    Does anyone know the flags I have to use in the dllwrap command?

  • Problem with linker when compile with Mingw

    The error shows as:
    Compiler: Default compiler
    Building Makefile: "D:\code\c++\JVM\Makefile.win"
    Executing make...
    make.exe -f "D:\code\c++\JVM\Makefile.win" all
    gcc.exe main.o -o "java_VM.exe" -L"C:/Dev-Cpp/lib" -L"C:/Program Files/Java/jre1.5.0_07/bin/client" -ljvm
    main.o(.text+0x186):main.c: undefined reference to `_imp__JNI_CreateJavaVM@12'
    collect2: ld returned 1 exit status
    make.exe: *** [java_VM.exe] Error 1
    Execution terminated

    A Fix for "Your network preferences have been changed by another application" Error 
    In the Library/Preferences/SystemConfiguration/ folder delete the following:
    com.apple.airport.preferences.plist
    NetworkInterfaces.plist
    preferences.plist
    com.apple.nat.plist
    You will have to re-configure all your network settings since deleting.
    (10.4.10)
    Use Software Update to update your OS to last version of Tiger.  Install all the other updates that goes along w/it.

  • Native compilation with EJB's

    Hi,
    Can anyone if the ncomp is compatable with EJB's on 8.1.7, and any tricks/gotchas that might apply.
    thanx,
    Robert Dawson

    You can ncomp your ejb-jar file, like you would ncomp any other jar file. There is a tiny bit of server side generated code that does not get ncomped but it should not matter much in the overall performance picture.

  • PL/SQL Native Compilation - not working!

    I'm at my wits end here.
    Oracle 10.2.0.3 under Windows Server 2003 (i know, i know...) and a whole lot of procedural PL/SQL that I think could benefit from native compilation. I've done this on Linux/unix environments a few times but never imagined it would be quite so painful under Windows.
    Ended up using Visual C++ 2003 (7.1 compiler) which compiled everything. MinGW wouldn't compile everything, lots of undefined references to _setjmp and others, but that's a different subject.
    Anyway, after two days of dealing with issues, I finally get things to compile. The .dll is created. The init parameters say we're native. The test procedure is recompiled as native, and verified in dba_plsql_object_settings. As far as I am aware, native compilation is present and working. But when I run the thing.... performance is the same. Recompile as interpreted... same. Recompile as native again... same. This is demo code here, simple loop, the kind of thing that is 10x faster on my Linux environment.
    Basically the behavior is as though native compilation just isn't working... the DLL isn't working. Funny thing is that it -was- working earlier with the same code... right up until I bounced the box. Now I am dead in the water with no log file, no trace, nothing... just a non-functional native compilation feature.
    Any ideas? Anyone else struggle with this?
    Bob

    SELECT name, value
    FROM gv$parameter
    WHERE name LIKE '%code%';
    Did you do this before you bounced the database?
    ALTER SYSTEM SET plsql_compiler_flags = 'NATIVE';
    or
    ALTER SESSION SET plsql_compiler_flags = 'NATIVE';when perhaps you should have done this:
    ALTER SYSTEM SET plsql_code_type = 'NATIVE' SCOPE=BOTH;

  • PCC-S-02014 error while compiling with in Sun Solaris

    We are porting our application from HP-UX to Sun Solaris and as part of that I am trying the compile a Pro*C program in Sun Solaris using SUNWspro C++ compiler. Precompiling is failing with following error.
    PRECOMP set: /u01/app/oracle/product/10.2.0/bin/proc dbms=native code=cpp mode=ansi include=/u01/app/oracle/product/10.2.0/precomp
    ireclen=255 oreclen=255
    define=__sparc define=__SUNPRO_C include=/usr/include include=. include=/u01/app/SUNWspro/prod/include/CC/stlport4 include=/u01/app/oracle/product/10.2.0/rdbms/public/ include=/u01/app/oracle/product/10.2.0/network/public/ include=/u01/app/oracle/product/10.2.0/rdbms/demo/ errors=yes select_error=no
    sqlcheck=limited ltype=NONE
    release_cursor=no hold_cursor=no
    Pro*C/C++: Release 10.2.0.3.0 - Production on Thu Dec 18 03:09:59 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /u01/app/oracle/product/10.2.0/precomp/admin/pcscfg.cfg
    Syntax error at line 44, column 30, file /u01/app/SUNWspro/prod/include/CC/stlport4/algorithm:
    Error at line 44, column 30 in file /u01/app/SUNWspro/prod/include/CC/stlport4/a
    lgorithm
    # include STLPNATIVE_HEADER(algorithm)
    .............................1
    PCC-S-02014, Encountered the symbol "(" when expecting one of the following:
    : [ ] + / . .. an identifier, a numeric constant, newline,
    define, elif, else, endif, error, if, ifdef, ifndef, include,
    line, pragma, undef, exec, sql, begin, end, var, type,
    oracle, an immediate preprocessor command, a C token, create,
    function, package, procedure, trigger, or, replace,
    Normal C++ files are getting compiled with out eny issues. This particular file is having functions written in C fashion. Any idea what is missing in the compiler option.
    regards
    Vinu

    Hi Vinu,
    I'm not sure if this is still an issue for you. When I have encountered issues like this with Pro*C I have ended up specifying parse=none to the proc command and then putting all declarations between "EXEC SQL BEGIN DECLARE SECTION" and "EXEC SQL END DECLARE SECTION" markers. I have also moved any "special" declarations into a specific header file and then placed the "#include <special header file>" inside the declare section as well.
    Perhaps that will help a bit,
    Regards,
    Mark

  • Plsql_optimize_level = 3 and native compilation in SQL Developer?

    SQL Developer: Version 3.1.06 (Build MAIN-06.82)
    Oracle: 11gR2
    OS: Ubuntu 10.10
    Whenever I compile a PL/SQL unit in SQL Developer (using 'Compile' button) it is compiled with the following settings:
    PLSQL_OPTIMIZE_LEVEL = 2
    PLSQL_CODE_TYPE = 'INTERPRETED'
    However, if I issue the following commands in an SQL Worksheet:
    ALTER SESSION SET plsql_optimize_level = 3;
    ALTER PACKAGE PACKAGE_NAME COMPILE PLSQL_CODE_TYPE = NATIVE;
    the query SELECT PLSQL_OPTIMIZE_LEVEL, PLSQL_CODE_TYPE FROM ALL_PLSQL_OBJECT_SETTINGS WHERE NAME = 'PACKAGE_NAME'; resullts in
    PLSQL_OPTIMIZE_LEVEL     PLSQL_CODE_TYPE
    3     NATIVE
    3     NATIVE
    Is it possible to make SQL Developer to use these settings by default?
    P.S. It seems that Tools > Preferences > Database > PL/SQL Compiler menu section is missing the options I need (Optimization level drop-down menu have numbers 0-2, but not 3). Are there any plans to support these features in the future releases?
    Edited by: Ravshan Abbasov on Feb 6, 2012 6:28 AM

    Hi Ravshan,
    I thought a workaround would be to create a sql script like the following:
    alter session set plsql_code_type=native;
    alter session set plsql_optimize_level=3;  then point to it in the setting for Tools|Preferences|Database|Filename for connection startup script. That doesn't work however, as the other preference setting for plsql_optimize_level overrides the session value of 3 during compilation from the UI.
    According to Oracle documentation, level 3 was added for Oracle 11g. Prior to that, the same effect could be achieved by level 2 in conjunction with the INLINE pragma in the PL/SQL code.
    You might want to make a feature request for this on the SQL Developer Exchange so the community can vote and comment.
    Regards,
    Gary
    SQL Developer Team
    Edited by: Gary Graham on Feb 6, 2012 2:32 PM
    And, of course, Compile for Debug does not work with the 'native' setting.

  • Problem with building BerkeleyDB 4.8.24 with mingw

    Good day!
    I downloaded db-4.8.24.NC.tar.gz, configured it with
    "../dist/configure --disable-shared --disable-replication --enable-mingw --enable-static"
    and runned "make"
    After some time I received compilation problem like this (see below):
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_failchk.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_failchk.c -o lock_failchk.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_id.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_id.c -o lock_id.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_list.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_list.c -o lock_list.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_method.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_method.c -o lock_method.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_region.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_region.c -o lock_region.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_stat.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_stat.c -o lock_stat.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_timer.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_timer.c -o lock_timer.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../lock/lock_util.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../lock/lock_util.c -o lock_util.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../mutex/mut_alloc.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../mutex/mut_alloc.c -o mut_alloc.o
    ./libtool --mode=compile gcc -c -I. -I../dist/..  -O3  ../dist/../mutex/mut_failchk.c
    libtool: compile: gcc -c -I. -I../dist/.. -O3 ../dist/../mutex/mut_failchk.c -o mut_failchk.o
    ../dist/../mutex/mut_failchk.c: In function '__mut_failchk':
    ../dist/../mutex/mut_failchk.c:53: error: incompatible type for argument 3 of 'dbenv->is_alive'
    ../dist/../mutex/mut_failchk.c:53: note: expected 'db_threadid_t' but argument is of type 'int'
    ../dist/../mutex/mut_failchk.c:57: error: incompatible type for argument 3 of 'dbenv->thread_id_string'
    ../dist/../mutex/mut_failchk.c:57: note: expected 'db_threadid_t' but argument is of type 'int'
    make: *** [mut_failchk.o] Error 1
    sh-3.1$ make
    I have MSYS 1.0.11, mingw 5.1.6, GCC 4.4.0

    My guess is that the GCC 3.4.5 header files somewhere typedef `pthread_t` as `unsigned long int`.
    I am also trying to compile Berkeley DB 4.8.24 with MinGW gcc version 4.4.0, and I received the same error. Fortunately, though, I was able to proceed after changing line 113 of `db.h` in the `build_unix` folder from:
    typedef pthread_t db_threadid_t;
    to:
    typedef u_int32_t db_threadid_t;

  • Native extensions with AIR 3.3

    Did someone successfully compile with ADT native extensions like com.adobe.Vibration with AIR 3.3 ?
    Thank you !
    (Since i've moved to 3.3, it doesn't work anymore)

    Hi,
    I have tried reproducing your issue but I am not able to reproduce it , following is the code which I am using in my app :
    package
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import com.adobe.nativeExtensions.Vibration;
    import flash.events.*;
    import flash.utils.Timer;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import net.hires.debug.Stats;
    public class TestVibration extends Sprite
    private var subsButton:CustomButton = new CustomButton("Press me!");
    private var tt:TextField = new TextField();
    private var tf:TextFormat = new TextFormat();
    public function TestVibration()
    super();
    addChild ( new Stats() );
    tf.size = 20;
    tf.bold = true;
    tt.x=0;
    tt.y =450;
    tt.height = stage.stageHeight;
    tt.width = stage.stageWidth;
    tt.border = true;
    tt.defaultTextFormat = tf;
    addChild(tt);
    // support autoOrients
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    var myTimer:Timer = new Timer(2000, 1);
    myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
    myTimer.start();
    subsButton.x = 150;
    subsButton.y=10;
    subsButton.addEventListener(MouseEvent.CLICK,subsButtonHandler);
    stage.addChild(subsButton);
    public function subsButtonHandler(e:MouseEvent):void{
    trace("button pressed");
    tt.appendText("\n Button pressed!");
    public     function timerHandler(e:TimerEvent):void
    var vibe:Vibration;
    if (Vibration.isSupported)
    trace("1");
    trace("12");vibe = new Vibration();
    trace("13");vibe.vibrate(2000);
    trace("14");
    trace("15");
    I am using the ANE and SWC provided at
    http://download.macromedia.com/pub/developer/air/ane/Vibration.zip and I am using the target ipa-ad-hoc on device iphone4 .
    Can you please specify if you are doing something else in your app?It would be great if you can send your sample app with the steps to reproduce @ [email protected] ,so that we can reproduce the issue .
    Thanks,
    Nimisha

  • Native Compilation on EBS Database

    'm upgrading an 11i database from 9i to 10g. It is mentioned that as an option I might turn on Native Compilation. Native Compilation is helpful mostly with compute-intensive PL/SQLs, does anyone have any insights regarding the effect of Native Compilation on an EBS database?

    Hi,
    Take the question marks off the end:
    PL/SQL Native Compilation
    PL/SQL Native Compilation
    PL/SQL Native Compilation Conversion Timings
    Re: PL/SQL Native Compilation Conversion Timings
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • Native compilation of Java on Oracle9i

    We are trying to use the Java native compilation tool, NCOMP, that comes with Oracle9i to improve the execution speed of our Java classes. However, for this to work you have to install a C compiler, only some of which are approved by Oracle for this purpose on a given platform. The question is which ones are approved for use with NT/2000 ! The Oracle documentation is not at all clear. The README file associated with this says that approved compilers are listed in Settings_windows_nt.properties. However this just lists settings and does not explicitly state which C compiler it's trying to use ! The settings appear to indicate that it is MS Visual C++, BUT if so which version ? Professional, Enterprise, 5.0, 6.0 ??? Is this the only approved compiler ??? No where on the entire web seems to list this info. ! Any suggestions ?

    Hi,
    A month ago I got a note from Metalink claiming that ONLY Microsoft Visual C/C++ is certified againts ORacle 9i for WindowsNT/2000.
    FYI I managed to get it working. However the NCOMP tool and it's manual are quite beta-ish and I would not recommend NCOMP easily.
    Regards,
    Martijn
    Email me if you need further info on how to set NCOMP up.

  • Native compilation and the ROUND function

    Native Compilation Advisor lists the built-in ROUND function as not supported for natively compiled stored procedures.  Is there a suggested workaround?

    oracle by oracle  wrote:
    I am trying to test performance of one package and there is only one procedure wich uses just instr and substr internal functions ( I am working with varchar2).
    I am having the folowing results: native compilation is twice worst than inetrpreted. What may be the reason?
    P.S. I did ALTER SYSTEM FLUSH SHARED_POOL;Yuo should take this into account that the Native compilation is not supposed to make the code always go faster. If I remember correctly, the maximum benefit that Oracle benchmarked for it was about 30% only and taht too, if the code has lots of computational code rather than queries. If your package contains lots of this kind of code. than may be the Native compilation may be faster than the other but it doesn't come with any guarantee like this.
    Have a read about it from here,
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#sthref2278
    HTH
    Aman....

  • Native Compiled PL/SQL - Missing ORAPLS9.LIB (9i Release 2)

    In configuring the Natively Compiled PL/SQL feature of Oracle 9i, the library file ORAPLS9.LIB file can't be found. I tried generating it with:
    LIB /DEF:ORAPLS9.DLL
    but got the following warnings which didn't quite look right, and the resultant orapls9.lib file is rather small and doesn't work (unresolved externals).
    Is the ORAPLS9.LIB file supposed to be installed with 9i Release 2 for Windows 2000, or am I generating it incorrectly?
    BTW, the snpc_makefile.mk file is installed with 9i Release 2 for Windows, but not with 9i Release 1 for Windows.
    Thanks,
    Kevin Runner
    [email protected]
    Runner Technologies, Inc.
    561-395-9322
    OUTPUT
    E:\oracle\ora92\bin>lib /def:orapls9.dll
    Microsoft (R) Library Manager Version 6.00.8447
    Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
    LIB : warning LNK4068: /MACHINE not specified; defaulting to IX86
    orapls9.dll : warning LNK4017: MZI statement not supported for the target platform; ignored
    orapls9.dll : warning LNK4017: $ statement not supported for the target platform; ignored
    orapls9.dll : warning LNK4017: &&`j statement not supported for the target platform; ignored
    orapls9.dll : warning LNK4017: -? statement not supported for the target platform; ignored
    orapls9.dll : warning LNK4017: &E&#9658; statement not supported for the target platform; ignored
    orapls9.dll : warning LNK4017: -jF&#9668;oC&#9830;&#9829;-^kC&#9830;[os]+IIIIIIIIIIIUo8b8&#8593;oM6SVoG7 Wu&#9827;o~Hd6weI statement not supported for the target platfo
    rm; ignored
    orapls9.dll : warning LNK4017: jK&#9668;[]IIIIIIIIUo8So]&#9792;VWoC&#9830;o&#8252;o+-?&#9829;t statement not supported for the target platform; ignored
    Creating library orapls9.lib and object orapls9.exp

    Have you managed to resolve this problem?
    I'm having exactly the same experience (it's very frustrating, as I'm trying to run a benchmark at the moment).
    Hope to hear.
    Regards,
    T.
    Message was edited by:
    terenceo

  • Newer version of the program of native compilation NCOMP

    Hi,
    I tried to use the ncomp program to make native compilation of a jar file in an Oracle 8.1.7 Database on Unix platform with jdk 1.2.2.
    It returns an error :
    Set the JAVA_HOME to the location of the jdk 1.1.x.
    It seems the version of ncomp I have is unable to work with our jdk 1.2.2
    Where could I find a newer version of ncomp which work with jdk 1.1.2 ?
    Thanks in advance
    Bye
    [email protected]
    null

    see your duplicate posting on metalink.

  • Does native compiling improve application performance ?

    Hi,
    I've got familiar with Excelsior Native Compiler since a week ago. They claim on their website that compiling Java classes directly to native code (machine code) will improve the performance of the application. However, JAlbum (http://jalbum.net) says that its JAR files of the application run "basically at the same speed" compared to the native compiled one for windows.
    Does really compiling Java classes to native code improve performance? I'm not talking about the startup speed, but the whole application performance.
    Thanks...

    Youve really been spreading that article aroundthis
    morning, George, lol.
    It was actually a really good read this morning.
    Thanks for posting it.I know! just realized that's about the 3rd or 4th
    time I've posted it today. just a coincidence, thoughcan't promote that book enough though. Should be required reading (just like Effective Java).

Maybe you are looking for

  • FLASH CS4 Projector won't run on Mac OS 10.9.1

    I'm producing a projector out of Flash CS4 on an iMac running 10.6.8 OS. The projector along with supporting files gets burned to a DVD. When the DVD is placed into a machine with Mac OS 10.9.1, it fails to launch. Flash Player quits unexpectedly and

  • Mail and Gmail issues in Snow Leopard

    I've used Gmail with Mail for years, and it has suddenly stopped behaving. Mostly it takes *forever* for a message to be sent, but downloading messages can also take it's sweet time. I have several Gmail address I check, all are doing this. iPad and

  • I need to add a printer to my system and forget the procedures?

    How do you insery a regulat DVD into Mac mini?

  • How to make sequence of auth. methofs for Anyconnect 3.0

    Hi i was able to run the authentication based on the  User certificate issued by the Windows AD However in the Anyconnect connection profile I can choose between AAA or Certificate ( or both ) However some of our workstations or mobile devces doesn't

  • SD file "becoming" anamorphic widescreen...?

    I work at a university and we currently shoot performances in SD and capture to an older G4 with FCP 4.5 (multi-cam through a Grass Valley switcher, converted to firewire for capture through a JVC miniDV deck, if any of that matters). Anyway, I'm usi