Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 10047  / 1 Year ago, thu, may 11, 2023, 1:41:35

I'm trying to install glib-2.37.6 (also same problem with glib-2.32.1) and getting this error during configuration:




You must have either have gettext support in your C library, or use the
GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html




I previously built gettext, though. To clarify, I'm trying to build a number of things (leading up to gtk+) without actually installing in the usual places, since this is a machine others use; instead, I'm using --prefix= to put everything in a work directory under my home directory.



I tried looking at the logs to see if I could get a clue about whether I needed to set anything else. I also tried looking at the configure script, although I'm not an expert on autoconf. What I found was that the error occurred because gt_cv_have_gettext wasn't set to yes. So then I looked for where it was supposed to get set, so that I could tell what file or whatever it was checking for. But unless I'm missing something, the only command that would set it to yes is underneath this if:



  if test "$gt_cv_func_dgettext_libc" != "yes" 
|| test "$gt_cv_func_ngettext_libc" != "yes"
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then


The config.log (looking at the configure line numbers) indicates that the condition was false, so everything inside (including the command to set gt_cv_have_gettext) was skipped. But the test seems to check that none of three things are missing. And none of them are; here's one of the last segments of config.log right before the error:



configure:7982: checking for ngettext in libc
configure:8000: gcc -o conftest -g -O2 conftest.c >&5
configure:8000: $? = 0
configure:8009: result: yes
configure:8013: checking for dgettext in libc
configure:8031: gcc -o conftest -g -O2 conftest.c >&5
configure:8031: $? = 0
configure:8040: result: yes
configure:8047: checking for bind_textdomain_codeset
configure:8047: gcc -o conftest -g -O2 conftest.c >&5
configure:8047: $? = 0
configure:8047: result: yes
configure:8323: checking for msgfmt


(The line that would set gt_cv_have_gettext is somewhere between 8047 and 8323.) So unless I'm missing something, it looks as though if all these three things--ngettext, dgettext, bind_textdomain_codeset--are present (or succeed, or something), then an error will result.



So what am I missing? Is there some other option that needs to be set, or something else wrong with my configuration? Or did I find an error in the configure script? Thanks for any help. I wanted to ask in a forum like this before submitting it as a bug report.


More From » glib

 Answers
7

OK, I think I figured it out. Since I was "installing" everything in a directory under my home directory, I needed to add the "bin" subdirectory of the --prefix directory to my $PATH before running configure. That made it find msgfmt and, I think, got it around the error.


[#29715] Thursday, May 11, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
izecaptur

Total Points: 113
Total Questions: 102
Total Answers: 114

Location: Northern Mariana Islands
Member since Fri, Jan 15, 2021
3 Years ago
;