[OpenAFS-devel] New branch in CVS: openafs-stable-1_4_0-branch (tiger and byte range locks)

Kyle Moffett mrmacman_g4@mac.com
Thu, 6 Oct 2005 18:09:37 -0400


--Apple-Mail-3-5522593
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

On Oct 6, 2005, at 15:01:38, Derrick J Brashear wrote:
> On Thu, 6 Oct 2005, Kyle Moffett wrote:
>> It looks like the -nostdinc is preventing it from locating ppc/ 
>> types.h which is included by sys/types.h, but I'm not sure how it  
>> gets ahold of a sys/types.h to know where to go looking.  I have a  
>> complete full-install of Xcode Tools 2.1.
>
> It links directories of headers into src/libafs. ppc is not one of  
> them. Maybe it should be. Wonder why it's building for me.

Many minutes of debugging later: OH!!!

One of the makefiles includes this happy string, so you aren't  
supposed to need most of those messy symlinks:  KINCLUDES=-I$(KROOT)/ 
System/Library/Frameworks/Kernel.Framework/Headers

The problem is that I'm using a case-sensitive HFS+ filesystem to  
make myself more comfortable (yes, yes, I know, I get to keep both  
pieces), but you misspelled "Kernel.framework" as "Kernel.Framework"  
there, and didn't notice because you (for some value of "you") all  
use case-insensitive filesystems. (you darn insensitive people!!! :- 
D).  The attached patch cleans up the whole issue and removes the  
confusing (and unnecessary) symlinks:

--Apple-Mail-3-5522593
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="afsdiff1.patch"
Content-Disposition: attachment;
	filename=afsdiff1.patch

? .DS_Store
? configure.help
? src/aklog/Makefile
? src/libafs/afs.ppc_darwin_80.plist
Index: acinclude.m4
===================================================================
RCS file: /cvs/openafs/acinclude.m4,v
retrieving revision 1.114.2.39
diff -u -r1.114.2.39 acinclude.m4
--- acinclude.m4	3 Oct 2005 02:46:29 -0000	1.114.2.39
+++ acinclude.m4	6 Oct 2005 22:08:28 -0000
@@ -774,7 +774,7 @@
 		DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
 		DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
                 dnl the test below fails on darwin, even if the CPPFLAGS below
-                dnl are added. the headers from Kernel.Framework must be used
+                dnl are added. the headers from Kernel.framework must be used
                 dnl when KERNEL is defined.
 
                 dnl really, such a thing isn't guaranteed to work on any 
Index: src/libafs/MakefileProto.DARWIN.in
===================================================================
RCS file: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v
retrieving revision 1.21.2.2
diff -u -r1.21.2.2 MakefileProto.DARWIN.in
--- src/libafs/MakefileProto.DARWIN.in	5 Oct 2005 05:58:38 -0000	1.21.2.2
+++ src/libafs/MakefileProto.DARWIN.in	6 Oct 2005 22:08:28 -0000
@@ -46,7 +46,7 @@
 KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
 <all>
 CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ}
-KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.Framework/Headers
+KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.framework/Headers
 
 
 # Name of directory to hold object files and libraries.
@@ -65,15 +65,9 @@
 	ln -fs ../Makefile $(KOBJ)/Makefile
 	ln -fs ../Makefile.common $(KOBJ)/Makefile.common
 	ln -fs ../config $(KOBJ)/config
-	-$(RM) -f  h net netinet rpc ufs nfs  machine sys vm mach kern
-	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
-	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
-	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
-	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
-	-ln -fs /usr/include/rpc rpc
-	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
-	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
+	-$(RM) -f  h rpc
 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
+	-ln -fs /usr/include/rpc rpc
 
 
 # Below this line are targets when in the COMMON directory:

--Apple-Mail-3-5522593
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


Also, AFS appears to be compiling an XDR library in librx, but OS X  
also has one in libSystem, and the symbols conflict.  Could the XDR  
library be omitted on OS X?

Finally, I'm noticing that the makefiles use both ${variable_name}  
and $(variable_name) when referring to variables, and seemingly at  
random.  Is this intended?  I didn't realize that make accepted $ 
{foo} syntax.  I appreciate any information you can give me, thanks!

Cheers,
Kyle Moffett

--
There is no way to make Linux robust with unreliable memory  
subsystems, sorry.  It would be like trying to make a human more  
robust with an unreliable O2 supply. Memory just has to work.
   -- Andi Kleen



--Apple-Mail-3-5522593--