Bug 976946 - BD xlator causes build to fail on debian due to implicit int to pointer conversion
BD xlator causes build to fail on debian due to implicit int to pointer conve...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: build (Show other bugs)
3.4.0-beta
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Niels de Vos
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-21 21:33 EDT by Louis Zuckerman
Modified: 2014-04-17 09:13 EDT (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.4.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-17 09:13:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Check for declared functions instead of functions in the binary lib (519 bytes, patch)
2013-06-22 15:29 EDT, Niels de Vos
no flags Details | Diff

  None (edit)
Description Louis Zuckerman 2013-06-21 21:33:54 EDT
Description of problem:

Here is the end of the build log from the Ubuntu build server. (Full log: https://launchpadlibrarian.net/143078766/buildlog_ubuntu-precise-amd64.glusterfs_3.4.0beta3-beta3~precise3_FAILEDTOBUILD.txt.gz)

=================================
Built successfully
******************************************************************************
Finished at 20130622-0036
Build needed 00:05:16, 153272k disk space
Function `lvm_lv_from_name' implicitly converted to pointer at bd_map.c:175



Our automated build log filter detected the problem(s) above that will
likely cause your package to segfault on architectures where the size of
a pointer is greater than the size of an integer, such as ia64 and amd64.

This is often due to a missing function prototype definition.

Since use of implicitly converted pointers is always fatal to the application
on ia64, they are errors.  Please correct them for your next upload.

More information can be found at:
http://wiki.debian.org/ImplicitPointerConversions

=================================

Version-Release number of selected component (if applicable):

3.4.0beta3

How reproducible:

Every time on amd64 arch.
Comment 1 Niels de Vos 2013-06-22 15:29:39 EDT
Created attachment 764172 [details]
Check for declared functions instead of functions in the binary lib

That indicates that lvm_lv_from_name has not been declared in lvm2app.h.

The build log shows:

> liblvm2-dev amd64 2.02.66-4ubuntu7.3

The source for 2.02.66:
- https://git.fedorahosted.org/cgit/lvm2.git/tree/liblvm/lvm2app.h?id=v2_02_66

You will see that there is no lvm_lv_from_name function listed. The function exists in the library, but is not added to the header until 2.02.79 (commit 2ac0e8f9):
- https://git.fedorahosted.org/cgit/lvm2.git/diff/liblvm/lvm2app.h?id=2ac0e8f9

$ git tag --contains 2ac0e8f9
v2_02_79
...

So, either the dependency should be on lvm2-2.02.79 or newer, or the patch that is attached can be posted for review so that the detection in configure.ac is handled more securely.

Could you check the patch and let me know if that is your preference? An alternative would be to define the lvm_lv_from_name function if it is available while linking, but unavailable in the header. This would allow you to enable the bd-xlator with lvm2-2.02.66.
Comment 2 Anand Avati 2013-06-24 08:50:36 EDT
REVIEW: http://review.gluster.org/5250 (build: declare lvm_lv_from_name() if it is missing from lvm2app.h) posted (#2) for review on master by Niels de Vos (ndevos@redhat.com)
Comment 3 Niels de Vos 2013-06-24 08:52:12 EDT
Louis, could you test that change in your build environment?
Comment 4 Louis Zuckerman 2013-06-24 18:35:52 EDT
The build succeeded!

https://launchpad.net/~semiosis/+archive/ubuntu-glusterfs-3.4/+build/4743064

Thanks again Niels & all.
Comment 5 Anand Avati 2013-06-27 07:38:28 EDT
COMMIT: http://review.gluster.org/5250 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit 75ee14ffbe362c41be096eca9a2fef1ec7e8db94
Author: Niels de Vos <ndevos@redhat.com>
Date:   Mon Jun 24 14:34:50 2013 +0200

    build: declare lvm_lv_from_name() if it is missing from lvm2app.h
    
    The bd-xlator can not be built successfully on certain Debian
    distributions due to a missing declaration of lvm_lv_from_name(). This
    function is available for linking, but it does not exist in the header
    file.
    
    This change adds a detection for lvm_lv_from_name() in both the library
    for linking, and the declaration in the header file. If the 1st is
    missing, the bd-xlator can not be built, and if only the 2nd one is
    missing, we'll declare lvm_lv_from_name() ourselves. This makes it
    possible to build the bd-xlator on the affected Debian distributions
    too.
    
    Change-Id: I0c823a7861b02bb5d9c1abb76ebfff92f272f9eb
    BUG: 976946
    Signed-off-by: Niels de Vos <ndevos@redhat.com>
    Reviewed-on: http://review.gluster.org/5250
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Comment 6 Anand Avati 2013-06-27 07:51:43 EDT
REVIEW: http://review.gluster.org/5260 (build: declare lvm_lv_from_name() if it is missing from lvm2app.h) posted (#1) for review on release-3.4 by Niels de Vos (ndevos@redhat.com)
Comment 7 Anand Avati 2013-06-27 08:40:19 EDT
COMMIT: http://review.gluster.org/5260 committed in release-3.4 by Vijay Bellur (vbellur@redhat.com) 
------
commit 505f57e07c8096f74ddf5c43679b57bc978d501c
Author: Niels de Vos <ndevos@redhat.com>
Date:   Thu Jun 27 13:44:18 2013 +0200

    build: declare lvm_lv_from_name() if it is missing from lvm2app.h
    
    The bd-xlator can not be built successfully on certain Debian
    distributions due to a missing declaration of lvm_lv_from_name(). This
    function is available for linking, but it does not exist in the header
    file.
    
    This change adds a detection for lvm_lv_from_name() in both the library
    for linking, and the declaration in the header file. If the 1st is
    missing, the bd-xlator can not be built, and if only the 2nd one is
    missing, we'll declare lvm_lv_from_name() ourselves. This makes it
    possible to build the bd-xlator on the affected Debian distributions
    too.
    
    Change-Id: If1845f6b6d676793677ebbcc6daf9ff12f7c3fd6
    BUG: 976946
    Signed-off-by: Niels de Vos <ndevos@redhat.com>
    Reviewed-on: http://review.gluster.org/5260
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
Comment 8 Niels de Vos 2014-04-17 09:13:10 EDT
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.4.3, please reopen this bug report.

glusterfs-3.4.3 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should already be or become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

The fix for this bug likely to be included in all future GlusterFS releases i.e. release > 3.4.3. In the same line the recent release i.e. glusterfs-3.5.0 [3] likely to have the fix. You can verify this by reading the comments in this bug report and checking for comments mentioning "committed in release-3.5".

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/5978
[2] http://news.gmane.org/gmane.comp.file-systems.gluster.user
[3] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137

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