[OpenAFS] building openafs on ppc64le architecture on Linux

Troy Benjegerdes hozer@hozed.org
Sun, 29 Apr 2018 02:13:08 +0000


On Sat, Apr 28, 2018 at 08:12:42PM -0500, Benjamin Kaduk wrote:
> On Sat, Apr 28, 2018 at 10:56:43PM +0000, Troy Benjegerdes wrote:
> > On Sun, Mar 04, 2018 at 07:05:40PM -0600, Benjamin Kaduk wrote:
> > > On Sun, Mar 04, 2018 at 04:31:10AM -0500, Gary Gatling wrote:
> > > > Hello.
> > > > 
> > > > 
> > > > But now the third problem / error I get is:
> > > > 
> > > > rx_pthread.c:164:97: error: expected expression before ';' token
> > > >   error = CV_TIMEDWAIT(&rx_event_handler_cond, &event_handler_mutex,
> > > > &rx_pthread_next_event_time);
> > > > 
> > > 
> > > Hmm, it is as if CV_TIMEDWAIT() somehow got #defined away.
> > > 
> > > I see from the pastebin that you are basing your work off 1.6.22; I
> > > would recommend starting again from master (or 1.8.0pre5 which is
> > > pretty similar), since (1) new code would have to go through master
> > > anyway, and (2) master has some changes in this area, using the
> > > OpenAFS Portable Runtime (opr) library instead of directly using
> > > pthread calls, which may or may not be relevant.
> > 
> > I'm looking at this on Debian 9 PPC64le, and the latest git master,
> > ( Thu apr 26, cfa74883e4996dfee2bd6ffaa3b967e5a7941e0b ) and strange
> > things like AFS_NORETURN are not defined when compiling 'assert.c'
> > in opr.h
> > 
> > (something is mangling my terminal with cut & paste here..)
> > 
> > opr.h: In function â?~opr_AssertionFailedâ?T:
> > opr.h:19:52: error: expected declaration specifiers before â?~AFS_NORETURNâ?T
> >  extern void opr_AssertionFailed(const char *, int) AFS_NORETURN;
> >                                                     ^~~~~~~~~~~~
> > opr.h:20:62: error: expected â?~=â?T, â?~,â?T, â?~;â?T, â?~asmâ?T or â?~__attribute__â?T before â?~AFS_NORETURNâ?T
> >  extern void opr_AssertFailU(const char *, const char *
> > 
> > 
> > I don't quite understand how this could not be defined, nor do
> > I fully understand how 'include/afs/stds.h' is supposed to be included
> > that does define that.
> > 
> > Any thoughts here?
> 
> Generally at this point I end up trying to see what the preprocessor
> has/has not done to my file, whether via cc -E or some deeper
> compiler debugging options (IIRC there are several choices in gcc to
> emit intermediately preprocessed representations, but the
> incantations are pretty arcane).  Even cc -E should give some sense
> of what files are included, though.
> 

Oh that was silly. I started by trying to use a sysname of 
'ppc64le_linuxXX', and confused myself.

Patch at:
https://github.com/tmagik/openafs/commit/78ae3eb8f0effd874f004059d6ba54c33997e4a2

Now, how do I get that over into something for inclusion into
the regular git ? At least the AFSd works, so I assume this
probably means all the server stuff should be fine, although
this would be easier to test with the debian packaging.