# Installing openafs

## bschulz

I have been trying to install AFS on my freshly installed Gentoo box all day today without success.  I am able to download the openafs source tarball and manually build and install but when I attempt to install openafs (any version) from the portage tree the install fails.  I have attached the last few lines of the failure below.  I want to use the ebuilds to install AFS so I can update it and track it using portage...  Please Help!

                        cc -O2 -g -I. -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2 install.c -o pinstall -lresolv ;; \

        esac

make[3]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall'

cd src; cd procmgmt ; make all

make[3]: Entering directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/procmgmt'

cc  -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2   -c -o procmgmt_unix.o procmgmt_unix.c

echo 'char cml_version_number[]="@(#) OpenAFS 1.2.6 built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c

echo 'char* AFSVersion = "openafs 1.2.6"; ' >>AFS_component_version_number.c

cc  -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/include -I/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/config -O2   -c -o AFS_component_version_number.o AFS_component_version_number.c

rm -f libprocmgmt.a

ar crv libprocmgmt.a procmgmt_unix.o AFS_component_version_number.o

a - procmgmt_unix.o

a - AFS_component_version_number.o

ranlib libprocmgmt.a

/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall/pinstall libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a

Bad exit code from /bin/cp: 11

Could not open output temp file ``/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.charcoal.domainname.com'': No such file or directory

make[3]: *** [/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a] Error 1

make[3]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/procmgmt'

make[2]: *** [procmgmt] Error 2

make[2]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6'

make[1]: *** [build] Error 2

make[1]: Leaving directory `/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6'

make: *** [all] Error 2

!!! ERROR: The ebuild did not complete successfully.

!!! Function src_compile, Line 4, Exitcode 2

!!! (no error message)

Thanks,

Brandon Schulz

----------

## BonezTheGoon

You could be having sandbox related problems.  You might want to try emptying your sandbox and then trying again.  I have found that if you CTRL+C out of an ebuild at precisely the wrong moment you can leave trash in your sandbox that will give you icky problems, similar to the errors you posted.

Here is a quote from the other thread:

 *grakker wrote:*   

> OK, found the file since you are still having the sandbox problem. Look in /tmp for a sandbox.pid file. I think that you can remove it, but to be safe, just mv it to sandbox.pid.bac or something like that. Then try to emerge something again. 

 

I highly recommend reading that thread and many others that cover sandbox problems.

Hope I am on the right track and that it actually does you some good!  If I am off in left field, you have my apologies a thousand times over!

Regards,

BonezTheGoon

----------

## bschulz

I do not have any files on my system called sandbox.pid or sandboxpids or anything close to this, looks like the only files I have are the sandbox executable, the *.so, a test script and a sandbox.bashrc.  I tried to export the SANDBOX_DISABLED="1" var and emerge again but with the same problems.  I can tell the problem is when it tries to copy a file but for some reason it is appending my hostname to the end of the filename and cp fails because that file doesn't exist.  I will try to emerge openafs on gentoo box at home this evening to see if it is just this installation or if the ebuild is just screwed up or something.  Has anyone else been able to emerge openafs lately?  The weirdest thing is that I can go into the portage working directory where all of the Makefiles are created and run make and the package builds perfectly, when I do it by emerge it fails almost right away.

Thanks,

Brandon Schulz

----------

## cyberconte

I am also having an identical problem.  I installed gentoo 1.2 yesterday (built with gcc 3.2), and have had the same problems with it failing on a copy, coming up with the error

Could not open output temp file /var/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.lain: No such file or directory

lain is the hostname...

i tried setting hostname blank as well, and instead it looke for libprocmgmt.a.''

----------

## pilla

I'd guess it is something wrong with the ebuild or the Makefile...

```

 /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/src/pinstall/pinstall libprocmgmt.a /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a

Bad exit code from /bin/cp: 11

Could not open output temp file

``/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.charcoal.domainname.com'': No such file or directory 

```

It is generating a file without the hostname and trying to copy with the hostname....

----------

## BonezTheGoon

Sounds like we need someone experiencing this bug to file an official report, but first check to see if one has been filed.  Both of these can be done at bugs.gentoo.org

Regards,

BonezTheGoon

----------

## procrustes

The bug report has been filed.

----------

## zoran

 *Bloody Bastard wrote:*   

> I'd guess it is something wrong with the ebuild or the Makefile...

 

I guess not. In my opinion it is a portage bug, because ..

 *Quote:*   

> Bad exit code from /bin/cp: 11
> 
> Could not open output temp file

 

.. if I read it correctly its the name of the TEMPorary output file with the hostname as a tail.

[quote]``/var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/lib/libprocmgmt.a.charcoal.domainname.com'': No such file or directory 

[/code]

The makefile isn't wrong because of two reasons. First the build process continues if you issue a "make" after this error in the /var/tmp/portage/openafs-1.2.6/work/openafs-1.2.6/ directory. 

The second reason and also a temporary fix if you really want to install openafs: export FEATURES="-sandbox" and the error is gone.

----------

## xj220

I'm also having problems with the OpenAFS Client..

I'm not exactly sure how my error msg looks like, but i recordnice your error msg : 

 *Quote:*   

> 
> 
> !!! ERROR: The ebuild did not complete successfully. 
> 
> !!! Function src_compile, Line 4, Exitcode 2 
> ...

 

----------

## faithfull

I've also tried to emerge OpenAFS but after some time I get this error:

```
make[3]: Entering directory `/var/tmp/portage/openafs-1.2.6-r1/work/openafs-1.2.6/src/pam'

cc  -I/var/tmp/portage/openafs-1.2.6-r1/work/openafs-1.2.6/src/config -I/var/tmp/portage/openafs-1.2.6-r1/work/openafs-1.2.6/include -I/usr/include -I/usr/include/sys -O2 -Dlinux -DLINUX_PAM -fPIC   -c -o test_pam.o test_pam.c

In file included from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from /usr/include/sys/unistd.h:1,

                 from test_pam.c:19:

/usr/include/sys/unistd.h:1:10: #include nested too deeply

test_pam.c:26: warning: initialization from incompatible pointer type

test_pam.c: In function `main':

