Operating System - HP-UX
1748151 Members
3631 Online
108758 Solutions
New Discussion юеВ

Re: problem compiling programs under hpux11.11

 
SOLVED
Go to solution
khelij
Advisor

problem compiling programs under hpux11.11

hello everyone, I have problem compiling programs under hpux11.11 and gcc3.3.2for example, when i compiling my programm it always show error
============================
# make
/usr/local/bin/gcc -g -I/opt/OV/include -L/opt/OV/lib -c AlcPabxPolling.c
In file included from /opt/OV/include/OV/OVsnmpApi.h:60,
from /opt/OV/include/OV/OVsnmp.h:46,
from AlcPabxPolling.c:25:
/usr/include/sys/socket.h:484: error: erreur d'analyse syntaxique before "sendfile"
/usr/include/sys/socket.h:484: error: erreur d'analyse syntaxique before "bsize_t"
/usr/include/sys/socket.h:486: error: erreur d'analyse syntaxique before "sendpath"
/usr/include/sys/socket.h:486: error: erreur d'analyse syntaxique before "bsize_t"
*** Erreur - code de sortie 1

Arr├Г┬кt.
=========================================

Anyone can help me? Thanks in advance.I have attach the makefile in attachmen
26 REPLIES 26
Nicolas Dumeige
Esteemed Contributor

Re: problem compiling programs under hpux11.11

Bonjour

How did you install gcc, compilation / binaries ?

Have you install patch PHSS_28871 ?
( http://www.spinics.net/lists/gcchelp/msg02273.html )

A+

Nicolas
All different, all Unix
khelij
Advisor

Re: problem compiling programs under hpux11.11

i have install gcc 3.3.2 with swinstall
I do not know how command to list the patch on my hpux
khelij
Advisor

Re: problem compiling programs under hpux11.11

can you help me please
fedia
Dan Martin_1
Frequent Advisor

Re: problem compiling programs under hpux11.11

swlist -l product | grep PHSS_28871

or

swlist -l product | grep -i gcc

Dan
ranganath ramachandra
Esteemed Contributor

Re: problem compiling programs under hpux11.11

i dont think this has anything to do with PHSS_28871 (a linker/loader patch) because the build did not even reach the link stage, and no linker/loader/related include files are involved.

the problem is that gcc supplies its own sys/types.h which does not define the type sbsize_t, which is defined in HP-supplied /usr/include/sys/types.h. so you may consider adding this piece to gcc-supplied
sys/types.h .

# ifndef _BSIZE_T
# define _BSIZE_T
# if defined(_APP32_64BIT_OFF_T) || defined(_KERNEL)
typedef int64_t sbsize_t; /* signed length in bytes */
typedef uint64_t bsize_t; /* unsigned length in bytes */
# else
typedef long sbsize_t;
typedef unsigned long bsize_t;
# endif
# endif /* _BSIZE_T */

or, include /usr/include/sys/types.h instead of the gcc-supplied one (not sure if that will work well in all respects).
 
--
ranga
[i work for hpe]

Accept or Kudo

Rohan_7
Advisor
Solution

Re: problem compiling programs under hpux11.11

hi

this is a problem with GCC version that you have installed. You would be having GCC for HP-UX 11.00 rather than HP-UX11.11. If you have installed binary version of GCC 3.3.2 then this could happen.
Best way is to compile GCC on you machine.

Another solution is to add "-D_XOPEN_SOURCE_EXTENDED" in the compiler flags. With this the code compiles properly.
But I am not sure if there are any direct/indirect bad implications of this.

If you want to compile GCC, this thread would be helpfull to you:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=585633


HTH
Rohan
khelij
Advisor

Re: problem compiling programs under hpux11.11

First of all Thank you very much ;-)

the subject to this compile is :
i have HPUX 11.11 and HPOV 6.X
J have a program developpe on C for HPOV
i want to compile this script

Firstly i have include in /usr/include/sys/types.h

# ifndef _BSIZE_T
# define _BSIZE_T
# if defined(_APP32_64BIT_OFF_T) || defined(_KERNEL)
typedef int64_t sbsize_t; /* signed length in bytes */
typedef uint64_t bsize_t; /* unsigned length in bytes */
# else
typedef long sbsize_t;
typedef unsigned long bsize_t;
# endif
# endif /* _BSIZE_T */

secondly i compile and i have a new message :

./compile
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. /opt/OV/lib -c AlcPabxPolling.c
gcc: /opt/OV/lib: fichier d'entr├Г┬йe d'├Г┬йdition de liens n'est pas utilis├Г┬й parce l'├Г┬йdition de lien n'a pas ├Г┬йt├Г┬й faite
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. /opt/OV/lib -c SnmpPrints.c
gcc: /opt/OV/lib: fichier d'entr├Г┬йe d'├Г┬йdition de liens n'est pas utilis├Г┬й parce l'├Г┬йdition de lien n'a pas ├Г┬йt├Г┬й faite
Linking AlcPabxPolling ...
/usr/ccs/bin/ld: /opt/OV/lib: Not a valid object file (invalid system id)
collect2: ld a retourn├Г┬й 1 code d'├Г┬йtat d'ex├Г┬йcution
*** Erreur - code de sortie 1

Arr├Г┬кt.
==========================================

I think, i have probleme to put option path in makefile
i send you the mafile and the oth
khelij
Advisor

Re: problem compiling programs under hpux11.11

the second file
khelij
Advisor

Re: problem compiling programs under hpux11.11

the third