caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* annexlib and FreeBSD
@ 2010-09-01 22:59 Микола Стрєбков
  0 siblings, 0 replies; only message in thread
From: Микола Стрєбков @ 2010-09-01 22:59 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 2159 bytes --]

Hi,

While trying to build annexlib-0.13.5 from godi_console on my FreeBSD machine I'm getting the following error:

------------------------------------------------------------------------------------------------------------------------------------
gmake[8]: Leaving directory `/usr/home/nick/godi/build/godi/godi-annexlib/work/annexlib-0.13.5'
gmake[8]: Entering directory `/usr/home/nick/godi/build/godi/godi-annexlib/work/annexlib-0.13.5'
ocamlc -c -cc "gcc" -ccopt "-fPIC -DPIC -fPIC -DPIC -Wall -Wno-unused \
				    -o util_stubs.o " util_stubs.c 
util_stubs.c: In function 'stew_sendfile':
util_stubs.c:473: warning: implicit declaration of function 'sendfile'
util_stubs.c:484: error: expected ';' before '}' token
util_stubs.c: In function 'alloc_service_entry':
util_stubs.c:500: warning: implicit declaration of function 'ntohs'
gmake[8]: *** [util_stubs.o] Error 2
gmake[8]: Leaving directory `/usr/home/nick/godi/build/godi/godi-annexlib/work/annexlib-0.13.5'
gmake[7]: *** [byte-code-library] Error 2
gmake[7]: Leaving directory `/usr/home/nick/godi/build/godi/godi-annexlib/work/annexlib-0.13.5'
Error: Exec error: File /usr/home/nick/godi/build/godi/godi-annexlib/./../../mk/bsd.pkg.mk, line 1039: Command returned with non-zero exit code
Error: Exec error: File /usr/home/nick/godi/build/godi/godi-annexlib/./../../mk/bsd.pkg.mk, line 1378: Command returned with non-zero exit code
------------------------------------------------------------------------------------------------------------------------------------

Prerequisites:
$ uname -sr
FreeBSD 8.0-STABLE
$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

The problem is in the minor typo in FreeBSD-specific code. So, to deal with this error and those warnings I propose the attached patch.
Also, it would be great if somebody could point me to more specific way to propose patches to godi packages :-)

-- 
Mykola Stryebkov
Public key: http://mykola.org/pubkey.txt
fpr: 0226 54EE C1FF 8636 36EF  2AC9 BCE9 CFC7 9CF4 6747


[-- Attachment #2: annexlib.patch --]
[-- Type: application/octet-stream, Size: 787 bytes --]

Common subdirectories: annexlib.orig/doc and annexlib.patched/doc
Common subdirectories: annexlib.orig/tests and annexlib.patched/tests
diff -du annexlib.orig/util_stubs.c annexlib.patched/util_stubs.c
--- annexlib.orig/util_stubs.c	2010-09-02 01:39:36.000000000 +0300
+++ annexlib.patched/util_stubs.c	2010-09-02 01:43:54.000000000 +0300
@@ -42,6 +42,13 @@
 #include <errno.h>
 #include <stdio.h>
 
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+#include <arpa/inet.h>
+#endif
+
 #ifdef HAVE_SYS_SENDFILE_H
 #include <sys/sendfile.h>
 #endif
@@ -476,7 +483,7 @@
   if (len == 0)
     return Val_int(wrote);
   else
-    uerror("sendfile", Nothing)
+    uerror("sendfile", Nothing);
 #else
       failwith("sendfile unimplemented!");
 #endif

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-01 22:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01 22:59 annexlib and FreeBSD Микола Стрєбков

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).