Page MenuHomeFreeBSD

net/glusterfs update to latest 3.12.2
AbandonedPublic

Authored by craig001_lerwick.hopto.org on Nov 9 2017, 1:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 7:55 PM
Unknown Object (File)
Mar 7 2024, 1:56 AM
Unknown Object (File)
Mar 7 2024, 12:53 AM
Unknown Object (File)
Mar 7 2024, 12:00 AM
Unknown Object (File)
Dec 21 2023, 3:21 PM
Unknown Object (File)
Dec 20 2023, 4:39 AM
Unknown Object (File)
Sep 3 2023, 2:31 AM
Unknown Object (File)
Aug 14 2023, 4:30 PM

Details

Reviewers
None
Group Reviewers
Ports Committers
Summary

update glusterfs to latest and greatest, capture and fix a reported PR issue.

Test Plan

create PR (223548) in bugs.freebsd.org
fix port to grab latest glusterfs
run lint and stage-qa
create this diff for peer code review and PR
call for further testing

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Also please remove the patch files from the diff unless they are failing to patch. They provide no functional value or change.

Makefile
14

Please separate each depend with \ and newline for readability.

dbaio added inline comments.
Makefile
49

Did you check if glusterfs runs fine when built with clang?
It is building fine in [10|11|CURRENT]-[amd64|i386].

Hello Folks

Unfortunately it appears something has broke... Although the port compiles fine with gcc on 11.1-RELEASE when running gluster it immediately falls over and exits on error 11 and core dumps.

I am also having difficulty getting glusterfs 3.12.2 to build with clang.

More debugging and QA required.

Thanks for your help so far

Kind Regards

Craig Butler

Makefile
49

I keep hitting an error with clang...

Making all in src
--- socket.lo ---
/bin/sh ../../../../libtool  --tag=CC --quiet   --mode=compile cc -DHAVE_CONFIG_H  -I. -I../../../..  -I/usr/local/include/uuid -I/usr/local/include   -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_BSD_HOST_OS -include ../../../../config.h -include ../../../../site.h -I../../../../libglusterfs/src -I../../../../libglusterfs/src  -I../../../../libglusterfs/src  -I../../../../rpc/rpc-lib/src/  -I../../../../rpc/xdr/src/  -I../../../../rpc/xdr/src/ -I/usr/local/include -I/usr/local/include  -Wall -O2 -pipe -fstack-protector -fno-strict-aliasing -g -rdynamic -Wformat -Werror=format-security -Werror=implicit-function-declaration -Wno-gnu  -O0 -DTHREAD_UNSAFE_BASENAME -DTHREAD_UNSAFE_DIRNAME -D_LIBGEN_H_ -DO_DSYNC=0 -Dxdr_quad_t=xdr_longlong_t -Dxdr_u_quad_t=xdr_u_longlong_t -O2 -pipe -fstack-protector -fno-strict-aliasing -g -rdynamic -Wformat -Werror=format-security -Werror=implicit-function-declaration -MT socket.lo -MD -MP -MF .deps/socket.Tpo -c -o socket.lo socket.c
cc: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
socket.c:846:17: warning: unused variable 'timeout_ms' [-Wunused-variable]
        int     timeout_ms = timeout * 1000;
                ^
socket.c:971:9: error: implicit declaration of function 'event_unregister_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        event_unregister_close (this->ctx->event_pool, priv->sock, priv->idx);
        ^
socket.c:1166:29: error: implicit declaration of function 'event_select_on' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                priv->idx = event_select_on (this->ctx->event_pool,
                            ^
socket.c:2309:17: error: implicit declaration of function 'event_handled' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                event_handled (ctx->event_pool, priv->sock, priv->idx,
                ^
socket.c:2309:17: note: did you mean 'event_add'?
/usr/local/include/event2/event.h:1230:5: note: 'event_add' declared here
int event_add(struct event *ev, const struct timeval *timeout);
    ^
socket.c:2924:41: error: implicit declaration of function 'event_register' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                                        event_register (ctx->event_pool,
                                        ^
1 warning and 4 errors generated.
*** [socket.lo] Error code 1

Could you please reopen D13010?

I was able to successfully build and run the latest 3.13.2 under FreeBSD 11.1-RELEASE amd64 using the following two patches:

patch-api_src_glfs.c

--- api/src/glfs.c.orig 2018-05-09 17:16:56.944022000 +0200
+++ api/src/glfs.c      2018-05-09 17:21:39.119348000 +0200
@@ -1556,8 +1556,8 @@
 GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_sysrq, 3.10.0);
 
 int
-glfs_upcall_register (struct glfs *fs, uint32_t event_list,
-                      glfs_upcall_cbk cbk, void *data)
+pub_glfs_upcall_register (struct glfs *fs, uint32_t event_list,
+                     glfs_upcall_cbk cbk, void *data)
 {
         int ret = 0;
 
@@ -1607,7 +1607,8 @@
 }
 GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_register, 3.13.0);
 
-int glfs_upcall_unregister (struct glfs *fs, uint32_t event_list)
+int
+pub_glfs_upcall_unregister (struct glfs *fs, uint32_t event_list)
 {
         int ret = 0;
         /* list of supported upcall events */

patch-libglusterfs_src_common-utils.c

--- libglusterfs/src/common-utils.c.orig        2018-05-09 17:48:35.460245000 +0200
+++ libglusterfs/src/common-utils.c     2018-05-09 17:51:04.355538000 +0200
@@ -53,6 +53,10 @@
 #include <ifaddrs.h>
 #include "libglusterfs-messages.h"
 #include "protocol-common.h"
+#ifdef __FreeBSD__
+#include <pthread_np.h>
+#undef BIT_SET
+#endif
 
 #ifndef AI_ADDRCONFIG
 #define AI_ADDRCONFIG 0
@@ -3750,11 +3754,13 @@
                         pthread_setname_np(*thread, thread_name);
                 #elif defined(__NetBSD__)
                         pthread_setname_np(*thread, thread_name, NULL);
+               #elif defined(__FreeBSD__)
+                        pthread_set_name_np(*thread, thread_name);
                 #else
                         gf_msg (THIS->name, GF_LOG_WARNING, 0,
                                 LG_MSG_PTHREAD_NAMING_FAILED,
-                                "Thread names not implemented on this "
-                                "platform");
+                                "Could not set thread name: %s",
+                                thread_name);
                 #endif
         }

All kudos for the patches go to Kaleb Keithley (kkeithle at redhat dot com).

References:

https://review.gluster.org/19974
https://review.gluster.org/19994

Should probably stick to 3.12.x since that's the LTM, 3.13 is EOL already, and 4.0 sounds like it's going to be EOL'd soon with the release of 4.1

Makefile
49

Have you tried USE_CSTD=gnu98 instead of switching from clang?