Re: [Nbd] NBD with uClibc 0.9.33.2 - compile problem
- To: VAGO Tibor <tibor.vago@...17...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] NBD with uClibc 0.9.33.2 - compile problem
- From: Wouter Verhelst <w@...112...>
- Date: Tue, 5 Feb 2013 02:21:41 +0100
- Message-id: <20130205012141.GN31439@...3...>
- In-reply-to: <510E7F9E.90903@...17...>
- References: <510E7F9E.90903@...17...>
On Sun, Feb 03, 2013 at 04:17:50PM +0100, VAGO Tibor wrote:
> Hi,
>
> I tried to compile nbd 3.2 on my NAS, an ARMv5T based system. I install
> gentoo-uclibc on it and when I try to compile nbd it cannot find
> fallocate() function:
>
> ------------------------------------------------------------------------
> armv5tel-softfloat-linux-uclibceabi-gcc -std=gnu99 -w -Os -march=armv5te
> -fomit-frame-pointer -pipe -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -w -Os -march=armv5te -fomit-frame-pointer
> -pipe -Wl,-O1 -Wl,--as-needed -o nbd-server nbd_server-nbd-server.o
> -lglib-2.0 -lintl
> nbd_server-nbd-server.o: In function `exptrim':
> nbd-server.c:(.text+0x2274): undefined reference to `fallocate'
> collect2: ld returned 1 exit status
> ------------------------------------------------------------------------
>
> In configure I can't see any check for fallocate() availability. It just
> found fcntl.h and it assumes there is fallocate() function?
It actually searches for the FALLOC_FL_PUNCH_HOLE constant, which we use
for the trim functionality. I suppose you can cheat by editing config.h
so it does not #define HAVE_FALLOC_PH; other than that, a patch is
certainly welcome.
> In uClibc there is posix_fallocate() and there is no fallocate().
> I don't know what are the differences between posix_fallocate() and
> fallocate() but if it is equivalent may I use it?
It is not.
--
Copyshops should do vouchers. So that next time some bureaucracy requires you
to mail a form in triplicate, you can mail it just once, add a voucher, and
save on postage.
Reply to: