-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Alpine Linux #268
Comments
Doesn't the musl-gcc wrapper provide the necessary magic to link to the platform specific 'C' Library on Alpine Linux ? |
I think you're right, the musl-gcc wrapper provide some magic to link glic functions, but all the functions must be POSIX compliant. I read that glusterfs use not POSIX functions : https://bugs.alpinelinux.org/issues/2834 . |
Portablexdr doesn't seem to work with glusterfs (usually
Both 3.10.7 and master produce the same error. |
+1 |
1 similar comment
+1 |
rpcgen is in its own separate package. At least in alpine 3.9.2. (Similar to Fedora28+ and RHEL8 where rpcgen has been removed from glibc. I expect other distributions will do the same eventually.) I didn't look in any older versions.
But there are other issues with this rpcgen that alpine ships. It's not the same as the unbundled rpcgen in Fedora and doesn't like the "hyper" data type in, e.g., glusterfs4-xdr.x
Alpine should probably use the rpcgen that's in Fedora from https://github.com/thkukuk/rpcsvc-proto.git, which supports the "hyper" data type (i.e. quad_t). Without support for hyper, nobody is going to get very far building glusterfs. Someone with a vested interest in Alpine should get them to update to a modern/current rpcgen. In the mean time anyone wanting to build gluster will absolutely have to build their own rpcgen from source. |
Thank you for your contributions. |
Please keep this open to track it somewhere. |
Thanks for reply; removing tag. |
Thank you for your contributions. |
bump |
Two things here. I tried to get this done last year, and the changes in xdr lib was little too much, and there were discussions about newer network layer, and I left it off at that. Considering we from kadalu.io would like to have a smaller footprint of glusterfs in container image, I will see if we can get this picked up. If anyone wants to volunteers, (with protobuf experience), happy to coordinate. |
Gave this a try... stuck with below error, and not sure how to go about that:
@xhernandez According to this link below is mentioned:
Looks like its not supported in musl-dev at all, and hence glusterfs is not able to link fine. To get to this, I needed to do few changes in code, including not building gfapi (more errors seen). I will update later about all dependencies and changes done. The rpcgen issues etc are gone now, and libtirpc-dev also is available. So all good there. |
Fixes: gluster#268 Change-Id: I1468de97cc38479d09a16ea41eb2aa346e4457cf Signed-off-by: Amar Tumballi <[email protected]>
Fixes: gluster#268 Change-Id: I1468de97cc38479d09a16ea41eb2aa346e4457cf Signed-off-by: Amar Tumballi <[email protected]>
With below dockerfile
and |
Fixes: gluster#268 Change-Id: I1468de97cc38479d09a16ea41eb2aa346e4457cf Signed-off-by: Amar Tumballi <[email protected]>
Without support for Another way is to implement those functions ourselves, but it's not trivial because we would need to do it at very low level (probably assembly) and we'll need to do it for each machine type we want to be able to run Gluster. Probably this is not the right approach. |
Ack, I agree. Currently a lot of logic depends on I will keep the issue open, and keep the branch alive, so anyone interested can pick it up and take it forward. For now, focusing on few other things. |
Fixes: gluster#268 Change-Id: I1468de97cc38479d09a16ea41eb2aa346e4457cf Signed-off-by: Amar Tumballi <[email protected]>
rpic4:~# uname -a
Linux rpic4 5.15.4-0-rpi4 #1-Alpine SMP PREEMPT Mon Nov 22 10:43:31 UTC 2021 aarch64 GNU/Linux
rpic4:~# gluster peer status
Number of Peers: 3
Hostname: rpic2
Uuid: 2d5904f3-3dfe-47a8-b293-b373349721de
State: Peer in Cluster (Connected)
Hostname: rpic1
Uuid: 5e3b90cf-7fb0-4340-b09f-ebee503f0e95
State: Peer in Cluster (Connected)
Hostname: rpic3
Uuid: d2c27958-88de-4447-bc87-ba1eeaa88b4c
State: Peer in Cluster (Connected)
rpic4:~# gluster volume info
Volume Name: gluster1
Type: Replicate
Volume ID: 1e98d5ff-f28a-47b3-8ad0-64c2633055da
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 4 = 4
Transport-type: tcp
Bricks:
Brick1: rpic1:/cluster/gluster1/brick1/volume
Brick2: rpic2:/cluster/gluster1/brick2/volume
Brick3: rpic3:/cluster/gluster1/brick3/volume
Brick4: rpic4:/cluster/gluster1/brick4/volume
Options Reconfigured:
cluster.granular-entry-heal: on
storage.fips-mode-rchecksum: on
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
rpic4:~# gcc -dumpmachine
aarch64-alpine-linux-musl |
Thank you for your contributions. |
bump |
Thank you for your contributions. |
😞 |
Any info about this? |
@amarts We are doing a triage of the bugs that we are going to fix. Do you have bandwidth to work on this? Otherwise we can go ahead and close it. If you have partial solution somewhere, please publish it, so that we can refer to this in the future if we want to pick it up. |
No bandwidth. Will close. |
Prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen tcmalloc \ tcmalloc-minimal flex bison openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev sudo ln -s /usr/lib/libtcmalloc.so.4 \ /usr/lib/libtcmalloc.so sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 \ /usr/lib/libtcmalloc_minimal.so Fixes: gluster#268
Prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev Fixes: gluster#268
Prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev Fixes: gluster#268
Prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev Fixes: gluster#268
I see that @kohlschuetter is working on this issue and sent PR for the same. Re-opening the issue. |
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: ./configure CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" \ --build=${CBUILD} \ --host=${CHOST} \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: gluster#268
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" CFLAGS="$CFLAGS -DSTAT_COMMAND=\\\"/bin/stat\\\"" ./configure CFLAGS="${CFLAGS}" \ --build="${CBUILD}" \ --host="${CHOST}" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: gluster#268
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" CFLAGS="$CFLAGS -DSTAT_COMMAND=\\\"/bin/stat\\\"" ./configure CFLAGS="${CFLAGS}" \ --build="${CBUILD}" \ --host="${CHOST}" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: gluster#268
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" CFLAGS="$CFLAGS -DSTAT_COMMAND=\\\"/bin/stat\\\"" ./configure CFLAGS="${CFLAGS}" \ --build="${CBUILD}" \ --host="${CHOST}" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: gluster#268
The code in the above PR works just fine to build on/run with Alpine Linux 3.21, and I hope it can get merged soon. I also have a working ABUILD/apk binaries for x86_64, which I'm trying to push to the Alpine Linux community repo at some point in the near future (this will require some sort of "release tarball", which I'm currently hosting on my own forked repo). |
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" CFLAGS="$CFLAGS -DSTAT_COMMAND=\\\"/bin/stat\\\"" ./configure CFLAGS="${CFLAGS}" \ --build="${CBUILD}" \ --host="${CHOST}" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: gluster#268
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" CFLAGS="$CFLAGS -DSTAT_COMMAND=\\\"/bin/stat\\\"" ./configure CFLAGS="${CFLAGS}" \ --build="${CBUILD}" \ --host="${CHOST}" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: gluster#268
Build prerequisites: sudo apk add alpine-sdk autoconf automake libtool rpcgen flex bison \ gperftools-dev tcmalloc-minimal openssl-dev util-linux-dev acl-dev \ zlib-dev libxml2-dev argp-standalone liburing-dev linux-headers \ userspace-rcu-dev libucontext-dev libtirpc-dev libbsd-dev bash Runtime prerequisites: sudo apk add attr py3-requests py3-prettytable xfsprogs-extra Build with: CFLAGS="-DZFS_COMMAND=\\\"/usr/sbin/zfs\\\"" CFLAGS="$CFLAGS -DSTAT_COMMAND=\\\"/bin/stat\\\"" ./configure CFLAGS="${CFLAGS}" \ --build="${CBUILD}" \ --host="${CHOST}" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --disable-fusermount Fixes: #268
Hi,
Alpine Linux use the musl library instead of the glibc.
Is it possible to make a musl compatible version of glusterfs ?
It would be awesome to have glusterfs in alpine linux.
The text was updated successfully, but these errors were encountered: