3 Replies Latest reply on Mar 25, 2010 3:46 PM by santosh.zanjurne

    Error compiling C++ files on Ubuntu 9

    csprof
      open64 fails to compile header files

       

      Cheers,

      I tried to compile a C++ project with open64 on AMD 64 Ubuntu 9 - and got tons of errors in the standard include files (attached).

      What am I doing wrong?



      In file included from /usr/include/stdio.h:911, from SquareMatrix.cpp:11: /usr/include/bits/stdio2.h: In function 'int sprintf(char*, const char*, ...)': /usr/include/bits/stdio2.h:35: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int snprintf(char*, size_t, const char*, ...)': /usr/include/bits/stdio2.h:66: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int fprintf(FILE*, const char*, ...)': /usr/include/bits/stdio2.h:99: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int printf(const char*, ...)': /usr/include/bits/stdio2.h:105: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int asprintf(char**, const char*, ...)': /usr/include/bits/stdio2.h:159: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int __asprintf(char**, const char*, ...)': /usr/include/bits/stdio2.h:167: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int dprintf(int, const char*, ...)': /usr/include/bits/stdio2.h:174: error: '__builtin_va_arg_pack' was not declared in this scope /usr/include/bits/stdio2.h: In function 'int obstack_printf(obstack*, const char*, ...)': /usr/include/bits/stdio2.h:182: error: '__builtin_va_arg_pack' was not declared in this scope In file included from SquareMatrix.h:14, from SquareMatrix.cpp:12: /usr/include/string.h: In function 'void* memchr(void*, int, size_t)': /usr/include/string.h:83: error: '__builtin_memchr' was not declared in this scope /usr/include/string.h: In function 'const void* memchr(const void*, int, size_t)': /usr/include/string.h:89: error: '__builtin_memchr' was not declared in this scope .......

        • Error compiling C++ files on Ubuntu 9
          santosh.zanjurne

          <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-alt:"Calisto MT"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-alt:Verdana; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:1627400839 -2147483648 8 0 66047 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

           

          Hello,

           

          I have Ubuntu 9.10 and can build many C++ application without any changes.

           

          Is it possible for you to share the C++ application which results in these errors? Or better still would be a sample test program that reproduces the issue?

           

          I will also need some additional information to help you better  -   The version of Open64 Compiler and Gcc on your machine. And the exact version of the Ubuntu you have (  9.04 or 9.10?)

           

          Regards,

          Santosh

           



            • Error compiling C++ files on Ubuntu 9
              csprof

              Somewhat discouragingly, the smallest program that causes an error is attached. As you can see, it's the standard stdio.h that cannot be compiled. Should I have installed some open64-specific header files?

              #include <stdio.h> main () { }

                • Error compiling C++ files on Ubuntu 9
                  santosh.zanjurne

                  Hello,
                  I tried reproduce this issue on Ubuntu 9.10 both 32/64 bit version but couldn’t. The downloaded Open64 compiler binaries work on Ubuntu but will fail at link time because of the different directory structure found on the Ubuntu. The Open64 source 
                  Downloadable contains INSTALL guide which explains the steps for building the Open64 compiler on Ubuntu.

                      I installed Ubuntu 9.10 both 32/64 bit version; default and with no extra packages.  Then I followed the instructions described in the INSTALL guide And I could then build and use Open64 compiler.

                  Can you please let us know more about your approach of using Open64 on Ubuntu? And info about the version of Open64 compiler (sources?), gcc on your machine and Ubuntu (32/64 bit) version?

                  Would it be possible for you to attach the preprocessed file of your test program? (opencc -E -dD file.c)

                  Regards,
                  Santosh