test_pam.c:100: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type

test_pam.c:101: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type

test_pam.c:42: warning: return type of `main' is not `int'

test_pam.c: In function `my_conv':

test_pam.c:131: warning: passing arg 1 of `strlen' makes pointer from integer without a cast

test_pam.c:131: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast

test_pam.c:131: warning: passing arg 1 of `__strdup' makes pointer from integer without a cast

make[3]: *** [test_pam.o] Error 1

make[3]: Leaving directory `/var/tmp/portage/openafs-1.2.6-r1/work/openafs-1.2.6/src/pam'

make[2]: *** [login] Error 2

make[2]: Leaving directory `/var/tmp/portage/openafs-1.2.6-r1/work/openafs-1.2.6'

make[1]: *** [build] Error 2

make[1]: Leaving directory `/var/tmp/portage/openafs-1.2.6-r1/work/openafs-1.2.6'

make: *** [all] Error 2

!!! ERROR: net-fs/openafs-1.2.6-r1 failed.

!!! Function src_compile, Line 44, Exitcode 2

!!! (no error message)

```

 (Sorry for the long list)

 :Shocked:  It's a ebuild or a library problem?

----------

## mihochan

What compiler is everyone using? I have tried and failed with gcc3.2

Tom

----------

## faithfull

 *mihochan wrote:*   

> What compiler is everyone using? I have tried and failed with gcc3.2
> 
> Tom

 

Me too.

----------

## Xor

I'm not a quite sure, but the "include" problem is glibc relatted, go to the file and prefix the name of the file with /usr/include

it might break things  :Smile:  but the error will go away....

I have glibc 2.3.1 and gcc 3.2.1...

----------

## mihochan

Here is the advice I received from the OpenAFS mailing list.

 *Quote:*   

> 
> 
> It's fixed in cvs, but you can fix by editing the Makefile.in/Makefile
> 
> in the pam dir, and remove the -I for /usr/include and /usr/include/sys.
> ...

 

Tom[/quote]

----------

## faithfull

 *mihochan wrote:*   

> Here is the advice I received from the OpenAFS mailing list.
> 
>  *Quote:*   
> 
> It's fixed in cvs, but you can fix by editing the Makefile.in/Makefile
> ...

 

Good hint, it works  :Very Happy:  Now we need to fix the ebuild.

----------

## xj220

I dont really get it where should i change to make it work ?

----------

## tvoel

Hi, below you will find a patch to fix the problem.

Enjoy:

```

*** /openafs/src/pam/Makefile.in        Tue Feb 19 14:23:46 2002

--- /openafs/src/pam/Makefile.in        Tue Apr  1 13:45:57 2003

***************

*** 22,33 ****

    KLIBS = ${TOP_LIBDIR}/libkauth.krb.a ${LIBSA} ${TOP_LIBDIR}/libauth.krb.a \

          ${AFSLIBS} ${PAM_LIBS} @LIB_AFSDB@

   SHOBJS = afs_account.o afs_session.o afs_password.o \

          afs_pam_msg.o afs_message.o AFS_component_version_number.o

     OBJS = $(SHOBJS) test_pam.o

! INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} \

!       -I/usr/include -I/usr/include/sys

  CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}

  all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1

  afs_setcred.o: afs_setcred.c afs_pam_msg.h afs_message.h afs_util.h

--- 22,32 ----

    KLIBS = ${TOP_LIBDIR}/libkauth.krb.a ${LIBSA} ${TOP_LIBDIR}/libauth.krb.a \

          ${AFSLIBS} ${PAM_LIBS} @LIB_AFSDB@

   SHOBJS = afs_account.o afs_session.o afs_password.o \

          afs_pam_msg.o afs_message.o AFS_component_version_number.o

     OBJS = $(SHOBJS) test_pam.o

! INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}

  CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}

  all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1

  afs_setcred.o: afs_setcred.c afs_pam_msg.h afs_message.h afs_util.h

