Bug 762081 (GLUSTER-349)

Summary: FreeBSD compilation error (alloca.h).
Product: [Community] GlusterFS Reporter: ArtemGr <artemciy>
Component: buildAssignee: Vikas Gorur <vikas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 2.0.7CC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: FreeBSD   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 762082    

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.)