Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209194 - net-fs/openafs-1.5.30 on Sparc64
Summary: net-fs/openafs-1.5.30 on Sparc64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: Sparc64 Linux
: High enhancement (vote)
Assignee: Sparc Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 00:40 UTC by Phil
Modified: 2011-09-18 21:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil 2008-02-07 00:40:50 UTC
Hi!
As your OpenAFS-ebuilds do not work for sparc64 because of the 32/64-bit curiosity, I invested some time into building it myself - successfully.
This is how it can be done:

Preparations:
1. unpack openafs-1.5.30-src.tar.bz2
2. patch extracted sources with 007_all_sparc.patch from
   openafs-gentoo-0.14.tar.bz2
3. replace all occurrences of 'linux/ioctl32.h' with 'linux/ioctl.h'
   in the files of the subdirectory src/afs/LINUX

Building the applications:
1. cd openafs-1.5.30
2. ./configure --with-afs-sysname=sparc_linux24 --disable-kernel-module
3. make all_nolibafs
4. make install

Then, to build the kernel module:
1. make distclean
2. ./configure --with-afs-sysname=sparc64_linux26
3. make only_libafs
4. the module is at the subdir src/libafs/MODLOAD-$(uname -r)-SP/libafs.ko

I did not test if this works for openafs-1.5.27 also, but it is likely. For openafs-1.4.6 this does not work.
Comment 1 Phil 2008-02-07 00:44:19 UTC
Forgot this one: I am using gentoo-sources-2.6.23-r3.
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2008-02-21 13:43:26 UTC
This is a mess...adding stefaan, what can we do about this?
Comment 3 Stefaan De Roeck (RETIRED) gentoo-dev 2008-02-25 12:43:15 UTC
Indeed, messy :)

Firstly, I don't really know sparc, and I don't even understand what "32/64-bit curiosity" should mean.  How different is it from amd64 / multilib / ...?
Secondly, I'd like some more explanations on the why of each step.  

Preparation:
1. Why 1.5.30? What are the errors you get for 1.4.6?
2. I assume applying all gentoo patches would work as well here...
3. This is the BIG QUESTION

Building:
2. Why sparc_linux24? as opposed to sparc64_linux26 below?  If you wouldn't supply any sysname, what does it auto-detect?

Build module:
2. same as above

Elaborate but clear explanations are appreciated
Comment 4 Phil 2008-02-25 16:02:06 UTC
(In reply to comment #3)
> Indeed, messy :)

Right, the sparc64-port is indeed a bit messy.

> Firstly, I don't really know sparc, and I don't even understand what "32/64-bit
> curiosity" should mean.  How different is it from amd64 / multilib / ...?

And this is why: for reasons of performance Gentoo-sparc64 uses 32Bit userspace and 64Bit kernel. Also there is no multilib support. If you really want to know why this is like that and why there is no true 64Bit port (which could also prevent bug-reports like this one) you should maybe ask a Gentoo developer rather than a Gentoo user.

For building OpenAFS, I found this email:
http://www.openafs.org/pipermail/openafs-info/2006-March/021750.html
and simply tried to reproduce it.

> 1. Why 1.5.30? What are the errors you get for 1.4.6?

1. because I couldn't get 1.4.6 to build. What I have from my notes is:
  - ./configure --with-afs-sysname=sparc_linux24 --disable-kernel-module
  - make all_nolibafs
  -> leads to:
make[3]: Entering directory `/root/openafs-kernel/openafs-1.4.6/src/libafsrpc'
cc  -O -I/root/openafs-kernel/openafs-1.4.6/src/config -I. -I. -I/root/openafs-kernel/openafs-1.4.6/include -I/root/openafs-kernel/openafs-1.4.6/include/afs -I/root/openafs-kernel/openafs-1.4.6/include/rx -I/root/openafs-kernel/openafs-1.4.6 -I/root/openafs-kernel/openafs-1.4.6/src -I/root/openafs-kernel/openafs-1.4.6/src -I./../des -I../des -I../rxkad -I./../rxkad -I../fsint -DRXDEBUG  -DUSE_PTHREADS -c  ./../rx/rx_event.c
In file included from ./../rx/rx_user.h:19,
                 from ./../rx/rx_event.c:57:
                 /root/openafs-kernel/openafs-1.4.6/include/lwp.h:119: error: expected specifier-qualifier-list before 'pthread_startroutine_t'
                 In file included from ./../rx/rx_user.h:19,
                                  from ./../rx/rx_event.c:57:
                                  /root/openafs-kernel/openafs-1.4.6/include/lwp.h:346:27: error: macro "IOMGR_Poll" passed 1 arguments, but takes just 0
                                  make[3]: *** [rx_event.o] Error 1
                                  make[3]: Leaving directory `/root/openafs-kernel/openafs-1.4.6/src/libafsrpc'
                                  make[2]: *** [libafsrpc] Error 2
                                  make[2]: Leaving directory `/root/openafs-kernel/openafs-1.4.6'
                                  make[1]: *** [build] Error 2
                                  make[1]: Leaving directory `/root/openafs-kernel/openafs-1.4.6'
                                  make: *** [all_nolibafs] Error 2

so as you see it fails when trying to build the userspace applications. I'm sure you have some tester who is willing to create a complete log.

2. 1.5.30 is greater than 1.4.6. I like up-to-date software.

> 2. I assume applying all gentoo patches would work as well here...

Does this matter at all for this report? You could also ask me where I've installed the binaries. The only reason why I've mentioned the certain patch from openafs-gentoo-0.14.tar.bz2 was so that I don't have to paste it here.

> 3. This is the BIG QUESTION

What is the big question? Maybe forgot asking it??

> Building:
> 2. Why sparc_linux24? as opposed to sparc64_linux26 below?  If you wouldn't
> supply any sysname, what does it auto-detect?

Hey, you're maintaining OpenAFS, right? Then you already should know. If not, maybe have a look at the src/config subdir. Do you see a file called param.sparc_linux26.h? Me neither. You're assuming right, this is a hack. But as the OpenAFS list also states, alternatively preparing OpenAFS to build for sparc_linux26 could be a better solution.

> Build module:
> 2. same as above

For me, too.

> Elaborate but clear explanations are appreciated

Tell me if you need to know something else.
Comment 5 Raúl Porcel (RETIRED) gentoo-dev 2009-08-27 17:17:28 UTC
Stefaan?
Comment 6 Stefaan De Roeck (RETIRED) gentoo-dev 2009-10-24 21:52:26 UTC
There are a lot of bugs open because ppc and ppc64 support is lacking. They stay open for a very simple reason: even if I had a patch, I could not even test it. Same goes for sparc. The best I can do for you is ask you to write a working ebuild. Then a gentoo sparc-maintainer could keyword it. 
Comment 7 SpanKY gentoo-dev 2011-09-18 21:35:33 UTC
openafs-1.5.x no longer in the tree.  use 1.6.x.