```

Just name it something, put it in the files directory under openafs and add a patch -p<num> <filename> line to the ebuild file at the appropriate spot.

----------

## toddaww

hi, could you tell me more specifically how to apply the patch above

thanks

----------

## Simba

I think the patch code from tvoel is for the older ebuild, 

it didn't work for me. so I changed it a little bit:

save in /usr/portage/net-fs/openafs/files/deepnested.patch :

```

*** openafs/src/pam/Makefile.in Thu Apr  3 10:26:59 2003

--- openafs/src/pam/Makefile.in Thu Apr  3 10:29:18 2003

***************

*** 24,31 ****

   SHOBJS = afs_account.o afs_session.o afs_password.o \

          afs_pam_msg.o afs_message.o AFS_component_version_number.o

     OBJS = $(SHOBJS) test_pam.o

! INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} \

!       -I/usr/include -I/usr/include/sys

  CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}

  

  all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1

--- 24,30 ----

   SHOBJS = afs_account.o afs_session.o afs_password.o \

          afs_pam_msg.o afs_message.o AFS_component_version_number.o

     OBJS = $(SHOBJS) test_pam.o

! INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}

  CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}

  

  all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1

```

and insert a line in /usr/portage/net-fs/openafs/openafs-1.3.2-r1.ebuild

```

epatch ${FILESDIR}/deepnested.patch

```

the original openafs-1.3.2-r1.ebuild :

```

...

src_unpack() {

        unpack ${A}

        cd ${S}/src/config

        cp Makefile.in Makefile.in.old

        sed -i "s|/usr/lib/libncurses.so|-lncurses|g" Makefile.in

        cd ${S}

        epatch ${FILESDIR}/kaserver-patch.diff

}

...

```

after inserting "epatch ${FILESDIR}/deepnested.patch" :

```

...

src_unpack() {

        unpack ${A}

        cd ${S}/src/config

        cp Makefile.in Makefile.in.old

        sed -i "s|/usr/lib/libncurses.so|-lncurses|g" Makefile.in

        cd ${S}

        epatch ${FILESDIR}/deepnested.patch

        epatch ${FILESDIR}/kaserver-patch.diff

}

...

```

and it works fine for me.

cahya

----------

## toddaww

i followed the steps and this is the error i get, followed by the patch.out file

thanks in advance...

#emerge openafs

Calculating dependencies ...done!

>>> emerge (1 of 1) net-fs/openafs-1.3.2-r1 to /

>>> md5  :Wink:  openafs-1.3.2-src.tar.gz

>>> Unpacking source...

>>> Unpacking openafs-1.3.2-src.tar.gz to /var/tmp/portage/openafs-1.3.2-r1/work * Applying deepnested.patch...

 * Failed Patch: deepnested.patch!

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/openafs-1.3.2-r1/temp/deepnested.patch-9077.out

!!! ERROR: net-fs/openafs-1.3.2-r1 failed.

!!! Function epatch, Line 354, Exitcode 0

!!! Failed Patch: deepnested.patch!

cat /var/tmp/portage/openafs-1.3.2-r1/temp/deepnested.patch-9077.out

***** deepnested.patch *****

============================

PATCH COMMAND:  patch  -p0 < /usr/portage/net-fs/openafs/files/deepnested.patch

============================

can't find file to patch at input line 3

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|*** openafs/src/pam/Makefile.in Thu Apr  3 10:26:59 2003

|--- openafs/src/pam/Makefile.in Thu Apr  3 10:29:18 2003

--------------------------

No file to patch.  Skipping patch.

patch unexpectedly ends in middle of line

1 out of 1 hunk ignored

patch unexpectedly ends in middle of line

============================

PATCH COMMAND:  patch  -p1 < /usr/portage/net-fs/openafs/files/deepnested.patch

============================

patching file src/pam/Makefile.in

Hunk #1 FAILED at 24.

patch unexpectedly ends in middle of line

1 out of 1 hunk FAILED -- saving rejects to file src/pam/Makefile.in.rej

patch unexpectedly ends in middle of line

============================

PATCH COMMAND:  patch  -p2 < /usr/portage/net-fs/openafs/files/deepnested.patch

============================

can't find file to patch at input line 3

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|*** openafs/src/pam/Makefile.in Thu Apr  3 10:26:59 2003

|--- openafs/src/pam/Makefile.in Thu Apr  3 10:29:18 2003

--------------------------

No file to patch.  Skipping patch.

patch unexpectedly ends in middle of line

1 out of 1 hunk ignored

patch unexpectedly ends in middle of line

============================

PATCH COMMAND:  patch  -p3 < /usr/portage/net-fs/openafs/files/deepnested.patch

============================

patching file Makefile.in

Hunk #1 FAILED at 24.

patch unexpectedly ends in middle of line

1 out of 1 hunk FAILED -- saving rejects to file Makefile.in.rej

patch unexpectedly ends in middle of line

============================

PATCH COMMAND:  patch  -p4 < /usr/portage/net-fs/openafs/files/deepnested.patch

============================

missing header for context diff at line 3 of patch

can't find file to patch at input line 3

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|*** openafs/src/pam/Makefile.in Thu Apr  3 10:26:59 2003

|--- openafs/src/pam/Makefile.in Thu Apr  3 10:29:18 2003

--------------------------

No file to patch.  Skipping patch.

patch unexpectedly ends in middle of line

1 out of 1 hunk ignored

patch unexpectedly ends in middle of line

----------

## Simba

I think the problem is with "copy and paste" from web browser to your file,

what you copied will be different than the original file. also, try now 

to copy the patch file directly from this address:

http://s2.enemy.org/~cahya/gentoo/openafs/deepnested.patch

cahya

----------

## toddaww

thanks a lot   :Smile: 

----------

## Skreems

Mine still fails out, although it gets farther with the patch than without.

```
Successful part of build

