Compilation Problems on a AIX with XLC

Discussion in 'C Programming' started by alban, Feb 8, 2006.

  1. alban

    alban Guest

    Hello

    I have got some problems of compilation on a AIX IBM,
    I use the XLC compilator (And I can't install another one).

    I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation
    after the pre-compilation with the my makefile I get the files ".c"
    After this a get also the objects files ".o", but no linkage ! and I can't have the exec file !

    I have got some errors how I dont understand really :

    make -f proc.mk all
    506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
    "pmag.c", line 293.28: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    "pmag.c", line 355.35: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    "pmag.c", line 357.40: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    "pmag.c", line 359.40: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    "pmag.c", line 990.43: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct PRE*" is not allowed.
    "pmag.c", line 990.47: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    "pmag.c", line 1002.43: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct QRY*" is not allowed.
    "pmag.c", line 1002.47: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    "pmag.c", line 1157.33: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct STA*" is not allowed.
    "pmag.c", line 1157.37: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    "pmag.c", line 1252.25: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct ACK*" is not allowed.
    "pmag.c", line 1252.29: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    "pmag.c", line 1317.25: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct ACK*" is not allowed.
    "pmag.c", line 1317.29: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    "pmag.c", line 1973.18: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    325 1500-010: (W) WARNING in scn_glb: Infinite loop. Program may not stop.
    986 1500-010: (W) WARNING in bat_s115: Infinite loop. Program may not stop.
    1117 1500-010: (W) WARNING in mag: Infinite loop. Program may not stop.
    2417 1500-010: (W) WARNING in oto_s115: Infinite loop. Program may not stop.
    cc -L/produits/oracle/v716/lib -o pmag pmag.o /produits/oracle/v716/lib/libsql.a /produits/oracle/v716/lib/osntab.o -lsqlnet -lora /produits/oracle/v716/lib/libpls.a -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lm -lld -lm -lm -lld -lm pmis.o psto.o strategie.o mag.a wwin.a -lcurses
    make : 1254-004 Code d'erreur de la dernière commande : 1.


    Arrêt.


    so the xlc compilator dont speak too mutch...

    First: This Warning is very important ? or can I do my compilation ?
    506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.


    Ma deuxieme question est comment faire une bonne redirection des sorties standard et erreur sur IBM AIX ?

    What I need to do to have a good error and standard out redirect on AIX IBM ?

    After this I would like compile a simple code :

    #include <stdio.h>
    main()
    { printf("toto\n");
    }


    #cc toto.c -o toto
    1506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.

    #chmod 777 ./toto
    #./toto
    exec() : 0509-036 Impossible de charger le programme toto
    en raison des erreurs suivantes :
    0509-108 La section .loader n'existe pas. "can't find the .loader section"

    it's a linker error too ? Can you give me some information THX

    Alban
     
    alban, Feb 8, 2006
    #1
    1. Advertising

  2. alban

    Al Balmer Guest

    On Wed, 08 Feb 2006 11:30:48 +0100, alban <>
    wrote:

    >Hello
    >
    > I have got some problems of compilation on a AIX IBM,
    >I use the XLC compilator (And I can't install another one).
    >
    >I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation
    >after the pre-compilation with the my makefile I get the files ".c"
    >After this a get also the objects files ".o", but no linkage ! and I can't have the exec file !
    >
    >I have got some errors how I dont understand really :
    >
    >make -f proc.mk all
    >506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
    >"pmag.c", line 293.28: 1506-280 (W) Function argument assignment between types "char*" and "int" is not allowed.


    It sounds like you are passing a const unsigned char * to a function
    which the compiler thinks needs an int. This may be because you have
    omitted the header file which contains the prototype for the function.
    <snip>
    > 325 1500-010: (W) WARNING in scn_glb: Infinite loop. Program may not stop.


    This seems self-explanatory. Do you understand what is meant by
    "Infinite loop"? Without seeing the code causing the error, we can't
    possibly help on this one.

    <snip>

    >First: This Warning is very important ? or can I do my compilation ?


    All warnings are important. Nearly always, they are errors in your
    code, and need to be fixed. This is (obviously) especially true if you
    don't understand what's causing them.
    <snip>
    >
    >it's a linker error too ? Can you give me some information THX
    >

    Most likely, the compiler, being more cautious than you, did not
    produce linkable code.

    --
    Al Balmer
    Sun City, AZ
     
    Al Balmer, Feb 8, 2006
    #2
    1. Advertising

  3. alban

    Stan Milam Guest

    alban wrote:
    > Hello
    >
    > I have got some problems of compilation on a AIX IBM,
    > I use the XLC compilator (And I can't install another one).
    >
    > I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation
    > after the pre-compilation with the my makefile I get the files ".c"
    > After this a get also the objects files ".o", but no linkage ! and I can't have the exec file !
    >
    > I have got some errors how I dont understand really :
    >
    > make -f proc.mk all
    > 506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
    > "pmag.c", line 293.28: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    > "pmag.c", line 355.35: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    > "pmag.c", line 357.40: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    > "pmag.c", line 359.40: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    > "pmag.c", line 990.43: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct PRE*" is not allowed.
    > "pmag.c", line 990.47: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    > "pmag.c", line 1002.43: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct QRY*" is not allowed.
    > "pmag.c", line 1002.47: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    > "pmag.c", line 1157.33: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct STA*" is not allowed.
    > "pmag.c", line 1157.37: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    > "pmag.c", line 1252.25: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct ACK*" is not allowed.
    > "pmag.c", line 1252.29: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    > "pmag.c", line 1317.25: 1506-280 (W) Function argument assignment between types "unsigned char*" and "struct ACK*" is not allowed.
    > "pmag.c", line 1317.29: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "union GLB*" is not allowed.
    > "pmag.c", line 1973.18: 1506-280 (W) Function argument assignment between types "const unsigned char*" and "int" is not allowed.
    > 325 1500-010: (W) WARNING in scn_glb: Infinite loop. Program may not stop.
    > 986 1500-010: (W) WARNING in bat_s115: Infinite loop. Program may not stop.
    > 1117 1500-010: (W) WARNING in mag: Infinite loop. Program may not stop.
    > 2417 1500-010: (W) WARNING in oto_s115: Infinite loop. Program may not stop.
    > cc -L/produits/oracle/v716/lib -o pmag pmag.o /produits/oracle/v716/lib/libsql.a /produits/oracle/v716/lib/osntab.o -lsqlnet -lora /produits/oracle/v716/lib/libpls.a -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lm -lld -lm -lm -lld -lm pmis.o psto.o strategie.o mag.a wwin.a -lcurses
    > make : 1254-004 Code d'erreur de la dernière commande : 1.
    >
    >
    > Arrêt.
    >
    >
    > so the xlc compilator dont speak too mutch...
    >
    > First: This Warning is very important ? or can I do my compilation ?
    > 506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
    >
    >
    > Ma deuxieme question est comment faire une bonne redirection des sorties standard et erreur sur IBM AIX ?
    >
    > What I need to do to have a good error and standard out redirect on AIX IBM ?
    >
    > After this I would like compile a simple code :
    >
    > #include <stdio.h>
    > main()
    > { printf("toto\n");
    > }
    >
    >
    > #cc toto.c -o toto
    > 1506-507 (W) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
    >
    > #chmod 777 ./toto
    > #./toto
    > exec() : 0509-036 Impossible de charger le programme toto
    > en raison des erreurs suivantes :
    > 0509-108 La section .loader n'existe pas. "can't find the .loader section"
    >
    > it's a linker error too ? Can you give me some information THX
    >
    > Alban


    Tyr xlc_r rather than just plain cc. cc is the old K&R1 compiler used
    for backward compatibility. It does not like code from code generators,
    which is what Pro*C essentially is.
     
    Stan Milam, Feb 8, 2006
    #3
  4. alban

    Nudge Guest

    alban wrote:
    > I have got some problems of compilation on a AIX IBM [...]


    Your question is definitely off-topic for comp.lang.c

    You might find someone more helpful in comp.unix.aix
     
    Nudge, Feb 9, 2006
    #4
  5. alban

    Al Balmer Guest

    On Thu, 09 Feb 2006 12:33:08 +0100, Nudge <> wrote:

    >alban wrote:
    >> I have got some problems of compilation on a AIX IBM [...]

    >
    >Your question is definitely off-topic for comp.lang.c


    No, it isn't. The fact that he is using a specific implementation is
    irrelevant to at least part of the problem.
    >
    >You might find someone more helpful in comp.unix.aix


    --
    Al Balmer
    Sun City, AZ
     
    Al Balmer, Feb 9, 2006
    #5
  6. alban

    Al Balmer Guest

    On Wed, 08 Feb 2006 23:58:16 GMT, Stan Milam <>
    wrote:

    >
    >Tyr xlc_r rather than just plain cc. cc is the old K&R1 compiler used
    >for backward compatibility. It does not like code from code generators,
    >which is what Pro*C essentially is.


    Are you recommending the use of a compiler which accepts incorrect
    code?

    --
    Al Balmer
    Sun City, AZ
     
    Al Balmer, Feb 9, 2006
    #6
  7. alban

    Jordan Abel Guest

    On 2006-02-09, Al Balmer <> wrote:
    > On Wed, 08 Feb 2006 23:58:16 GMT, Stan Milam <>
    > wrote:
    >
    >>
    >>Tyr xlc_r rather than just plain cc. cc is the old K&R1 compiler used
    >>for backward compatibility. It does not like code from code generators,
    >>which is what Pro*C essentially is.

    >
    > Are you recommending the use of a compiler which accepts incorrect
    > code?


    I suspect that he's saying that "cc" does not accept correct code, not
    that xlc_r accepts incorrect code

    also note that there is NO code [other than which contains #error] that
    a compiler is required by the standard to reject.
     
    Jordan Abel, Feb 9, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. pervinder
    Replies:
    1
    Views:
    1,363
    David Lindauer
    Sep 24, 2004
  2. ChrisG
    Replies:
    1
    Views:
    457
    Thomas Tutone
    Nov 28, 2005
  3. ClownPleco

    putenv for AIX and ifdef for AIX

    ClownPleco, Aug 22, 2007, in forum: C Programming
    Replies:
    5
    Views:
    1,142
    Thomas Dickey
    Aug 24, 2007
  4. Alex Vinokur
    Replies:
    4
    Views:
    1,122
    Gary R. Hook
    Apr 10, 2010
  5. Replies:
    5
    Views:
    202
    Philippe Lucas
    Jul 8, 2005
Loading...

Share This Page