Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
  • 1.  XLC compile error for a tuxedo client code (C Language)

    Posted Wed May 24, 2017 01:53 PM

    Originally posted by: Nicole Trudeau


    For our reference and continued discussion, I am copying a question that was added to the C/C++ Cafe by SeemaPandhre on May 23. The question was added as a reply to an old (2011) question from awaishassan.

     

    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.

     


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


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

    Posted Wed May 24, 2017 01:54 PM

    Originally posted by: Nicole Trudeau


    On May 23, @JasonLiu 6b8cfd9e-d557-4c32-8d83-44f274531c77 replied with:

     

    Hi Seema,

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

    Regards,

    Jason Liu


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


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

    Posted Wed May 24, 2017 01:56 PM

    Originally posted by: Nicole Trudeau


    On May 24, SeemaPandhre replied with:

    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.


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


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

    Posted Wed May 24, 2017 03:36 PM

    Originally posted by: JasonLiu


    Hi Seema, @SeemaPandhre 7520bce1-d259-44ed-ba22-6bd9ad32a7ca

    Thanks for your response. In order to better assist you with the issue, could you let us know the following information?

    1. Your xlc compiler version. You can use -qversion option to obtain this information.

    2. The AIX OS level you are running on.

    3. The compiler command that produced the error that you posted:

    "../../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.

    One of the make command that you used in either step2, or step3, issued a compiler command that generated those errors. So it would be helpful if you could figure out which compiler command generated those errors.

    4. Preprocessed source file you are trying to compile with. After you get the compiler command that generated those errors, please add in the option -P at the end of that command. The compiler will generate a preprocessed source file with suffix '.i' in the directory you execute the compiler command, then you can attach that preprocessed source here. 

     

    Thanks,

    Jason Liu


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


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

    Posted Fri May 26, 2017 11:08 AM

    Originally posted by: Nicole Trudeau


    On May 26, @SeemaPandhre 7520bce1-d259-44ed-ba22-6bd9ad32a7ca replied with:

    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.


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


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

    Posted Sun May 28, 2017 02:42 PM

    Originally posted by: JasonLiu


    Hi Seema,

    It's good that we know "make check" is the one that causing the problem. 

    I guess the error occurs from compiling "run-bug-2803.o" object file.

    But other than "CC run-bug-2803.o", it doesn't print out the actual compiler command that we want. 

    Could you try "make check V=1", "make check VERBOSE=1", or "make -n" to see if we can get the compiler command that starts with "/usr/vac/bin/xlc", "xlc", or "cc"?

    If we do, could you please

    1. Paste that compiler command here

    2. Add -P to the compiler command in step1, and attach the preprocessed file end with suffix .i here

     

    Thanks!


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


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

    Posted Thu June 29, 2017 11:29 AM

    Originally posted by: Nicole Trudeau


    @SeemaPandhre 7520bce1-d259-44ed-ba22-6bd9ad32a7ca​ Seema, are you still experiencing these issues? Did you try the steps that Jason listed? Please let us know if we can help you further.


    #Ask-Question-Here--General-Compiler-Q-and-A
    #C/C++andFortran