...

Building in directory: MODLOAD-2.4.20-gentoo-r1-MP

make[4]: Entering directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/libafs/MODLOAD-2.4.20-gentoo-r1-MP'

gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -march=i486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE -DAFS_SMP    -I. -I../ -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/config -c ../afs/afs_atomlist.c

gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -march=i486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE -DAFS_SMP    -I. -I../ -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/config -c ../afs/afs_lhash.c

gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -march=i486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE -DAFS_SMP    -I. -I../ -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/config -c ../afs/afs_analyze.c

In file included from ../asm/uaccess.h:8,

                 from ../afs/../afs/sysincludes.h:65,

                 from ../afs/afs_analyze.c:19:

../linux/sched.h:517: parse error

../linux/sched.h:520: warning: `set_cpus_allowed' redefined

../linux/modules/ksyms.ver:686: warning: this is the location of the previous definition

In file included from ../afs/../afs/../rx/../rx/rx_packet.h:45,

                 from ../afs/../afs/../rx/rx.h:38,

                 from ../afs/../afs/afsincludes.h:29,

                 from ../afs/afs_analyze.c:35:

/usr/include/sys/sysmacros.h:28: warning: `major' redefined

../linux/kdev_t.h:80: warning: this is the location of the previous definition

/usr/include/sys/sysmacros.h:29: warning: `minor' redefined

../linux/kdev_t.h:81: warning: this is the location of the previous definition

make[4]: *** [afs_analyze.o] Error 1

make[4]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/libafs/MODLOAD-2.4.20-gentoo-r1-MP'

make[3]: *** [linux_compdirs] Error 2

make[3]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/libafs'

make[2]: *** [libafs] Error 2

make[2]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make[1]: *** [build] Error 2

make[1]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make: *** [all] Error 2

!!! ERROR: net-fs/openafs-1.3.2-r1 failed.

!!! Function src_compile, Line 46, Exitcode 2

!!! (no error message)
```

----------

## steveb

i am getting the same error as faitfull, but the patch fixed that problem for net-fs/openafs-1.3.2-r1!

did any1 submitted a bug to bugs.gentoo.org?

cheers

SteveB

----------

## jabby

I am currently getting a different error than any I've seen on this thread, but I *was* getting the unistd.h ad infinitum error previously.  Now, what I'm getting is

```
cc -I. -I.  -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/config -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/include  -O2 -D_LARGEFILE64_SOURCE -o rmtsysd rmtsysd.o libsys.a /var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/lib/librx.a libsys.a /var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/lib/liblwp.a /var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/lib/util.a -lresolv

libsys.a(rmtsyss.o)(.text+0x14e): In function `SRMTSYS_SetPag':

: undefined reference to `errno'

libsys.a(rmtsyss.o)(.text+0x293): In function `SRMTSYS_Pioctl':

: undefined reference to `errno'

collect2: ld returned 1 exit status

make[3]: *** [rmtsysd] Error 1

make[3]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/sys'

make[2]: *** [sys] Error 2

make[2]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make[1]: *** [build] Error 2

make[1]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make: *** [all] Error 2

!!! ERROR: net-fs/openafs-1.3.2-r1 failed.

!!! Function src_compile, Line 46, Exitcode 2

!!! (no error message)

```

I've tried patching src/pam/Makefile.in as indicated with no noticeable effect.

The only reason I'm installing openafs is because an upgrade to findutils depends on it for some reason.  I would think that anyone else with findutils would be running into this problem and a new ebuild would be released, but I've been waiting for weeks!

Any ideas?

Thanks,

Jason

----------

## b_Q

Hi jabby

 *Quote:*   

> 
> 
> The only reason I'm installing openafs is because an upgrade to findutils depends on it for some reason. I would think that anyone else with findutils would be running into this problem and a new ebuild would be released, but I've been waiting for weeks! 
> 
> 

 

