opr make error

Help
Ray
2007-11-26
2013-04-17
  • Ray
    Ray
    2007-11-26

    I am trying to make opr on an AIX 5.3 system and am receiving the following error,

    ofin900dev01u:/home/oradev/opr/opr-1.1.11 $make
    Making all in libltdl
            make  all-am
            /bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H  -I. -I. -I.      -g -c -o ltdl.lo ltdl.c
    mkdir .libs
    cc -DHAVE_CONFIG_H -I. -I. -I. -g -c ltdl.c  -DPIC -o .libs/ltdl.o
    "ltdl.c", line 3759.58: 1506-280 (W) Function argument assignment between types "void*" and "int(*)(const char*,void*)" is not allowed.
    "ltdl.c", line 3765.58: 1506-280 (W) Function argument assignment between types "void*" and "int(*)(const char*,void*)" is not allowed.
    "ltdl.c", line 3769.62: 1506-280 (W) Function argument assignment between types "void*" and "int(*)(const char*,void*)" is not allowed.
    "ltdl.c", line 3776.62: 1506-280 (W) Function argument assignment between types "void*" and "int(*)(const char*,void*)" is not allowed.
    "ltdl.c", line 3783.62: 1506-280 (W) Function argument assignment between types "void*" and "int(*)(const char*,void*)" is not allowed.
            /bin/sh ./libtool --tag=CC --mode=link cc  -g    -o libltdlc.la   ltdl.lo -ldl
    ar cru .libs/libltdlc.a .libs/ltdl.o
    ranlib .libs/libltdlc.a
    creating libltdlc.la
    (cd .libs && rm -f libltdlc.la && ln -s ../libltdlc.la libltdlc.la)
    Target "all-am" is up to date.
    Making all in src
            make  all-am
            source='opr.c' object='opr.o' libtool=no  DEPDIR=.deps depmode=none /bin/sh ../depcomp  cc -DHAVE_CONFIG_H -I. -I. -I. -I../libltdl   -I/findevdb01home/oracle/findev01db/9.2.0/rdbms/demo -I/findevdb01home/oracle/findev01db/9.2.0/rdbms/public -I/findevdb01home/oracle/findev01db/9.2.0/rdbms/public  -g -c opr.c
    "opr.c", line 484.10: 1506-007 (S) "struct timespec" is undefined.
    "opr.c", line 517.10: 1506-007 (S) "struct timespec" is undefined.
    "opr.c", line 567.5: 1506-046 (S) Syntax error.
    "opr.c", line 567.8: 1506-045 (S) Undeclared identifier obtain.
    "opr.c", line 569.10: 1506-045 (S) Undeclared identifier r.
    "opr.c", line 619.5: 1506-046 (S) Syntax error.
    "opr.c", line 619.8: 1506-045 (S) Undeclared identifier obtain.
    make: The error code from the last command is 1.

    Stop.
    make: The error code from the last command is 2.

    Stop.
    make: The error code from the last command is 1.

    Stop.

    What am I doing wrong???

    Ray

     
    • ben pugh
      ben pugh
      2008-04-22

      Your problems are they have to do with the way they did some comments in their code, when you run make it uses your C compiler to compile opr.c and oprora.c, however there are C++ comments which the C compiler doesnt know how to handle:

      lines in opr.c that have C++ like comments:

      81:    //init ltdl
      88:    //open oratab to get ORACLE_HOME
      129:    //load libclntsh.so library and get function pointers

      change these to:

      /* init ltdl */
      /* open oratab to get ORACLE_HOME */
      /* load libclntsh.so library and get function pointers */

      lines in oprora.c that have C++ comments:

      567:    // obtain read (shared) lock on the file, blocking
      619:    // obtain write lock on the file, blocking

      change these to:

      /* obtain read (shared) lock on the file, blocking */
      /* obtain write lock on the file, blocking */

      after making the changes it should compile.

       
    • ben pugh
      ben pugh
      2008-04-22

      the other (and better way) is to tell your compiler the C++ comments are ok, I use
      xlC for my C compiler so I do it this way:

      export CFLAGS="-qcpluscmt"

      run ./configure
      then make

      from help for xlC:

               -qcpluscmt | -qnocpluscmt
                      Permits the usage of "//" to introduce a comment
                      that lasts until the end of the current source
                      line, as in C++.  The default is -qcpluscmt when
                      you invoke the compiler with xlc, xlc_r, cc, or
                      cc_r, or when -qlanglvl is set to stdc99 or extc99.
                      Otherwise, the default setting is -qnocpluscmt.