Topic
  • 5 replies
  • Latest Post - ‏2017-05-26T08:52:46Z by SeemaPandhre
awaishassan
awaishassan
1 Post

Pinned topic XLC compile error for a tuxedo client code (C Language)

‏2011-06-18T10:57:28Z |
Hi,

I have XL C/C++ for AIX (Evaluation version) installed on my DEV SERVER with aix6.1. I can compile and build sample tuxedo client code provided with tuxedo installations, but when i try to compile/build my own client code(also in C) I get following errors.

==========================================================================================================================
$ e/sibusr/tuxedo11gR1/lib -I /usr/include/sys -I../include -I /usr/vac/lib -O /home/sibusr/tuxedo11gR1/lib/tpinit.o ptcltuxcl.c -c <
"ptcltuxcl.c", line 1.19: 1506-166 (S) Definition of function TuxedoClient requires parentheses.
"/usr/include/sys/inttypes.h", line 59.9: 1506-045 (S) Undeclared identifier intmax_t.
"/usr/include/sys/inttypes.h", line 61.3: 1506-273 (E) Missing type in declaration of imaxdiv_t.
"/usr/include/sys/inttypes.h", line 64.8: 1506-166 (S) Definition of function intmax_t requires parentheses.
"/usr/include/sys/inttypes.h", line 64.17: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/inttypes.h", line 68.30: 1506-045 (S) Undeclared identifier __nptr.
"/usr/include/sys/inttypes.h", line 68.38: 1506-045 (S) Undeclared identifier __endptr.
"/usr/include/sys/inttypes.h", line 68.48: 1506-045 (S) Undeclared identifier __base.
"/usr/include/sys/inttypes.h", line 89.8: 1506-166 (S) Definition of function intmax_t requires parentheses.
"/usr/include/sys/inttypes.h", line 89.17: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 336.3: 1506-273 (E) Missing type in declaration of sigset_t.
"/usr/include/sys/types.h", line 348.9: 1506-046 (S) Syntax error.
"/usr/include/sys/types.h", line 383.9: 1506-046 (S) Syntax error.
"/usr/include/sys/types.h", line 473.9: 1506-166 (S) Definition of function uint64_t requires parentheses.
"/usr/include/sys/types.h", line 473.18: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 481.39: 1506-273 (E) Missing type in declaration of quad.
"/usr/include/sys/vm_types.h", line 36.9: 1506-166 (S) Definition of function ulong_t requires parentheses.
"/usr/include/sys/vm_types.h", line 36.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/vm_types.h", line 153.9: 1506-045 (S) Undeclared identifier vmhandle_t.
"/usr/include/sys/vm_types.h", line 154.9: 1506-045 (S) Undeclared identifier caddr_t.
"/usr/include/sys/vm_types.h", line 159.3: 1506-273 (E) Missing type in declaration of vmaddr_t.
"/usr/include/sys/vm_types.h", line 169.9: 1506-046 (S) Syntax error.
"/usr/include/sys/vm_types.h", line 195.9: 1506-046 (S) Syntax error.
"/usr/include/sys/vm_types.h", line 266.9: 1506-166 (S) Definition of function vmhandle_t requires parentheses.
"/usr/include/sys/vm_types.h", line 266.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/m_types.h", line 51.3: 1506-273 (E) Missing type in declaration of label_t.
"/usr/include/sys/m_types.h", line 53.9: 1506-166 (S) Definition of function int32long64_t requires parentheses.
"/usr/include/sys/m_types.h", line 53.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 565.30: 1506-273 (E) Missing type in declaration of physadr_t.
"/usr/include/sys/types.h", line 566.9: 1506-166 (S) Definition of function physadr_t requires parentheses.
"/usr/include/sys/types.h", line 566.25: 1506-276 (S) Syntax error: possible missing '{'?
"/usr/include/sys/types.h", line 605.9: 1506-046 (S) Syntax error.

