as asked,
bash-5.0$ rpm -qi gcc9-cpp-9.3.0-2.ppc
Name : gcc9-cpp
Version : 9.3.0
Release : 2
Architecture: ppc
Install Date: Wed May 12 09:48:27 CDT 2021
Group : Development/Languages
Size : 32158670
License : GPL
Signature : (none)
Source RPM : gcc9-9.3.0-2.src.rpm
Build Date : Tue Apr 28 08:32:50 CDT 2020
Build Host : castor4.coopibm.frec.bull.fr
URL :
http://gcc.gnu.org/Summary : The C Preprocessor
Description :
Cpp is the GNU C-Compatible Compiler Preprocessor.
Cpp is a macro processor which is used automatically
by the C compiler to transform your program before actual
compilation. It is called a macro processor because it allows
you to define macros, abbreviations for longer
constructs.
The C preprocessor provides four separate functionalities: the
inclusion of header files (files of declarations that can be
substituted into your program); macro expansion (you can define macros,
and the C preprocessor will replace the macros with their definitions
throughout the program); conditional compilation (using special
preprocessing directives, you can include or exclude parts of the
program according to various conditions); and line control (if you use
a program to combine or rearrange source files into an intermediate
file which is then compiled, you can use line control to inform the
compiler about where each source line originated).
You should install this package if you are a C programmer and you use
macros.
------------------------------
Mandar Shahane
------------------------------
Original Message:
Sent: Wed May 12, 2021 11:51 AM
From: SANKET RATHI
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Can you paste output of "rpm -qi <gcc package>" ?
Between this issue is because of recent header file changes in AIX 72TL5.
gcc make some changes in the AIX header files to make it c++ safe and put it in its include directory for use.
If the gcc was installed and then system is updated to newer AIX level then gcc include would have older AIX headers and issue can come.
You can reinstall latest gcc and that should fix the issue and that would be better approach.
------------------------------
SANKET RATHI
Original Message:
Sent: Wed May 12, 2021 10:20 AM
From: Mandar Shahane
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
I am not sure, DEVOPS teams have done it, If you can suggest any location I will try and download it from there
------------------------------
Mandar Shahane
Original Message:
Sent: Wed May 12, 2021 10:16 AM
From: SANKET RATHI
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Hi Mandar,
From where did you install gcc 9.3 ?
------------------------------
SANKET RATHI
Original Message:
Sent: Wed May 12, 2021 09:22 AM
From: Mandar Shahane
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Hi Sangamesh,
I am facing similar issue on the AIX with GCC version 9.3. When I try to compile the file (contents pasted below)
bash-5.0$ cat myfile.c
#include<stdio.h>
#include<sys/wait.h>
int main()
{
printf("I am here\n" );
}
bash-5.0$ gcc myfile.c
In file included from /usr/include/sys/resource.h:57,
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/9/include-fixed/sys/wait.h:56,
from myfile.c:2:
/usr/include/sys/time.h:108:16: error: redefinition of 'struct sigset_t'
108 | typedef struct sigset_t {
| ^~~~~~~~
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/9/include-fixed/stdio.h:501,
from myfile.c:1:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/9/include-fixed/sys/types.h:345:16: note: originally defined here
345 | typedef struct sigset_t {
| ^~~~~~~~
In file included from /usr/include/sys/resource.h:57,
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/9/include-fixed/sys/wait.h:56,
from myfile.c:2:
/usr/include/sys/time.h:124:3: error: conflicting types for 'sigset_t'
124 | } sigset_t;
| ^~~~~~~~
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/9/include-fixed/stdio.h:501,
from myfile.c:1:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/9/include-fixed/sys/types.h:361:3: note: previous declaration of 'sigset_t' was here
361 | } sigset_t;
| ^~~~~~~~
------------------------------
Mandar Shahane
Original Message:
Sent: Wed January 06, 2021 06:56 AM
From: SANGAMESH MALLAYYA
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Hi Felipe,
Could you let me know the exact issue you faced with the gcc-8.3.0-3 ?
gcc-8.3.0-3 should have the required header file fixes.
------------------------------
SANGAMESH
Original Message:
Sent: Wed December 30, 2020 07:51 AM
From: Felipe Cardeneti Mendes
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Hi @SANKET RATHI ,
Thanks for your feedback. You forgot to mention the last published GCC is still in the beta folder. The 8.3.0-3 present in the main repos is still broken.
Yes, the beta one fixes the problem. It seems the same update you guys did is the workaround I came up with to compile my code, so I will just stick with my changes until you guys push it out from beta. Glad my C skills are still worth something :-)
------------------------------
Felipe Cardeneti Mendes
Original Message:
Sent: Tue December 29, 2020 11:41 PM
From: SANKET RATHI
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Hi Felipe,
Yes we are aware of the issue and it is because change in AIX header in 72TL5.
We have already updated gcc and published the fixed one.
Could you please update latest gcc from toolbox and let us know if that is not fixing your issue.
------------------------------
SANKET RATHI
Original Message:
Sent: Tue December 29, 2020 11:32 AM
From: Felipe Cardeneti Mendes
Subject: GCC struct sigset_t conflicts with AIX sys/time.h
Hello, this pretty much seem a new problem affecting all releases of GCC under 7.2 latest TL.
The following code is unable to compile under AIX 7.2 TL5, probably because the sigset_t struct is now defined in /usr/include/sys/time.h:
#include <sys/wait.h>int main(){ return 0;}
Stack trace:
gcc -o program program.cIn file included from /usr/include/sys/resource.h:57, from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/sys/wait.h:56, from program.c:1:/usr/include/sys/time.h:108:16: error: redefinition of 'struct sigset_t' typedef struct sigset_t { ^~~~~~~~In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/sys/wait.h:45, from program.c:1:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/sys/types.h:345:16: note: originally defined here typedef struct sigset_t { ^~~~~~~~In file included from /usr/include/sys/resource.h:57, from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/sys/wait.h:56, from program.c:1:/usr/include/sys/time.h:124:3: error: conflicting types for 'sigset_t' } sigset_t; ^~~~~~~~In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/sys/wait.h:45, from program.c:1:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.1.0/include-fixed/sys/types.h:361:3: note: previous declaration of 'sigset_t' was here } sigset_t; ^~~~~~~~
I ain't sure when sigset_t was placed in time.h header but I do have an old backup where it is not present (probably in TL3, not sure about TL4). In any case, this is breaking all releases of GCC under that TL.
My workaround was simply define _SIGSET_T under GCC types.h header, but perhaps someone may be able to come up with a more fashionable and proper way to fix this.
May be a good idea to look into other structs that may be conflicting as well, sigset_t was the one that brought up my attention.
Thanks!
------------------------------
Felipe Cardeneti Mendes
UNIX Engineer
------------------------------