bugCERTI - Bugs: bug #31628, Compile errors on AIX 5.2...

 
 

bug #31628: Compile errors on AIX 5.2 (5200-10-01-0000) / GCC-4.2.4

Submitted by:  Martin Spott <mspott>
Submitted on:  Fri 12 Nov 2010 03:37:34 PM UTC  
 
Category: CERTISeverity: 3 - Normal
Item Group: Compilation errorStatus: Postponed
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: CVS
Reproducibility: Every TimeFixed Release: Unknown

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 12 Nov 2010 05:57:21 PM UTC, comment #1:

tokens.cc is a Lex generated file so I may have one
different from your.

What do you mean by

"Removing the condition around inclusion of <unistd.h> in 'tokens.cc' cures the issue"

A) <unistd.h> must be included
B) <unistd.h> must NOT be included

could you attach your generated tokens.cc.

RTIG_cmdline.c is again generated file (using gengetopt)
but this time the source is checked-in CVS for convenience
and in order to avoid the build dependency on "gengetopt".
The generated file is supposed to be portable...
I'll check what I can do for that and why stdio.h or stdlib.h
may define optxxx vars.

Sidenote: From the log you sent you are building in-source,
when possible an out-of-source build is better:
http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Fri 12 Nov 2010 03:37:34 PM UTC, original submission:

[ ??%] Building CXX object libCERTI/CMakeFiles/CERTI.dir/tokens.o
cd /usr/local/src/certi/libCERTI && /opt/freeware/bin/g++ -DCERTI_EXPORTS -DHOST_IS_BIG_ENDIAN -DHAVE_CONFIG_H=1 -DHAVE_XML -DRTI_USES_STD_FSTREAM -DDEBUG -I/opt/freeware/include/libxml2 -I/usr/local/src/certi/include -I/usr/local/src/certi -I/usr/local/src/certi/libHLA -I/usr/local/src/certi/libCERTI -o CMakeFiles/CERTI.dir/tokens.o -c /usr/local/src/certi/libCERTI/tokens.cc
/usr/local/src/certi/libCERTI/tokens.cc: In function 'void yy_init_buffer(yy_buffer_state, FILE)':
/usr/local/src/certi/libCERTI/tokens.cc:1586: error: 'isatty' was not declared in this scope
make[2]: *** [libCERTI/CMakeFiles/CERTI.dir/tokens.o] Error 1

Removing the condition around inclusion of <unistd.h> in 'tokens.cc' cures the issue. Next issue is:

[ ??%] Building C object RTIG/CMakeFiles/rtig.dir/RTIG_cmdline.o
cd /usr/local/src/certi/RTIG && /opt/freeware/bin/gcc -DHOST_IS_BIG_ENDIAN -DHAVE_CONFIG_H=1 -DHAVE_XML -DRTI_USES_STD_FSTREAM -I/opt/freeware/include/libxml2 -I/usr/local/src/certi/include -I/usr/local/src/certi -I/usr/local/src/certi/libHLA -I/usr/local/src/certi/libCERTI -I/usr/local/src/certi/libRTI -o CMakeFiles/rtig.dir/RTIG_cmdline.o -c /usr/local/src/certi/RTIG/RTIG_cmdline.c
/usr/local/src/certi/RTIG/RTIG_cmdline.c:278: error: static declaration of 'optarg' follows non-static declaration
/opt/freeware/lib/gcc/powerpc-ibm-aix5.2.0.0/4.2.4/include/stdlib.h:571: error: previous declaration of 'optarg' was here
/usr/local/src/certi/RTIG/RTIG_cmdline.c:292: error: static declaration of 'optind' follows non-static declaration
/opt/freeware/lib/gcc/powerpc-ibm-aix5.2.0.0/4.2.4/include/stdlib.h:572: error: previous declaration of 'optind' was here
/usr/local/src/certi/RTIG/RTIG_cmdline.c:297: error: static declaration of 'opterr' follows non-static declaration
/opt/freeware/lib/gcc/powerpc-ibm-aix5.2.0.0/4.2.4/include/stdlib.h:573: error: previous declaration of 'opterr' was here
/usr/local/src/certi/RTIG/RTIG_cmdline.c:301: error: static declaration of 'optopt' follows non-static declaration
/opt/freeware/lib/gcc/powerpc-ibm-aix5.2.0.0/4.2.4/include/stdio.h:454: error: previous declaration of 'optopt' was here
make[2]: *** [RTIG/CMakeFiles/rtig.dir/RTIG_cmdline.o] Error 1

Martin Spott <mspott>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bussenot (Updated the item)
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by mspott (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 May 2015 12:58:44 PM UTCbussenotOpen/ClosedOpen=>Closed
    Thu 07 May 2015 12:57:08 PM UTCbussenotStatusIn Progress=>Postponed
    Fri 12 Nov 2010 05:57:21 PM UTCerkStatusNone=>In Progress
      Assigned toNone=>erk

    Back to the top


    Powered by Savane 3.1-cleanup1