Bug 1279164 - [RFE] Gluster should support out of tree builds
Summary: [RFE] Gluster should support out of tree builds
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1330604 1377341
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-08 10:14 UTC by Raghavendra Talur
Modified: 2016-09-19 13:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-18 17:58:10 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1330604 0 unspecified CLOSED out-of-tree builds generate XDR headers and source files in the original directory 2021-02-22 00:41:40 UTC

Internal Links: 1330604

Description Raghavendra Talur 2015-11-08 10:14:04 UTC
Description of problem:
Autotools support out-of-tree builds. All the artifacts of the build are created in the directory where configure was invoked. This allows one to have parallel builds going on for different archs or on different hosts sharing the same code from NFS mount etc.

Currently, make install fails for such a use case.


How reproducible:
Always


Steps to Reproduce:
1. Create a build dir at the same level as the source.
example: /root/build and /root/glusterfs.git
2. cd /root/glusterfs.git
3. ./autogen.sh
4. cd ../build
5. ../glusterfs.git/configure
6. make install

Actual results:
make install fails with the following error
"../../../../glusterfs.git/rpc/xdr/src/glusterfs3-xdr.c:34:52: fatal error: ../../../../rpc/xdr/src/glusterfs3-xdr.h: No such file or directory



Expected results:
Build should succeed and install glusterfs

Hints:
It works if the build dir is inside glusterfs.git.
Understand out of tree builds and VPATH w.r.t autotools.
Here is a link I found https://msteveb.github.io/autosetup/user/outoftree/

Comment 1 Anoop C S 2016-06-17 12:55:00 UTC
I tried the above mentioned steps and could compile and install glusterfs out-of-tree without any failures.

Version details
===============
GlusterFS: master @ ae4a410cb411c3f1b5ebac9d49d47e2fc00c9a74
Operating System: Fedora 23
GNU make: 4.0-5.1
Autoconf: 2.69-21

I vaguely looked over GNU make and GNU autoconf docs and it seems to me that glusterfs doesn't have to do anything to support out-of-tree builds. Here are some useful links:

https://www.gnu.org/software/make/manual/make.html#Search-Algorithm
https://www.gnu.org/software/autoconf/manual/autoconf.html#VPATH-and-Make

Or did I miss something?

Comment 2 Anoop C S 2016-09-06 07:12:48 UTC
Somehow I mistook the steps mentioned in description and my build directory was not created at the same level as git source. So we need to fix this for sure. Sorry for the confusion.

Comment 3 Kaleb KEITHLEY 2016-09-18 17:58:10 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1230604 was merged to master branch

Ostensibly that was a duplicate of this.


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