Coda File System

Re: ulocoda on OS X

From: Piotr Isajew <>
Date: Tue, 26 Mar 2013 11:09:51 +0100
On Tue, Mar 26, 2013 at 09:13:09AM +0000, wrote:

> Hi Piotr,
> On Thu, Mar 14, 2013 at 03:47:13PM +0100, Piotr Isajew wrote:
> > Now, from what I see, the symptoms I get on 10.5 are mostly
> > similar to those I got on 10.6.
> My experience shows a difference between the os versions.
> While on 10.5 Ulocoda worked nearly "out of the box", I could not compile
> Ulocoda for 10.6 as some compatibility layer (?) was missing in its
> includes (it refused to accept _NONSTD_SOURCE).
> This indicates that the internals of the MacOS standard library changed and
> that some functions in tenaron may need a rewrite.
> I did not look deeper.
> May be you have a better clue about what is incompatible and could be
> fixed (or possibly removed without affecting "true unix" applications?).
> (we may have got different results on 10.5 due to subtle
> differences in the build environment, versions of Xcode or
> presence/absence of macports or something like that)

I can compile this on 10.6, but it needs some adjustments. Most
issues came from 10.6 being 64-bit, so there are some changes in
the SDK and symbol names. In order to compile the code, it's
needed to either comment out some entries in interposers table,
or fix them to match available symbols.

You can add -m32 to CFLAGS, and it compiles.  There were
some references to nonexistent struct fields in the assignments
in code, but as those were always nullified or set to zero, I
assumed that those assignments can be removed without any harm.  

You could compile it then with the rest of code unchanged, but
then you get 32-bit version of tenaron, which you wont be able to
preload for 64-bit applications, so this way leads to dead end.

To compile 64-bit tenaron I had to remove -DNONSTD_SOURCE flag
from Makefile, but then I had to deal with several errors within
interpose.c and implementation of various interposers. In 64-bit
version of system library some symbols do not exist or have
different names than in 32-bit one, so a lot of interposers table
entries needs to be rewritten. For the same reason I got plenty
of errors in interposers code. I managed to correct to some of
them, but I've gave up for now on getdirentries() & friends. This
part is something to be done thoroughly, as if something goes
wrong here it won't be even possible to do "ls /coda". 

As the rest of stuff consumed most of the time I then had for
playing with this, I didn't get any further. Maybe I'll be able
to make another approach during Easter.

Oh, yes... there is also some python stuff to deal
with. terra-start crashes with: 

AssertionError: Thread.__init__() not called

which I fixed by adding call to parent constructor in

After that fix terra starts. What's needed to be done is to fix
interposers code to match system library from 10.6, and with a
lot of luck we will see something working then. 


Received on 2013-03-26 06:10:06