(openafs-1.3.2-r1 compiled ok here on 1.2 and 1.4 gentoo's)

If afs is in use flags, findutils ebuild

define's a dependency for openafs package

i.e. afs? ( net-fs/openafs )

http://www.gentoo.org/doc/en/gentoo-howto.xml

Solution: "remove" afs from use flags

i.e

add -afs in make.conf or something and dump openafs dependency.

Easy look/edit use flags

emerge app-admin/ufed

Description: Gentoo Linux USE flags editor

HIH

----------

## panserg

If openafs is broken so hard and the brokeness is so stable, why isn't it masked yet? The bug report is in bugzilla, thread are discussing mostly unsuccessful attempts to fix it. What else should be done that Portage developers will notice and mask it? Sometime I really don't understand what and how is driving the masking process in Gentoo.

----------

## Beetle B.

I'm reinstalling Gentoo, and I got the same error, I applied the deepnested.patch. Then I got the second error similar to/same as Skreems. 

Right now I'm disabling the afs flag in USE to bypass OpenAFS, but I hope someone can figure this one out, as it seems not everyone is having problems with it.

My system:

P4 2.53 GHz.

gcc 3.2.2

----------

## spbecker

 *jabby wrote:*   

> I am currently getting a different error than any I've seen on this thread, but I *was* getting the unistd.h ad infinitum error previously.  Now, what I'm getting is
> 
> ```
> cc -I. -I.  -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/config -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/include  -O2 -D_LARGEFILE64_SOURCE -o rmtsysd rmtsysd.o libsys.a /var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/lib/librx.a libsys.a /var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/lib/liblwp.a /var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/lib/util.a -lresolv
> 
> ...

 

I get the exact same error.  Does anyone know why it happens or how to fix it?

----------

## dlove

 *Skreems wrote:*   

> Mine still fails out, although it gets farther with the patch than without.
> 
> ```
> Successful part of build
> 
> ...

 

I hit that one too.  A file -- /usr/src/linux/include/linux/sched.h -- in at least one of the later gentoo kernels  has an incorrect line '#if CONFIG_SMP'.  That needs to be changed to '#ifdef CONFIG_SMP' in order for for openafs to compile.   I also had to turn on MODVERSIONS in the kernel, but that may have been part of a different afs compile problem.  Even with that, I still could not get the AFS servers to work without locking up until I dropped back to a vanilla kernel.  Hopefully YMMV.

----------

## dlove

 *spbecker wrote:*   

>  *jabby wrote:*   
> 
> The only reason I'm installing openafs is because an upgrade to findutils depends on it for some reason.  I would think that anyone else with findutils would be running into this problem and a new ebuild would be released, but I've been waiting for weeks!
> 
> Any ideas?
> ...

 

If you're still looking for a solution to this *and* if you don't mind dropping back to openafs-1.2.8, let me know.  I have an ebuild here which patches the errno, unistd.h and pinstall problems and allows 1.2.8 to install cleanly.  That'll at least get you by the findutils issue.

 - Dave

----------

## spbecker

 *dlove wrote:*   

>  *spbecker wrote:*    *jabby wrote:*   
> 
> The only reason I'm installing openafs is because an upgrade to findutils depends on it for some reason.  I would think that anyone else with findutils would be running into this problem and a new ebuild would be released, but I've been waiting for weeks!
> 
> Any ideas?
> ...

 

Actually I don't want it because of findutils...I'm just interested in learning how afs works by deploying it on my LAN and working with it.  :Smile:   I'd be interested in that patch for 1.2.8 if it will at least let me install.

----------

## rwallace

I guess I would have to agree with a previous poster.  Why isn't the openafs-1.3.2 ebuild masked?

The most recent stable version listed at openafs.org is 1.2.9.  1.3 is a development branch, so why would it be the version installed by an emerge with default settings?

If we wanted to be consistent wouldn't we also make samba-3.0_alpha the default samba version that's installed?  It's been in alpha for a long time and many are using it in production environments without problems.  Even Jeremy  Allison has said that if he were in charge of release management he would have released 3.0 a long time ago (rummaging for the interview link... dang it, can't find it.  Might've been in LinuxJournal or something).

Anyways, it's just my 2 cents that the openafs version installed should be, at most, 1.2.9, escpecially with the problems with the build for 1.3.2.

----------

## Xor

well, it's a little bit a same that a piece of software release in April is not able to compile.... but maybe we are using to modern libs/kernels - which the dev team is not using - and is to small to test+fix on current systems... I guess they try to bring openafs to a lot of plattforms... and a system with linux 2.4.21 / glibc 2.3.2 is one that is supported.... that happens....

but if someone has the patches at hand, he might commit them to the dev-team....

going back to my (dark) corner  :Smile: 

----------

## spbecker

 *Xor wrote:*   

> well, it's a little bit a same that a piece of software release in April is not able to compile.... but maybe we are using to modern libs/kernels - which the dev team is not using - and is to small to test+fix on current systems... I guess they try to bring openafs to a lot of plattforms... and a system with linux 2.4.21 / glibc 2.3.2 is one that is supported.... that happens....
> 
> but if someone has the patches at hand, he might commit them to the dev-team....
> 
> going back to my (dark) corner 

 

It seems to me that the problem actually lies in both the ebuild and the makefile for openafs, not the system kernel/libs.  Someone correct me if I'm wrong on that.

----------

## Negated Void

I'm trying to compile 1.3.2-r1, and i still get the original error with /bin/cp. I downloaded/applied the patch, and when i run emerge it says "Applying patch.. ok' or whatever.

Any other ideas?

----------

## dlove

 *spbecker wrote:*   

> Actually I don't want it because of findutils...I'm just interested in learning how afs works by deploying it on my LAN and working with it.   I'd be interested in that patch for 1.2.8 if it will at least let me install.

 

You can find the new ebuild and patch (openafs-1.2.8-r1) in bug #21832 (https://bugs.gentoo.org/show_bug.cgi?id=21832).  If you need help installing and/or using the new ebuild, let me know.

----------

## MaD-DaRiUs

not working with the 2.5 kernels?

```
gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -march=i486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE -DAFS_SMP    -I. -I../ -I/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/config -c ../afs/afs_analyze.c

cc1: warning: -malign-loops is obsolete, use -falign-loops

cc1: warning: -malign-jumps is obsolete, use -falign-jumps

cc1: warning: -malign-functions is obsolete, use -falign-functions

In file included from ../linux/prefetch.h:13,

                 from ../linux/list.h:7,

                 from ../linux/wait.h:14,

                 from ../afs/sysincludes.h:51,

                 from ../afs/afs_analyze.c:19:

../asm/processor.h:86: `CONFIG_NR_CPUS' undeclared here (not in a function)

In file included from ../linux/gfp.h:4,

                 from ../linux/slab.h:14,

                 from ../linux/percpu.h:4,

                 from ../linux/rcupdate.h:42,

                 from ../linux/dcache.h:10,

                 from ../afs/sysincludes.h:67,

                 from ../afs/afs_analyze.c:19:

../linux/mmzone.h:127: `CONFIG_NR_CPUS' undeclared here (not in a function)

../linux/mmzone.h:221: confused by earlier errors, bailing out

make[4]: *** [afs_analyze.o] Error 1

make[4]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/libafs/MODLOAD-2.5.69-mm8-MP'

make[3]: *** [linux_compdirs] Error 2

make[3]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/libafs'

make[2]: *** [libafs] Error 2

make[2]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make[1]: *** [build] Error 2

make[1]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make: *** [all] Error 2

!!! ERROR: net-fs/openafs-1.3.2-r1 failed.

!!! Function src_compile, Line 53, Exitcode 2

!!! (no error message)

```

```
# uname -r

2.5.69-mm8
```

after a little while of messing around in the sources for it i found that it only has Makefiles for 2.2 and 2.4

and so far my limited knowledge in this area hasn't been able to do anything about it,

i get the above error in all versions of OpenAFS+patches(i do get the errors like everyone else)

and they don't say ANYWHERE in the documentation that it only runs on those kernels.

am i wrong? please prove me so.

now for the mailing list....

:UPDATE:

I got a friend of mine to compile a binary of openafs for me,

and I found a nifty kernel module already in the 2.5 kernel's "CONFIG_AFS_FS" in a obviouse place, unfortunately it doesn't load   :Evil or Very Mad: 

```
# modprobe kafs

FATAL: Error inserting kafs (/lib/modules/2.5.69-mm8/kernel/fs/afs/kafs.ko): Invalid argument

# dmesg |tail

kAFS: Red Hat AFS client v0.1 registering.

kAFS: no root cell specified

kAFS: failed to register: -22

```

i got as far as creating the FS in in the openafs howto and the openafs quickstart

```
# /usr/afs/bin/fs setacl /afs system:anyuser rl

fs:'/afs': Function not implemented
```

from my guess and from what i have read on the forums and such is that i can't do this step or the next ones without the module loaded   :Evil or Very Mad: 

hmm maybe if it's compiled in....

----------------------------------------------------------------------------------------------------------------------------------------------                  [img:dad8f2720d]http://images.deviantart.com/large/icon/emoticons/Matrix_emoticon_II.gif[/img:dad8f2720d]

----------

## sterni

 *dlove wrote:*   

> [
> 
> You can find the new ebuild and patch (openafs-1.2.8-r1) in bug #21832 (https://bugs.gentoo.org/show_bug.cgi?id=21832).  If you need help installing and/or using the new ebuild, let me know.

 

This would be very nice. IOf course I rtfm but I couldn't find it   :Embarassed: 

So my site is heavily using afs, but what is your opinion should 1.2.8 a "better"

way?

thanks for all your help

----------

## dlove

 *sterni wrote:*   

> 
> 
> This would be very nice. IOf course I rtfm but I couldn't find it  
> 
> 

 

Here's a quick(?) breakdown to get things working:

1) If you don't have a portage overlay directory (or don't know what one is), do this:

```

mkdir -p /usr/local/portage/net-fs/openafs/files

echo 'PORTDIR_OVERLAY=/usr/local/portage' >>/etc/make.conf

```

2) Now copy the new ebuild file to /usr/local/portage/net-fs/openafs and the new patches to /usr/local/portage/net-fs/openafs/files.

3) The ebuild requires some of the existing patches, so for simplicity, just copy over the contents of the original files directory:

```

 cp /usr/portage/net-fs/openafs/files/*  /usr/local/portage/net-fs/openafs/files

```

4)  Almost forgot this one.  You'll need to create a digest for the new ebuild:

```

   cd /usr/local/portage/net-fs/openafs

   ebuild openafs-1.2.8-r1.ebuild digest

```

5) Make sure portage won't automatically try and upgrade you to a 3.1 release during the next emerge -u world:

```

echo '>net-fs/openafs-1.2.8-r1' >> /usr/portage/profiles/package.mask

```

You'll need to do this after every 'emerge sync'.  I use a script to do both automatically so I don't forget. 

6) emerge -p openafs

This *should* show that emerge will install the 1.2.8-r1 ebuild.  If not, let me know because it means I've forgotten something.

7) emerge openafs

That should be it.

I'm not certain I understood your last question, but here's a mish-mash of what I was trying to do and the problems I've run into:

* My goal here was to test openafs and try and integrate it with an existing krb5 system.  Since I would eventually like to roll this out into production, I wasn't interested in using a beta release (>1.2.9).  

* I tried running 1.2.9, but couldn't get it working with krb5.  Dropping back to 1.2.8 solved that issue.

* 1.2.8 won't work with any kernel > 2.4.19 (according to the openafs folks), but even then, my openafs servers would randomly lockup when using the 2.4.19-gentoo kernel.  Dropping back to the 2.4.19 vanilla kernel fixed the lockups.

* I had to patch qmail to get it to deliver to maildirs on afs (since hard-links across directories aren't allowed in afs).   It took some messing around, but I was finally able to get both qmail and courier-imap working correctly with afs-mounted maildirs.

* If and when I get everything working correctly with 1.2.8, I'll start trying newer versions of openafs, but that'll be awhile.

Finally, if you need an openafs-1.2.9.ebuild, I can probably cobble one together this week (I'll probably do that anyways).  Seems silly for gentoo to not have the latest release openafs code available.

----------

## rich0

Other ways to avoid automatic updates every time you rsync would be to create your own copies of the newer ebuilds and mask them with the ~x86 keyword.  You probably could pin the current version in your world file as well (add an = to the start of the openafs line and append a -verno to the end).  Doing the same thing with a >= is a good way to avoid auto-downgrades when you do a one time ACCEPT=~x86 for a single file.

I find it interesting that after so much time the ebuild in portage still doesn't work but is masked - I just tried installing openafs to tinker with it myself (I have a ton of files on a windoze box and copying them back and forth doesn't make much sense - the caching abilities of afs seem to make sense to me if they are practical enough to use).

----------

## csnyder

 *Quote:*   

> not working with the 2.5 kernels?

 

OpenAFS does not currently support the 2.5 kernels because of some difficult to fix problems that were caused by changes to the kernel. There was a big thread on the OpenAFS mailing list about various ways of fixing the problem (which, if I understand correctly, is caused by them not having a place to store tokens in the kernel anymore). Some people even said that they shouldn't support the new version.

----------

## MaD-DaRiUs

 *Quote:*   

> OpenAFS does not currently support the 2.5 kernels because of some difficult to fix problems that were caused by changes to the kernel. 

 

huh well makes sense, it would be nice if they told you this somewhere,

 *Quote:*   

> There was a big thread on the OpenAFS mailing list about various ways of fixing the problem

 

none searchable mailing list archives are evil   :Evil or Very Mad: 

 *Quote:*   

> Some people even said that they shouldn't support the new version.

 

thats like saying we should stick with the horse and wagon,   :Wink: 

anyway OpenAFS has been dropped from my list of stuff to use to make a reasonable link between me and my friends, along with CODA, next up OpenVPN

----------

## Redemption

Anyone know if there has been an update with this problem?

I did an emerge of net-fs/openafs (it giving me the lovely 1.3.2-r1) and I got an error similar to what others did.

```
Error 1

make[3]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2/src/procmgmt'

make[2]: *** [procmgmt] Error 2

make[2]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make[1]: *** [build] Error 2

make[1]: Leaving directory `/var/tmp/portage/openafs-1.3.2-r1/work/openafs-1.3.2'

make: *** [all] Error 2

!!! ERROR: net-fs/openafs-1.3.2-r1 failed.

!!! Function src_compile, Line 45, Exitcode 2

!!! (no error message)
```

If anyone has any suggestions or knowledge of the stauts of this problem, I'd very much appreciated it.

----------

## tjansse2

I've installed Openafs-1.2.8 on an AthlonXP and am installing it on a Celeron right now.

You need to specify the ebuild file:

e.g.

emerge /usr/portage/net-fs/openafs/openafs-1.2.8.ebuild

And it compiled on my AthlonXP and is compiling on my Celeron

Haven't set it up yet though  :Smile: 

B.T.W. I'm using O2, haven't tried it with O3.

Tim

----------

## sjenkins

OpenAFS 1.2.10 is available but masked. Try this:

```
ACCEPT_KEYWORDS="~x86" emerge openafs
```

----------

## axxackall

I've tried to compile openafs-1.2.10 on PPC and it's failed with 

```

make[4]: Entering directory `/var/tmp/portage/openafs-1.2.10/work/openafs-1.2.10/src/libafs/MODLOAD-2.4.20-ppc-r3-SP'

gcc   -O2 -fomit-frame-pointer -fno-strength-reduce -fno-strict-aliasing -fno-common -pipe -march=pentium -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE   -I. -I../ -I/var/tmp/portage/openafs-1.2.10/work/openafs-1.2.10/src/config -c ../afs/afs_atomlist.c;

cc1: invalid option `arch=pentium'

make[4]: *** [afs_atomlist.o] Error 1

make[4]: Leaving directory `/var/tmp/portage/openafs-1.2.10/work/openafs-1.2.10/src/libafs/MODLOAD-2.4.20-ppc-r3-SP'

```

What? they hardcoded -march=pentium to the Makefile? Insane, isn't it?

Well, as for x86, it doesn't go any better:

```

checking if kernel uses MODVERSIONS... yes

checking which kernel modules to build... SP

checking for exported init_mm... no

checking for exported kallsyms_address_to_symbol... no

checking for exported kallsyms_symbol_to_address... no

checking for exported sys_call_table... no

checking for exported ia32_sys_call_table... no

checking for exported sys_chdir... no

checking for exported sys_close... no

checking for exported sys_wait4... no

configure: error: no available sys_call_table access method

!!! ERROR: net-fs/openafs-1.2.10 failed.

!!! Function econf, Line 320, Exitcode 1

!!! econf failed

```

----------

## sjenkins

 *axxackall wrote:*   

> What? they hardcoded -march=pentium to the Makefile? Insane, isn't it?
> 
> 

 

No, -march=pentium is not hardcoded into the Makefile. If it's there, it's because configure made a mistake, or was told wrong.

 *Quote:*   

> 
> 
> Well, as for x86, it doesn't go any better:
> 
> ```
> ...

 

Which kernel? 1.2.10 works flawlessly for me with 2.4.20-gentoo-r5 on x86.

Note that OpenAFS requires kernel support that is present in 2.4 but not (yet) in 2.5 or 2.6.

----------

## axxackall

 *sjenkins wrote:*   

>  *axxackall wrote:*   What? they hardcoded -march=pentium to the Makefile? Insane, isn't it?
> 
>  
> 
> No, -march=pentium is not hardcoded into the Makefile. If it's there, it's because configure made a mistake, or was told wrong.
> ...

 

PPC: i386_linux24 was actually hardcoded in two (!!) places right in the build. After "re-hardcoding" it to ppc_linux24 it has been compiled fine.

i386: I have several boxes with linux-2.4.20-r2 and one with 2.4.19-r10. All compile openafs-1.2.10 fine except one of linux-2.4.20-r2 (the one I do actually need openafs along with the other one ppc). So, I guess the version of the kernel is not the reason...

i386 update Just found the reason on that i386: /usr/src/linux was linked to not currently used kernel revision (it was linked to the not-used-yet one). Relinking to the currently used kernel source  (/usr/src/linux-2.4.20-r2 in my case) - and the problem is solved!

----------

## sjenkins

The strings "i386_linux24" and "pentium" do not appear anywhere in the distribution from openafs.org except in prototype files and macros used by configure. All makefiles are built on the fly by configure.

There appears to be a bug in src/cf/linux-test5.m4, the result of which is that configure believes that a machine supports -march=pentium when it doesn't. Try applying this patch:

```
*** linux-test5.m4.orig Wed Aug 13 23:51:00 2003

--- linux-test5.m4      Wed Aug 13 23:52:26 2003

***************

*** 2,8 ****

  AC_DEFUN(OPENAFS_GCC_SUPPORTS_MARCH, [

  AC_MSG_CHECKING(if $CC accepts -march=pentium)

  save_CFLAGS="$CFLAGS"

! CFLAGS="-MARCH=pentium"

  AC_CACHE_VAL(openafs_gcc_supports_march,[

  AC_TRY_COMPILE(

  [],

--- 2,8 ----

  AC_DEFUN(OPENAFS_GCC_SUPPORTS_MARCH, [

  AC_MSG_CHECKING(if $CC accepts -march=pentium)

  save_CFLAGS="$CFLAGS"

! CFLAGS="-march=pentium"

  AC_CACHE_VAL(openafs_gcc_supports_march,[

  AC_TRY_COMPILE(

  [],

```

Run regen.sh to rebuild configure, and then run configure.

----------

## sjenkins

OK, I see now. It's hardcoded in the ebuild, not in the OpenAFS distribution.

The bug in my previous post is a real bug, but it won't cause the problem you're seeing, obviously.

I'll take a look at it.

----------

## sjenkins

Try the patch attached to https://bugs.gentoo.org/show_bug.cgi?id=10952. (I can test only on x86.)

----------

## bkmmd

 *sjenkins wrote:*   

> Try the patch attached to https://bugs.gentoo.org/show_bug.cgi?id=10952. (I can test only on x86.)

 

So how do I go about installing this patch, and getting openafs up and running?

Thanks,

-- Brian

----------