=========================================================================================================================
Can you please guide me through this.
Regards,
Awais
Updated on 2011-06-18T11:43:55Z at 2011-06-18T11:43:55Z by Dwayne_M
  • Dwayne_M
    Dwayne_M
    9 Posts

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2011-06-18T11:43:55Z  
    Hi Awais,

    By adding -I /usr/include/sys to the command line the compiler is picking up include files from /usr/include/sys that it should be picking up from /usr/vac/include/sys. Please remove "-I /usr/include/sys" from your compiler command.

    Also, any header files in the sys subdirectory should be included in your source code as:
    #include <sys/filename.h>
    not
    #include <filename.h>
    Dwayne Moore Market Manager, Power & Compilers IBM Corporation | Rational Software
  • SeemaPandhre
    SeemaPandhre
    3 Posts

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2017-05-23T05:57:07Z  
    • Dwayne_M
    • ‏2011-06-18T11:43:55Z
    Hi Awais,

    By adding -I /usr/include/sys to the command line the compiler is picking up include files from /usr/include/sys that it should be picking up from /usr/vac/include/sys. Please remove "-I /usr/include/sys" from your compiler command.

    Also, any header files in the sys subdirectory should be included in your source code as:
    #include <sys/filename.h>
    not
    #include <filename.h>
    Dwayne Moore Market Manager, Power & Compilers IBM Corporation | Rational Software

    Hi Dwayne,

    I am also getting similar kind of error while compiling NTPv4 on AIX using xlc.

     

    "../../include/ntp_fp.h", line 355.41: 1506-276 (S) Syntax error: possible missing identifier?
    "../../include/ntp_fp.h", line 355.17: 1506-282 (S) The type of the parameters must be specified in a prototype.
    "/usr/include/sys/uio.h", line 86.56: 1506-275 (S) Unexpected text offset_t encountered.
    "/usr/include/sys/uio.h", line 87.57: 1506-275 (S) Unexpected text offset_t encountered.
    "/usr/include/sys/xmem.h", line 228.13: 1506-046 (S) Syntax error.
    "/usr/include/sys/uio.h", line 97.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/socket.h", line 657.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/socket.h", line 666.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/resource.h", line 241.9: 1506-046 (S) Syntax error.
    make: 1254-004 The error code from the last command is 1.


    I have vac as well as vacpp installed on my AIX box and my /usr/vac/include does not have sys rather /usr/vacpp/include has sys folder.  Please help me with your suggestions to resolve above issue.

  • JasonLiu
    JasonLiu
    1 Post

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2017-05-23T19:46:49Z  

    Hi Dwayne,

    I am also getting similar kind of error while compiling NTPv4 on AIX using xlc.

     

    "../../include/ntp_fp.h", line 355.41: 1506-276 (S) Syntax error: possible missing identifier?
    "../../include/ntp_fp.h", line 355.17: 1506-282 (S) The type of the parameters must be specified in a prototype.
    "/usr/include/sys/uio.h", line 86.56: 1506-275 (S) Unexpected text offset_t encountered.
    "/usr/include/sys/uio.h", line 87.57: 1506-275 (S) Unexpected text offset_t encountered.
    "/usr/include/sys/xmem.h", line 228.13: 1506-046 (S) Syntax error.
    "/usr/include/sys/uio.h", line 97.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/socket.h", line 657.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/socket.h", line 666.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/resource.h", line 241.9: 1506-046 (S) Syntax error.
    make: 1254-004 The error code from the last command is 1.


    I have vac as well as vacpp installed on my AIX box and my /usr/vac/include does not have sys rather /usr/vacpp/include has sys folder.  Please help me with your suggestions to resolve above issue.

    Hi Seema,

     

    Could you post your compile command here, so that we can see what goes wrong from there?

     

    Regards,

    Jason Liu

  • SeemaPandhre
    SeemaPandhre
    3 Posts

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2017-05-24T06:02:38Z  
    • JasonLiu
    • ‏2017-05-23T19:46:49Z

    Hi Seema,

     

    Could you post your compile command here, so that we can see what goes wrong from there?

     

    Regards,

    Jason Liu

    Hi Jason,

    Thanks for your quick response.


    I have executed below commands.

    1. ./configure in NTPv4 base/parent directory

    2. make in NTPv4 base/parent directory

    3. make check in NTPv4 tests subfolder. This command is for compiling tests.

  • Nicole Trudeau
    Nicole Trudeau
    2 Posts

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2017-05-24T18:01:19Z  

    Hi Jason,

    Thanks for your quick response.


    I have executed below commands.

    1. ./configure in NTPv4 base/parent directory

    2. make in NTPv4 base/parent directory

    3. make check in NTPv4 tests subfolder. This command is for compiling tests.

    @SeemaPandhre ​ Hi Seema, sorry to hear that you are experiencing issues and thank you for reporting it. We are currently investigating and will get back to you shortly. I have copied this question over to our new (as of April 2016) IBM developerWorks community forum for XL C/C++ and XL Fortran on POWER here where @JasonLiu ​ will post our reply - don't forget to join as a member of that community if you'd like to post more comments there! You may also want to bookmark our short URL to that community (http://ibm.biz/xl-power-compilers) for future quick reference to our XL C/C++ and XL Fortran on POWER blogs and forum.

  • SeemaPandhre
    SeemaPandhre
    3 Posts

    Re: XLC compile error for a tuxedo client code (C Language)

    ‏2017-05-26T08:52:46Z  

    Hi Jason,

    Thanks for your reply.

    Please find enclosed information from my environment.

    # /usr/vacpp/bin/xlC -qversion
    IBM XL C/C++ for AIX, V11.1 (5724-X13)
    Version: 11.01.0000.0014

    (0) root @ commodev22: /ntpv4-xlc-compilation/ntp-4.2.8p10/tests/libntp
    # /usr/vac/bin/xlc -qversion
    IBM XL C/C++ for AIX, V11.1 (5724-X13)
    Version: 11.01.0000.0014

    # uname -a
    AIX commodev22 1 6 00C581D74C00

     

    The compiler command that produced the error that you posted:

    make check

    # make check
    Making check in bug-2803
            make  check-am
            make  bug-2803
      CC       bug-2803.o
      CC       run-bug-2803.o
    "../../config.h", line 1642.9: 1506-236 (W) Macro name _THREAD_SAFE has been redefined.
    "../../config.h", line 1642.9: 1506-358 (I) "_THREAD_SAFE" is defined on line 64 of /usr/include/standards.h.
    "/usr/include/sys/resource.h", line 241.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/mstsave.h", line 77.9: 1506-046 (S) Syntax error.
    "/usr/include/sys/context.h", line 187.9: 1506-046 (S) Syntax error.
    "../../include/ntp_fp.h", line 355.41: 1506-335 (S) Parameter identifier list contains multiple occurrences of u_int.
    "../../include/ntp_fp.h", line 355.48: 1506-276 (S) Syntax error: possible missing identifier?
    "../../include/ntp_fp.h", line 355.17: 1506-282 (S) The type of the parameters must be specified in a prototype.
    "/usr/include/sys/uio.h", line 86.56: 1506-275 (S) Unexpected text offset_t encountered.
    "/usr/include/sys/uio.h", line 87.57: 1506-275 (S) Unexpected text offset_t encountered.
    "/usr/include/sys/xmem.h", line 228.13: 1506-046 (S) Syntax error.
    make: 1254-004 The error code from the last command is 1.

     

    # make check -P
    make: Not a recognized flag: P

    Let me know if you need any further information from my end.