Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Jacob Dilles <theshadow27 <at> gmail.com>
Subject: Build Netatalk 2.2 from git on FreeBSD 8.2
Newsgroups: gmane.network.netatalk.devel
Date: Saturday 23rd July 2011 19:36:44 UTC (over 6 years ago)
As others have noted, OS X Lion breaks Time Machine backups with
2.1.x. Frank generously released the 2.2 source yesterday
(http://sourceforge.net/mailarchive/message.php?msg_id=27835091),
but
in getting the latest (2.2.1?) from the git repo to build on my
FreeBSD 8.2 machine I ran into a few issues (three).

(1) configure args to match the 2.1 ports makefile:

export CFLAGS="-O2 -pipe -fno-strict-aliasing"; ./configure
--enable-quota  --without-acls --without-pam --disable-ddp


(2) The error is:

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..
-I/usr/local/include/db46
-D_PATH_CNID_DBD=\"/usr/local/sbin/cnid_dbd\" -I../../include
-D_U_="__attribute__((unused))" -O2 -pipe -fno-strict-aliasing
-D_BSD_SOURCE -D_BSD_VISIBLE -I../../sys -MT comm.o -MD -MP -MF
.deps/comm.Tpo -c -o comm.o comm.c
In file included from ../../include/atalk/util.h:20,
                 from comm.c:37:
../../sys/netatalk/at.h:73: error: expected specifier-qualifier-list
before 'u_short'
../../sys/netatalk/at.h:93: error: expected specifier-qualifier-list
before 'u_char'
../../sys/netatalk/at.h:122: error: expected specifier-qualifier-list
before 'u_char'
*** Error code 1
Stop....

The solution is to add the following in sys/netatalk/at.h somewhere
near the top:

+typedef unsigned char  u_char;
+typedef unsigned short u_short;
+typedef unsigned int   u_int;
+typedef unsigned long  u_long;
+
+#include 
+#include 

as per the discussion here:
http://sourceforge.net/mailarchive/forum.php?thread_name=20110406.221704.99235722.hat%40fa2.so-net.ne.jp&forum_name=netatalk-admins


(3)  The error is:

cnid_metad.c: In function 'setlimits':
cnid_metad.c:410: error: storage size of 'rlim' isn't known
cnid_metad.c:412: warning: implicit declaration of function 'getrlimit'
cnid_metad.c:412: error: 'RLIMIT_NOFILE' undeclared (first use in this
function)
cnid_metad.c:412: error: (Each undeclared identifier is reported only once
cnid_metad.c:412: error: for each function it appears in.)
cnid_metad.c:416: error: 'RLIM_INFINITY' undeclared (first use in this
function)
cnid_metad.c:420: warning: implicit declaration of function 'setrlimit'
*** Error code 1
Stop...

The solution is etc/cnid_dbd/cnid_metad.c  needs a:

+#include 

as per the getrlimit() man page:
http://www.manpages.info/freebsd/setrlimit.2.html


I'm sure these can be whittled into the #defines somewhere... The
configure bit will probably be saved for the ports distro (hopefully
makes it into 9)

Cheers!

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
 
CD: 3ms