Operating System - HP-UX
1833874 Members
2035 Online
110063 Solutions
New Discussion

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

 
Kwang Tan
Advisor

Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

Hi there, I'm compiling with warning error for the server skeleton generated by 'rpcgen'.

Here's my "log":
=================================
$ ll
-rw-r--r-- 1 kwang users 210 Jan 19 18:31 rpc.x

$ cat rpc.x
const MAXNAMELEN = 2048;
typedef string x_string;

program X_RPC_FUNCTION_NUMBER
{ version X_RPC_FUNCTION_VERSION
{ x_string X_TEST(string) = 1;
} = 1;
} = 0x20000001;

$ rpcgen rpc.x

$ ll
-rw-r--r-- 1 kwang users 503 Jan 19 18:32 rpc.h
-rw-r--r-- 1 kwang users 210 Jan 19 18:31 rpc.x
-rw-r--r-- 1 kwang users 532 Jan 19 18:32 rpc_clnt.c
-rw-r--r-- 1 kwang users 4543 Jan 19 18:32 rpc_svc.c
-rw-r--r-- 1 kwang users 266 Jan 19 18:32 rpc_xdr.c

$ cc rpc_svc.c
cc: "rpc_svc.c", line 95: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 95: warning 563: Argument #2 is not the correct type.
cc: "rpc_svc.c", line 114: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 114: warning 563: Argument #3 is not the correct type.
cc: "rpc_svc.c", line 124: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 124: warning 563: Argument #3 is not the correct type.
/usr/ccs/bin/ld: Unsatisfied symbols:
... ...
=================================

There are unsatisfied symbols which I've taken out for this thread. My concern and surprise is 'rpc_svc.c' is generated by 'rpcgen' but shows "warning 604" error when being compiled by 'cc'. Is there something wrong in 'rpc.x' (RPC Protocol Specification File) which thus results in this error?

Attached 'rpc_svc.c' is for reference. Thanks.

@@ Kwang
6 REPLIES 6
Kwang Tan
Advisor

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

One more piece of information: All these take place on 64bit HP-UX operating system.

@@ Kwang
Arunvijai_4
Honored Contributor

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

Hello,

Which version of "cc" compiler you are using ? #>what `which cc`

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Kwang Tan
Advisor

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

Hi Arun,

$ what `which cc`
/usr/bin/cc:
$Revision: 92453-07 linker linker crt0.o B.11.37 040218 $
LINT B.11.11.12 CXREF B.11.11.12
HP92453-01 B.11.11.12 HP C Compiler
$ PATCH/11.00:PHCO_27774 Oct 3 2002 09:45:59 $

@@ Kwang
Muthukumar_5
Honored Contributor

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

cc: "rpc_svc.c", line 95: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 95: warning 563: Argument #2 is not the correct type.
cc: "rpc_svc.c", line 114: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 114: warning 563: Argument #3 is not the correct type.
cc: "rpc_svc.c", line 124: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 124: warning 563: Argument #3 is not the correct type.

are related with compiler compatible warnings. Which will not effect the binary.

/usr/ccs/bin/ld: Unsatisfied symbols:
... ... is going to be the problem. You have link the needed libraries when compilation phase. Export with -L option or directly link that library.

May be some library has to be linked during run time with SHLIB_PATH or LD_LIBRARY_PATH

--
Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

Hello,

What are the Unsatisfied symbols you got? You can trun off warning while compiling rpc_svc.c by -w

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Kwang Tan
Advisor

Re: Get "Pointers are not assignment-compatible" when compiling server skeleton generated by rpcgen

Hi Muthu and Arun

Here is the output:

=================================
$ cc rpc_svc.c
cc: "rpc_svc.c", line 95: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 95: warning 563: Argument #2 is not the correct type.
cc: "rpc_svc.c", line 114: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 114: warning 563: Argument #3 is not the correct type.
cc: "rpc_svc.c", line 124: warning 604: Pointers are not assignment-compatible.
cc: "rpc_svc.c", line 124: warning 563: Argument #3 is not the correct type.
/usr/ccs/bin/ld: Unsatisfied symbols:
svcerr_decode (first referenced in rpc_svc.o) (code)
x_test_1 (first referenced in rpc_svc.o) (code)
xdr_wrapstring (first referenced in rpc_svc.o) (code)
t_errno (first referenced in rpc_svc.o) (data)
svcerr_systemerr (first referenced in rpc_svc.o) (code)
t_getinfo (first referenced in rpc_svc.o) (code)
svc_reg (first referenced in rpc_svc.o) (code)
t_getstate (first referenced in rpc_svc.o) (code)
svc_run (first referenced in rpc_svc.o) (code)
svc_fdset (first referenced in rpc_svc.o) (data)
svc_tli_create (first referenced in rpc_svc.o) (code)
getnetconfigent (first referenced in rpc_svc.o) (code)
freenetconfigent (first referenced in rpc_svc.o) (code)
svcerr_noproc (first referenced in rpc_svc.o) (code)
xdr_x_string (first referenced in rpc_svc.o) (code)
svc_sendreply (first referenced in rpc_svc.o) (code)
xdr_void (first referenced in rpc_svc.o) (code)
svc_create (first referenced in rpc_svc.o) (code)
$
=================================

But I am much concerned about the warning error "warning 604: Pointers are not assignment-compatible" than about the unsatisfied symbols this time. From your experience, does it mean we can ignore the warning error?

@@ Kwang