[Gluster-users] Compile xlator separately

Kaushal M kshlmster at gmail.com
Mon Jan 30 09:40:44 UTC 2017


On Thu, Jan 26, 2017 at 9:20 PM, David Spisla <david.spisla at iternity.com>
wrote:

> Hello Gluster Community,
>
>
>
> I want to make some small changes to the read-only xlator. For this I want
> to re-compile the .so-file separately.
>
> I use the source from gluster 3.8.8 and the makefile according to this
> tutorial:
>
>
>
> https://github.com/gluster/glusterfs/blob/master/doc/
> developer-guide/translator-development.md#this-time-for-real
>
>
>
> But this tutorial seems to be obsolet because I did some small changes to
> re-compile the read-only.so. This ist my makefile:
>
>
>
> # Change these to match your source code.
>
> TARGET  = read-only.so
>
> OBJECTS = read-only.o
>
>
>
> # Change these to match your environment.
>
> GLFS_SRC = /srv/glusterfs-3.8.8
>
> GLFS_LIB = /usr/lib64
>
> HOST_OS  = GF_LINUX_HOST_OS
>
>
>
> # You shouldn't need to change anything below here.
>
>
>
> CFLAGS  = -fPIC -Wall -O0 -g \
>
>       -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
>
>       -D$(HOST_OS) -I$(GLFS_SRC) -I$(GLFS_SRC)/contrib/uuid \
>
>       -I$(GLFS_SRC)/libglusterfs/src
>
> LDFLAGS = -shared -nostartfiles -L$(GLFS_LIB)
>
> LIBS = -lpthread
>
>
>
> $(TARGET): $(OBJECTS)
>
>         $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
>
>
>
>
>
> You see I removed the –lglusterfs from LIBS, because the compiler can not
> find this library. Is there another path actually?
>
> I also removed the first $(OBJECTS), because the compiler give me error
> messages.
>
>
>
> What is the best way to compile a xlator manually?
>

Wouldn't doing `make -C xlators/features/read-only` suffice for you?


>
>
> One more question: Does glusterd bind those feature-xlators dynamically to
> one volume? Because in the volfiles I can not see an entry for them.
>

For a translator to become part of the volume graph, it needs to be added
in glusterd's volgen code. Once this is done, glusterd will add the
translator to volumes when required.
Glusterd right now cannot dynamically pick up any translator and add it to
a volume graph. We are working on glusterd2, the next version of glusterd,
which will be able to dynamically pick up and insert translators in to a
volume graph.


>
> Thank you for your attention!
>
>
>
> *David Spisla*
>
> Software Developer
>
> david.spisla at iTernity.com
>
> www.iTernity.com <http://www.iternity.com/>
>
> Tel:       +49 761-590 34 841 <+49%20761%2059034841>
>
>
>
> [image: cid:image001.png at 01D239C7.FDF7B430]
>
>
>
> iTernity GmbH
> Heinrich-von-Stephan-Str. 21
> 79100 Freiburg – Germany
> ---
> unseren technischen Support erreichen Sie unter +49 761-387 36 66
> <+49%20761%203873666>
> ---
>
> Geschäftsführer: Ralf Steinemann
> Eingetragen beim Amtsgericht Freiburg: HRB-Nr. 701332
> USt.Id de-24266431
>
>
>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170130/5d9f6a79/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 6299 bytes
Desc: not available
URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170130/5d9f6a79/attachment.png>


More information about the Gluster-users mailing list