emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
5.02k stars 326 forks source link

Docs says gettext is optional. How to disable it? #175

Closed mariano-dagostino closed 7 years ago

mariano-dagostino commented 7 years ago

Hi, Thanks for this amazing project.

I was able to compile fswatch in linux following debian instructions. However because gettext-dev package is not available I have to compile gettext manually and it takes a lot of time.

Since the use of gettext is optional, I was wondering if you could also document how to make this optional. Running /autogen.sh && ./configure && make && make install -j && ldconfig fails with the following message:

autoreconf: failed to run autopoint: No such file or directory
autoreconf: autopoint is needed because this package uses Gettext

Thanks!

emcrisostomo commented 7 years ago

Hi, thanks, it's appreciated.

You appear to be bootstrapping fswatch from sources, which is a completely different story. gettext in that case is not optional. I'll make it clearer in the documentation.

If you want to build fswatch as specified in the documentation, you should use a release tarball, not the sources from the repository. Excerpt of the documentation:

A user who wishes to build fswatch should get a release tarball. A release tarball contains everything a user needs to build fswatch on their system, following the instructions detailed in the Installation section below and the INSTALL file.

A developer who wishes to modify fswatch should get the sources (either from a source tarball or cloning the repository) and have the GNU Build System installed on their machine. Please read README.gnu-build-system to get further details about how to bootstrap fswatch from sources on your machine.

Getting a copy of the source repository is not recommended unless you are a developer, you have the GNU Build System installed on your machine, and you know how to bootstrap it on the sources.

mariano-dagostino commented 7 years ago

Thanks for the quick response. Well, turns out it is actually optional :) I figure out how to do this:

apt-get install autopoint This fix my earlier issue.

And then, like is documented in gettext.h we can use --disable-nls

./autogen.sh && ./configure --disable-nls && make && make install -j

What do you think @emcrisostomo ?

emcrisostomo commented 7 years ago

No, it's not optional. Actually it's slightly more complicated. autopoint is part of GNU gettext, to which I loosely refer to as part of the GNU Build System. In your system packagers have decided to make autopoint available in a separate package. Up to, and included ubunt 10, there was no separate autopoint package, and you would have had to install the full gettext package.

Now, what I think:

mariano-dagostino commented 7 years ago

No, it's not optional. Actually it's slightly more complicated. autopoint is part of GNU gettext, to which I loosely refer to as part of the GNU Build System. In your system packagers have decided to make autopoint available in a separate package.

Oh, I see. Interesting...

I think you shouldn't be building it like this unless you're a developer and want to change it. Why go through the hassle? Release tarballs contain identical source files.

Thanks for the advice. I don't see the reason to build from master. Makes sense. However, I don't really see how this will be different from what I'm doing. Release tarbarls are just tags of the repo isn't? or I'm missing something.

If you're a developer, why worry about gettext and trim it away?

So the reason to worry about gettext is it adds a lot of dependencies just to enable translations. We are using this package in a docker container to watch for file changes and as I said in the issue description, compiling gettext (since gettext-dev is not available as a package). We don't really care about translations (I speak spanish but I don't really care)

So, based on what you said. If building from sources (or from a release tarbal) gettext is not optional, could you make it optional? I mean, it seems not neccesary at all if you don't plan to have translated messages...

emcrisostomo commented 7 years ago

Hi,

I'll try to illustrate why it's important.

I understand we're used to think to releases as tags of master hence your assumptions. fswatch is built using the GNU Build System which uses additional (as in a lot of) files. When a release is created, the build system creates and packages everything you need to configure and build fswatch from sources. In the process, all the files used exclusively by the maintainer are removed and, as a consequence, gettext is no longer a dependency to build fswatch.

That's also why you don't see any configure script either in master. configure is created and shipped with the release tarball, and that's you're probably used to: configure-ing sources and make them.

mariano-dagostino commented 7 years ago

Thanks you very much @emcrisostomo all clear now.