-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 06/29/2015 05:54 PM, Joseph Fernandes wrote: > Hi All, > > Recently I installed Fedora 22 on some fresh vms, which comes with > gcc 5.1.1-1(which can be upgraded to 5.1.1-4) Observed one thing > that normal "inline functions" will be undefined symbols in the > "so" files. As a result I had trouble in start volume as > "gf_sql_str2sync_t" > > [2015-06-29 05:52:38.491378] I [MSGID: 101190] > [event-epoll.c:627:event_dispatch_epoll_worker] 0-epoll: Started > thread with index 1 [2015-06-29 05:52:38.499205] W [MSGID: 101095] > [xlator.c:189:xlator_dynload] 0-xlator: > /usr/local/lib/libgfdb.so.0: undefined symbol: gf_sql_str2sync_t > [2015-06-29 05:52:38.499229] E [MSGID: 101002] > [graph.y:211:volume_type] 0-parser: Volume > 'test-changetimerecorder', line 16: type > 'features/changetimerecorder' is not valid or not found on this > machine [2015-06-29 05:52:38.499262] E [MSGID: 101019] > [graph.y:319:volume_end] 0-parser: "type" not specified for volume > test-changetimerecorder [2015-06-29 05:52:38.499335] E [MSGID: > 100026] [glusterfsd.c:2151:glusterfs_process_volfp] 0-: failed to > construct the graph [2015-06-29 05:52:38.499470] W > [glusterfsd.c:1214:cleanup_and_exit] (--> 0-: received signum (0), > shutting down > > when gf_sql_str2sync_t was made "static inline gf_sql_str2sync_t" > the next issue was with "changelog_dispatch_vec" > > [2015-06-29 07:11:33.367259] I [MSGID: 101190] > [event-epoll.c:627:event_dispatch_epoll_worker] 0-epoll: Started > thread with index 1 [2015-06-29 07:11:33.368816] W [MSGID: 101095] > [xlator.c:189:xlator_dynload] 0-xlator: > /usr/local/lib/glusterfs/3.8dev/xlator/features/changelog.so: > undefined symbol: changelog_dispatch_vec [2015-06-29 > 07:11:33.368829] E [MSGID: 101002] [graph.y:211:volume_type] > 0-parser: Volume 'test-changelog', line 32: type > 'features/changelog' is not valid or not found on this machine > [2015-06-29 07:11:33.368843] E [MSGID: 101019] > [graph.y:319:volume_end] 0-parser: "type" not specified for volume > test-changelog [2015-06-29 07:11:33.368922] E [MSGID: 100026] > [glusterfsd.c:2151:glusterfs_process_volfp] 0-: failed to construct > the graph [2015-06-29 07:11:33.369025] W > [glusterfsd.c:1214:cleanup_and_exit] (--> 0-: received signum (0), > shutting down > > and so on. > I was doing my development work on Fedora 22 since 2 weeks and I haven't encountered similar error recently. I could create, start and mount volumes successfully. If you had rpms installed previously, can you make sure that those are cleaned up correctly? > Looks like "inline" functions should be marked as "static inline" > or "extern inline" explicitly Please refer > https://gcc.gnu.org/gcc-5/porting_to.html > > To recreate the issue without glusterfs, try out this sample code > program on fedora 22 gcc 5.1.1 or higher > > hello.c ======= > > #include <stdio.h> > > inline void foo () { printf ("hello world"); } > > int main () { > > foo (); return 0; } > > # gcc hello.c /tmp/ccUQ1XPp.o: In function `main': > hello.c:(.text+0xa): undefined reference to `foo' collect2: error: > ld returned 1 exit status # > Reading through gcc docs I could see that with gcc v5, it defaults to C99 semantics and compiling with -fgnu89-inline solves the above issue. I'm wondering how glusterfs compiled successfully without providing this flag. I'm investigating on other ways to use inline that behave the same in the old and the new semantics. > Should we change all the inline function to "static inline" or > "extern inline" in gluster, appropriately to their scope of use > (IMHO would be a right thing to do)? or should we use a compiler > flag to suppress this? > > Regards, Joe > > > > > _______________________________________________ Gluster-devel > mailing list Gluster-devel@xxxxxxxxxxx > http://www.gluster.org/mailman/listinfo/gluster-devel > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iJwEAQEIAAYFAlWRiKQACgkQ9uBlhhlWMJacxgQAo49rPf6pX9wWRNd2tEo8n0iP 3hytIGPOswqWf5Cii5cunf2qXHH+vW4nI5biXiVeLgfs9WmK+dEj+CL2iWJTKwX2 Fs5VYUt2BBtWf73f3AR1OS5U7ARd38H/Q0JXfGhrhLcIDEAuBlJ4BBSennlCOF/A fCiDSEAhCPctPLBdP0w= =OiXD -----END PGP SIGNATURE----- _______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://www.gluster.org/mailman/listinfo/gluster-devel