I’m trying to compile enc2ly ( http://enc2ly.sourceforge.net/en/ ) on Windows using cygwin but it gives errors. When I type ./configure, the result is the following:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by GCC... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for error_at_line... yes
checking for memset... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating dok/Makefile
config.status: creating iloj/Makefile
config.status: creating kod/Makefile
config.status: creating enc2ly.spec
config.status: creating enc2ly.lsm
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
When I type make, it fails. I suspect that the problem is here:
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
So, what packages are missing? Or is it another thing? Thanks anyway.
———————-EDIT————————-
I used ./configure --disable-nls and it works. So the problem is really gettext.
checking for GNU gettext in libc... no
I already installed the gettext packages. Something missing? I have to fix this because the program main language is esperanto!
I’ve spent some time (probably too much) playing with this, and I’ve managed to get it to build.
On Ubuntu 12.04, it builds out of the
box.tar.gzfile with no problem, finding and using GNU gettext. On Cygwin, I get the same errors you do.One difference is that on Cygwin, a program that uses
gettextneeds to be linked with-lintl; on Ubuntu, it doesn’t (apparentlygettextis in the standard C library).After some messing around with the
configurescript, I came up with the following workarounds:First, set the environment variable
$LIBSto"-lintl"before invoking./configure.Second, it appears that the Ubuntu library, but not the Cygwin library, provides an undocumented symbol
_nl_domain_bindings, and the small test program generated byconfiguredepends on that symbol. So I hacked theconfigurescript, commenting out references to_nl_domain_bindingsin the generated C test program.Hacking
configureis not the right way to fix this problem; theconfigurescript is generated (before the sources are released) by other tools. You’d need someone familiar with GNU autoconf to come up with a better solution. Andconfigureshould be able to detect the need for the-lintloption on its own.And here’s something really strange: the only occurrence of
-lintlin the source tree is the following line inenc2ly-0.2/m4/gettext.m4:It’s modifying
$LIBSby removing any occurrence of-lintl. If there’s some commentary that explains this, it’s probably in Esperanto. (Never thought I’d say that except as a joke.)So I commented out that line, and it worked, generating an
enc2ly.exefile that at least prints a usage message if I invoke it with no arguments:Yes, that’s Esperanto; Google Translate translates it, not entirely successfully, to
I kept my
modificationsugly hacks in a local Git repository. Here’s the output ofgit diff:Grab
enc2ly-0.2.tar.gz, unpack it, apply the above changes (easy enough to do manually), set the environment variable$LIBSto-lintl, build and install normally, and you should be good to go.And you might want to contact the maintainers about this problem; I’m sure they’d like to implement a cleaner solution than this.