Hi Laura,
Looks gcc's sys/types.h isn't proper.
You have mentioned that you could reinstall and verify after that.
During the reinstall did you see the messages related to header files being fixed something like this ?
Applying io_quotes_def to sys/stropts.h
Applying aix_null to sys/types.h
Applying gnu_types to sys/types.h
Fixed: sys/types.h
Applying next_wait_union to sys/wait.h
Fixed: sys/wait.h
Applying aix_null to time.h
Fixed: time.h
Applying aix_null to unistd.h
Fixed: unistd.h
Applying io_quotes_def to usersec.h
.....
------------------------------
SANGAMESH
------------------------------
Original Message:
Sent: Tue June 14, 2022 07:31 AM
From: Laura Michaels
Subject: gcc
The output of rpm is:
gcc8-8.3.0-6.ppc
libgcc8-8.3.0-6.ppc
gcc8-cpp-8.3.0-6.ppc
gcc8-c++-8.3.0-6.ppc
oslevel -s shows:
7200-05-03-2148
Was getting the error when attempting to build some libraries from source using gcc with 32 bit support. Was working perfectly fine before our server team made their updates. If I export CC=gcc-10 in place of export CC=gcc, it compiles normally without the errors.
Here's an example of the errors output when I tried to compile psqlodbc version13.02.0000:
from info.c:19:
/usr/include/sys/time.h:126:3: error: conflicting types for 'sigset_t'
} sigset_t;
^~~~~~~~
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include-fixed/stdio.h:503,
from psqlodbc.h:21,
from info.c:19:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include-fixed/sys/types.h:361:3: note: previous declaration of 'sigset_t' was here
} sigset_t;
^~~~~~~~
make[1]: *** [Makefile:657: psqlodbcw_la-info.lo] Error 1
Thanks.
------------------------------
Laura Michaels
Original Message:
Sent: Tue June 14, 2022 06:35 AM
From: SANGAMESH MALLAYYA
Subject: gcc
Hi Laura,
Please let me know the output of "rpm -qa | grep gcc8" and "oslevel -s".
With a sample program like strcasecmp.c with stdlib.h include you are able to see the error ?
------------------------------
SANGAMESH
Original Message:
Sent: Mon June 13, 2022 10:47 AM
From: Laura Michaels
Subject: gcc
I tried to reinstall/update before I installed gcc-10. Still getting errors. When I switched to gcc-10 instead of gcc as the compiler (export CC=gcc10), the issue was resolved. gcc was working fine before our server team did their updates. Now only gcc-10 appears to be working.
Getting errors such as the following with gcc:
In file included from strcasecmp.c:2:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include-fixed/stdlib.h:341:25: error: unknown type name 'exit'
extern _NORETURN(void, exit)(int);
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8/include-fixed/stdlib.h:411,
from strcasecmp.c:2:
/usr/include/sys/time.h:126:3: error: conflicting types for 'sigset_t'
} sigset_t;
------------------------------
Laura Michaels
Original Message:
Sent: Mon June 13, 2022 10:15 AM
From: SANKET RATHI
Subject: gcc
On AIX 7.2 gcc-8 is still default gcc from AIX Toolbox soon we will be moving to gcc-10 as default.
So right now gcc (/opt/freeware/bin/gcc) will point to gcc-8 only.
You can install gcc-10 together will gcc-8 and you will have to use it as gcc-10.
In your case I think first you should update gcc-8 and other subrpms of gcc-8 to latest and if it is at latest then try to reinstall it that will fix the header file issues.
If you want to have gcc-10 as well then install gcc10 and its libraries and subrpms and use it with gcc-10.
If I am not wrong then using gcc-10 points to gcc-10 library first.
Following is same dump of a binary that compiled with gcc-10 and in library search path gcc-10 library path is first
***Import File Strings***
INDEX PATH BASE MEMBER
0 /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10/../../..:/opt/freeware/lib:/usr/lib:/lib
1 libc.a shr.o
I think best is to reinstall gcc8 and all gcc8 related rpms with "dnf reinstall <packages> or "yum reinstall <packages>"
------------------------------
SANKET RATHI
Original Message:
Sent: Mon June 13, 2022 08:21 AM
From: Laura Michaels
Subject: gcc
Our server team updated the software on our AIX system. It's still 7.2 but some of the libraries and programs have been updated. In doing so, the gcc installation from AIX Toolbox stopped working. There were issues with the include files. I read in an earlier post on this forum that a similar situation was fixed by updating the GNU compiler. Tried to do an update of the gcc package, but it didn't help. I installed gcc-10 and it works when compiling. However, it looks like the results are still pointing to the gcc 8 libraries. Any suggestions on best way to update the GNU compiler suite or how to switch to gcc-10 completely? Have concerns over mixing and matching versions of gcc and would like to clean this up if possible. Thanks.
------------------------------
Laura Michaels
------------------------------