Operating System - HP-UX
1753508 Members
4963 Online
108795 Solutions
New Discussion юеВ

Re: problem compiling programs under hpux11.11

 
SOLVED
Go to solution
ranganath ramachandra
Esteemed Contributor

Re: problem compiling programs under hpux11.11

you should not be modifying /usr/include/sys/types.h - this file is fine as it is.

i meant the gcc-supplied types.h which will be in some location like
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/include/sys/types.h

this is the file that gets included when you compile with gcc because gcc's default include path has the above path first and /usr/include later.
 
--
ranga
[i work for hpe]

Accept or Kudo

ranganath ramachandra
Esteemed Contributor

Re: problem compiling programs under hpux11.11

the problem is because of the following line in the makefile:

CFLAGS = -g -w -I/opt/OV/include -I. $(SNMP_LIBPATH) /opt/OV/lib

you want to include the library lookup path but you missed the -L.

you should change that to
CFLAGS = -g -w -I/opt/OV/include -I. -L $(SNMP_LIBPATH) -L/opt/OV/lib

note that the makefile is not initializing SNMP_LIBPATH. you have to correct that.
 
--
ranga
[i work for hpe]

Accept or Kudo

khelij
Advisor

Re: problem compiling programs under hpux11.11

just a minute i make a test
Manish Srivastava
Trusted Contributor

Re: problem compiling programs under hpux11.11

Hi,

If you are compiling a 64bit application then add -mlp64 to the compile option. This will remove this error.

manish
khelij
Advisor

Re: problem compiling programs under hpux11.11

hi
i have modify the file /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.3.2/include/sys/types.h
after i have modify the makefile
and i have another message

# ./compile -mlp64
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. -L -L/opt/OV/lib -L/opt/IXImd12s/lib -L/opt/OV/lib -c AlcPabxPolling.c
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. -L -L/opt/OV/lib -L/opt/IXImd12s/lib -L/opt/OV/lib -c SnmpPrints.c
Linking AlcPabxPolling ...
done
# ls
AlcPabxPolling AlcPabxPolling.o core SnmpPrints.c
AlcPabxPolling.c AlcPabxPolling_origin makefile SnmpPrints.o
AlcPabxPolling.h compile makefile_origin
# ./AlcPabxPolling
/usr/lib/dld.sl: Unresolved symbol: [Vtable]key:__dt__9exceptionFv (data) from /usr/lib/libstd.2
/usr/lib/dld.sl: Unresolved symbol: typeid__XT9exception_ (data) from /opt/OV/lib/libov.3
/usr/lib/dld.sl: Unresolved symbol: [Vtable]key:__dt__21__versioned_type_infoFv (data) from /opt/OV/lib/libov.3
/usr/lib/dld.sl: Unresolved symbol: __bad_exception (data) from /opt/OV/lib/libov.3
/usr/lib/dld.sl: Unresolved symbol: __bad_alloc_exception (data) from /opt/OV/lib/libov.3
/usr/lib/dld.sl: Unresolved symbol: __curStaticObject (data) from /opt/OV/lib/libov.3
/usr/lib/dld.sl: Unresolved symbol: __curStaticObject (data) from /usr/lib/libstd.2
/usr/lib/dld.sl: Unresolved symbol: typeid__XT9exception_ (data) from /usr/lib/libstd.2
/usr/lib/dld.sl: Unresolved symbol: [Vtable]key:__dt__21__versioned_type_infoFv (data) from /usr/lib/libstd.2
/usr/lib/dld.sl: Unresolved symbol: __bad_exception (data) from /usr/lib/libstd.2
/usr/lib/dld.sl: Unresolved symbol: __bad_alloc_exception (data) from /usr/lib/libstd.2
/usr/lib/dld.sl: Unresolved symbol: typeid__XT9exception_ (data) from /opt/OV/lib/libovsnmp.3
/usr/lib/dld.sl: Unresolved symbol: __bad_exception (data) from /opt/OV/lib/libovsnmp.3
/usr/lib/dld.sl: Unresolved symbol: __bad_alloc_exception (data) from /opt/OV/lib/libovsnmp.3
/usr/lib/dld.sl: Unresolved symbol: __curStaticObject (data) from /opt/OV/lib/libovsnmp.3
/usr/lib/dld.sl: Unresolved symbol: [Vtable]key:__dt__21__versioned_type_infoFv (data) from /opt/OV/lib/libovsnmp.3
Abort(coredump)
#
Manish Srivastava
Trusted Contributor

Re: problem compiling programs under hpux11.11

Hi,

Do not change any *.h file. These files do not have a problem. If you have changed any file then please revert the changes.

You can verify that the problem is not in the header file by compiling a small test program. Use -E option to make sure that the same header file is being included.

As for the unsatisfied symbols the libc.2 should be /usr/lib/pa20_64/libc.2. Just do a nm(1) on the library and grep the symbols which are listed as unsatisfied.

manish
khelij
Advisor

Re: problem compiling programs under hpux11.11

if i dont make the change in types.h i have this message

# ./compile
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. -L -L/opt/OV/lib -L/opt/IXImd12s/lib -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:485: error: erreur d'analyse syntaxique before "sendpath"
/usr/include/sys/socket.h:485: error: erreur d'analyse syntaxique before "bsize_t"
*** Erreur - code de sortie 1

Arr├Г┬кt.
#
Manish Srivastava
Trusted Contributor

Re: problem compiling programs under hpux11.11

Hi,

I do not see the -mlp64 option in the compile line. Please add it to the compile line.

manish
khelij
Advisor

Re: problem compiling programs under hpux11.11

i have make -mlp64 and i have the same message
Do you know the patch must i put on my hpux machine to turn gcc and hpov.

# ./compile -mlp64
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. -L -L/opt/OV/lib -L/opt/IXImd12s/lib -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:485: error: erreur d'analyse syntaxique before "sendpath"
/usr/include/sys/socket.h:485: error: erreur d'analyse syntaxique before "bsize_t"
*** Erreur - code de sortie 1

Arr├Г┬кt.
Manish Srivastava
Trusted Contributor

Re: problem compiling programs under hpux11.11

Hi,

I still do not see the -mlp64 in the compile line.

# ./compile -mlp64
/usr/local/bin/gcc -g -w -I/opt/OV/include -I. -L -L/opt/OV/lib -L/opt/IXImd12s/lib -L/opt/OV/lib -c AlcPabxPolling.c


edit the file: compile and add -mlp64 in the option for gcc:

/usr/local/bin/gcc -g -w -mlp64 -I....

and then try. I have had similar problem and it was solved by this.

manish.