There are two versions of RPCGEN on various linuxes.  Read the makefile
carefully to make sure you compile for the right one (if you get it
wrong, do a "make clean" before switching to the other).

-matt (3/96)

Here's some background:


From owner-cfs-users  Wed Mar  8 18:22:15 1995
Received: by merckx.info.att.com (4.1/4.7)
        id AA15369; Wed, 8 Mar 95 18:22:15 EST
Posted-Date: Wed, 08 Mar 1995 15:17:01 -0800
Message-Id: <199503082317.PAA02390@gwarn.versant.com>
To: root <root@esprit.topaz.com>
From: strick@techwood.org
Reply-To: strick@techwood.org
Cc: cfs-users@research.att.com
Subject: Re: linux problems 
In-Reply-To: Your message of "Wed, 08 Mar 1995 02:51:09 EST."
             <199503080751.CAA23174@esprit.topaz.com> 
Date: Wed, 08 Mar 1995 15:17:01 -0800

THUS SPAKE owner-cfs-users@research.att.com:
#       I'm still having problems getting CFS to compile under the newest
# version of slackware.  I was told that it worked on previous versions of

What I had to do in slackware 2.1.0 (Linux 1.1.59) is delete the _svc suffices 
on the global names in the .c files that are generated from the .x files.
(I'm not enough of a SUNRPC GOD to know why.)

Then it would link okay.  (Was linking your problem?)

Oh, and you need -Dd_fileno=d_ino  ... see below

                                        strick

p.s.   ESM is fantastic, too.



        make CC="cc -traditional -Dd_fileno=d_ino  \
        -Dnfsproc_null_2_svc=nfsproc_null_2     \
        -Dnfsproc_getattr_2_svc=nfsproc_getattr_2       \
        -Dnfsproc_setattr_2_svc=nfsproc_setattr_2       \
        -Dnfsproc_root_2_svc=nfsproc_root_2     \
        -Dnfsproc_lookup_2_svc=nfsproc_lookup_2 \
        -Dnfsproc_readlink_2_svc=nfsproc_readlink_2     \
        -Dnfsproc_read_2_svc=nfsproc_read_2     \
        -Dnfsproc_writecache_2_svc=nfsproc_writecache_2 \
        -Dnfsproc_write_2_svc=nfsproc_write_2   \
        -Dnfsproc_create_2_svc=nfsproc_create_2 \
        -Dnfsproc_remove_2_svc=nfsproc_remove_2 \
        -Dnfsproc_rename_2_svc=nfsproc_rename_2 \
        -Dnfsproc_link_2_svc=nfsproc_link_2     \
        -Dnfsproc_symlink_2_svc=nfsproc_symlink_2       \
        -Dnfsproc_mkdir_2_svc=nfsproc_mkdir_2   \
        -Dnfsproc_rmdir_2_svc=nfsproc_rmdir_2   \
        -Dnfsproc_readdir_2_svc=nfsproc_readdir_2       \
        -Dnfsproc_statfs_2_svc=nfsproc_statfs_2 \
        -Dadmproc_null_1_svc=admproc_null_1     \
        -Dadmproc_attach_1_svc=admproc_attach_1 \
        -Dadmproc_detach_1_svc=admproc_detach_1 \
        -Dadmproc_ls_1_svc=admproc_ls_1 \
                "
From:     Monty Walls <mwalls@castor.oktax.state.ok.us>
To:       Matt Blaze <mab@research.att.com>
Date:     Fri, 16 Feb 1996 14:34:50 -0600 (CST)
Subject:  Re: Linux Compatibility & rpcgen
In-Reply-To: <199602151603.LAA14987@nsa.tempo.att.com>
References: <199602151603.LAA14987@nsa.tempo.att.com>


Here are the cflags I used for Slackware 2.3:
 
RPCGEN=rpcgen -k -b
CFLAGS=$(COPT) -U__OPTIMIZE__ -traditional -Dd_fileno=d_ino -I$(RINCLUDES)

why:

-U__OPTIMIZE__ - turns off inline code (turned on by -O) for some
functions which will give syntax errors when using -traditional (GCC
again).

-traditional    - required because rpcgen.new generates prototypes even in
k&r mode (tests for __STDC__, which is true with GCC).

I done some preliminary testing and it appears to work ok.  Rpcinfo does
complain about how cfs is registered:

castor# /usr/sbin/rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp    849  mountd
    100005    1   tcp    851  mountd
clnttcp_create: RPC: Program not registered
clnttcp_create: RPC: Program not registered
1092830567    2   udp   3049

-Monty Walls (mwalls@castor.oktax.state.ok.us)
-       MIS(Technical Supt), Oklahoma Tax Commission
-
- My opinions are my own, my employer knows nothing about it.

