caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Микола Стрєбков" <nick@mykola.org>
To: caml-list@inria.fr
Subject: annexlib and FreeBSD
Date: Thu, 2 Sep 2010 01:59:32 +0300	[thread overview]
Message-ID: <00E41D05-F0B6-485F-9E7E-2523E6C837D3@mykola.org> (raw)

[-- 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

                 reply	other threads:[~2010-09-01 22:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00E41D05-F0B6-485F-9E7E-2523E6C837D3@mykola.org \
    --to=nick@mykola.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).