Bug 1226255 - Undefined symbol "changelog_select_event"
Summary: Undefined symbol "changelog_select_event"
Keywords:
Status: CLOSED DUPLICATE of bug 1226307
Alias: None
Product: GlusterFS
Classification: Community
Component: porting
Version: mainline
Hardware: x86_64
OS: FreeBSD
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-29 10:07 UTC by pellaeon
Modified: 2015-06-02 12:41 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-06-02 12:41:12 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
patch for clang (4.97 KB, text/plain)
2015-05-29 10:07 UTC, pellaeon
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1226307 0 high CLOSED Volume start fails when glusterfs is source compiled with GCC v5.1.1 2021-02-22 00:41:40 UTC

Internal Links: 1226307

Description pellaeon 2015-05-29 10:07:26 UTC
Created attachment 1031821 [details]
patch for clang

Description of problem:
When starting a volume, GlusterFS will fail with followint mesage:

[2015-05-28 14:27:39.093136] W [xlator.c:192:xlator_dynload] 0-xlator: /usr/local/lib/glusterfs/3.8dev/xlator/features/changelog.so: Undefined symbol "changelog_select_event"
[2015-05-28 14:27:39.093183] E [graph.y:212:volume_type] 0-parser: Volume 'vietnam-changelog', line 30: type 'features/changelog' is not valid or not found on this machine
[2015-05-28 14:27:39.093212] E [graph.y:321:volume_end] 0-parser: "type" not specified for volume vietnam-changelog
[2015-05-28 14:27:39.093393] E [MSGID: 100026] [glusterfsd.c:2149:glusterfs_process_volfp] 0-: failed to construct the graph

Version-Release number of selected component (if applicable):
master@19d7b609

How reproducible:
Build & install GlusterFS on FreeBSD 10.1 amd64.
Create a volume then start a volume.


Steps to Reproduce:
1. get glusterfs source code
2. cd glusterfs
3. ./autogen
4. ./configure
5. make
6. sudo make install
7. glusterd -p /var/run/glusterd.pid
8. gluster volume create vietnam a.gluster:/brick1/brick1
9. gluster volume start vietnam
10. see brick log file

Actual results:
Cannot start volume.

Expected results:
Volume starts.


Additional info:
This bug is caused by clang and gcc handles inline functions differently.
By writing "inline" in source files, gcc will emit standalone object code, so it may be called externally.
But for clang, "inline" will not emit standalone object code, therefore the "undefined symbol" error, to achieve the same behavior as in gcc, you need to write "extern inline".

In the attachment find the patch. This patch should also work for gcc.

Reference: http://www.greenend.org.uk/rjk/tech/inline.html

Comment 1 rjoseph 2015-06-02 12:41:12 UTC
Bug is already fixed in 1226307 BZ, Therefore closing this as duplicate.

*** This bug has been marked as a duplicate of bug 1226307 ***


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