Operating System - HP-UX
1748219 Members
4607 Online
108759 Solutions
New Discussion

Re: How to adjust AllianceOne gcc on 11.31(ia64)

 
inoguchi
Occasional Visitor

How to adjust AllianceOne gcc on 11.31(ia64)

Hi,

I would like to ask about

How to adjust gcc-ia64-4.7.1.depot.gz on HP-UX 11i 11.31(ia64).

 

Environment

I downloaded gcc-ia64-4.7.1.depot.gz from AllianceOne web site,
and installed it on HP-UX 11i 11.31(ia64).

 

I found that the gcc-ia64-4.7.1.depot.gz was built on 11.23(ia64).
Here is gcc -v output.

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/hp-gcc-4.7.1/bin/../libexec/gcc/ia64-hp-hpux11.23/4.7.1/lto-wrapper
Target: ia64-hp-hpux11.23
Configured with: /home2/knmar/gcc/binutils_2.2_tar_gcc_4.7.1_tar_bld/gcc_src/configure --host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23 --prefix=/home2/knmar/gcc/binutils_2.2_tar_gcc_4.7.1_tar_bld/ia64-hp-hpux11.23/install/opt/hp-gcc --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/ia64-hp-hpux11.23 --with-mpfr=/proj/opensrc/be/ia64-hp-hpux11.23 SED=/usr/bin/sed Thread model: posix gcc version 4.7.1 (GCC)

 

Issue

 I got compilation error with this environment.

Sample source code t.c

#include <time.h>
int main() {
    struct tm t;
}

 Compilation error with gcc

# which gcc
/opt/hp-gcc/bin/gcc
#
# gcc t.c
In file included from /usr/include/time.h:12:0,
                 from t.c:1:
/usr/include/sys/_time.h:56:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
In file included from /usr/include/time.h:12:0,
                 from t.c:1:
/usr/include/sys/_time.h:111:25: error: expected ')' before 'struct'
/usr/include/sys/_time.h:116:26: error: expected ')' before 'struct'
/usr/include/sys/_time.h:121:26: error: expected ')' before 'const'
/usr/include/sys/_time.h:131:25: error: expected ')' before 'struct'
/usr/include/sys/_time.h:147:26: error: expected ')' before 'struct'
/usr/include/sys/_time.h:152:26: error: expected ')' before 'int'
In file included from /usr/include/sys/_time.h:168:0,
                 from /usr/include/time.h:12,
                 from t.c:1:
/usr/include/sys/_timeval.h:33:2: error: unknown type name 'suseconds_t'
In file included from /usr/include/time.h:12:0,
                 from t.c:1:
/usr/include/sys/_time.h:173:19: error: expected ')' before 'int'
In file included from /usr/include/time.h:15:0,
                 from t.c:1:
/opt/hp-gcc-4.7.1/bin/../lib/gcc/ia64-hp-hpux11.23/4.7.1/include-fixed/sys/time.h:116:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
In file included from t.c:1:0:
/usr/include/time.h:59:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
t.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
#

 

Guess and Question

 I'm not sure though I guess this issue is caused by header files mismatch.
And I found /opt/hp-gcc-4.7.1/libexec/gcc/ia64-hp-hpux11.23/4.7.1/install-tools/mkheaders script.
This script seems to solve the 'header files mismatch' problem.

 

And I would like to ask that how this script run ?
Is it needed to modify "# Basic information" section replacing '11.23' with '11.31' ?

Or is there any way to adjust this ?

 

Thanks.

 

2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: How to adjust AllianceOne gcc on 11.31(ia64)

>I guess this issue is caused by header files mismatch.

 

Yes, see:

http://h30499.www3.hp.com/t5/Languages-and-Scripting/gcc-error/m-p/3549796

http://h30499.www3.hp.com/t5/Languages-and-Scripting/gcc-g-on-hpux-won-t-compile-can-t-find-stdint/m-p/4061767

h30499.www3.hp.com/t5/Languages-and-Scripting/Install-Doxygen/m-p/4701097

 

>This script seems to solve the "header files mismatch" problem.

 

Yes, Steve mentioned that.

inoguchi
Occasional Visitor

Re: How to adjust AllianceOne gcc on 11.31(ia64)

Thanks. It works.

 

# cd /opt/hp-gcc-4.7.1/libexec/gcc/ia64-hp-hpux11.23/4.7.1/install-tools
#
# ./mkheaders -v /opt/hp-gcc-4.7.1
Fixing headers into /opt/hp-gcc-4.7.1/lib/gcc/ia64-hp-hpux11.23/4.7.1/include-fixed for ia64-hp-hpux11.23 target
Forbidden identifiers: hpux unix
Fixed:  complex.h
Fixed:  ia64/sys/getppdp.h
Fixed:  sys/_inttypes.h
Fixed:  sys/_time.h
Fixed:  sys/newsig.h
Fixed:  sys/pthread.h
Fixed:  sys/socket.h
Fixed:  sys/stdsyms.h
Fixed:  sys/time.h
Fixed:  sys/unistd.h
Fixed:  varargs.h
Fixed:  assert.h
Fixed:  ctype.h
Fixed:  curses.h
Fixed:  errno.h
Fixed:  pwd.h
Fixed:  stddef.h
Fixed:  stdint.h
Fixed:  stdio.h
Fixed:  stdlib.h
Fixed:  string.h
Fixed:  wchar.h
Fixed:  aCC/rw/compiler.h
Fixed:  aCC/stdcomp.h
Fixed:  aCC_std/stdcomp.h
Fixed:  exportent.h
Fixed:  X11/Xfuncs.h
Fixed:  X11/Xthreads.h
Fixed:  facetterm.h
Fixed:  facetwin.h
Fixed:  X11R6/X11/Xfuncs.h
Fixed:  X11R6/X11/Xthreads.h
fixincludes is done
#