Bug 762081 (GLUSTER-349) - FreeBSD compilation error (alloca.h).
Summary: FreeBSD compilation error (alloca.h).
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-349
Product: GlusterFS
Classification: Community
Component: build
Version: 2.0.7
Hardware: All
OS: FreeBSD
low
low
Target Milestone: ---
Assignee: Vikas Gorur
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: GLUSTER-350
TreeView+ depends on / blocked
 
Reported: 2009-10-31 15:44 UTC by ArtemGr
Modified: 2009-12-07 15:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description ArtemGr 2009-10-31 15:44:49 UTC
---
afr-transaction.c:27:20: alloca.h: No such file or directory
gmake[5]: *** [afr-transaction.lo] Error 1
gmake[5]: Leaving directory `/root/install/gluster/glusterfs-2.0.7/xlators/cluster/afr/src'
---

There should be a configure check
(not to include alloca.h on FreeBSD,
it is defined in stdlib.h).

Workaround: replace "#include <alloca.h>" with "#include <stdlib.h>" in  "xlators/cluster/afr/src/afr-transaction.c".

Comment 1 Amar Tumballi 2009-11-11 18:22:15 UTC
please check this with 3.0.x branch on FreeBSD once.

Comment 2 ArtemGr 2009-11-12 07:48:41 UTC
Where do I get the 3.0.x branch?

With fresh "git clone git://git.sv.gnu.org/gluster.git glusterfs" under FreeBSD 7-STABLE I get:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D_GNU_SOURCE -DXLATORDIR=\"/tmp/lib/glusterfs/2.1.0git/xlator\" -DSCHEDULERDIR=\"/tmp/lib/glusterfs/2.1.0git/scheduler\" -DTRANSPORTDIR=\"/tmp/lib/glusterfs/2.1.0git/transport\" -DGF_BSD_HOST_OS -DLIBDIR=\"/tmp/lib/glusterfs/2.1.0git/auth\" -I../../contrib/rbtree -fPIC -Wall -g -nostartfiles -I../../argp-standalone -g -O2 -MT libglusterfs_la-statedump.lo -MD -MP -MF .deps/libglusterfs_la-statedump.Tpo -c statedump.c  -fPIC -DPIC -o .libs/libglusterfs_la-statedump.o
In file included from statedump.c:21:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"
gmake[3]: *** [libglusterfs_la-statedump.lo] Error 1
gmake[3]: Leaving directory `/tmp/glusterfs/libglusterfs/src'

Comment 3 Vikas Gorur 2009-11-16 11:21:23 UTC
A patch has been submitted that fixes this.

Beware, though. GlusterFS has not been tested on FreeBSD after starting to use 64-bit inode numbers. FreeBSD always uses 32-bit inode numbers, whereas GlusterFS always uses 64-bit inode numbers. This can cause a number of problems.

We do not currently recommend or support GlusterFS on FreeBSD.

Comment 4 Anand Avati 2009-11-26 07:48:45 UTC
PATCH: http://patches.gluster.com/patch/2353 in master (cluster/afr: Include "common-utils.h" instead of alloca.h)

Comment 5 Anand Avati 2009-12-07 12:21:41 UTC
PATCH: http://patches.gluster.com/patch/2602 in master (Disable fusermount by default in the rpm spec file and remove bdb references.)


Note You need to log in before you can comment on or make changes to this bug.