bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash-3.0 build and install problems


From: Peter Breitenlohner
Subject: bash-3.0 build and install problems
Date: Mon, 13 Sep 2004 19:11:10 +0200 (CEST)


Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H  -I.  -I../bash-3.0 -I../bash-3.0/include -I../bash-3.0/lib   
-O2
uname output: Linux pcl321 2.4.25 #2 SMP Thu Apr 1 13:55:52 CEST 2004 i686 
unknown unknown GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 0
Release Status: release

Description:

1. when building outside the sorce tree "make install" fails to install
bash.info

2. when building (configuring) with "--disable-nls" there are many many many
gcc warnings of the types
        warning: assignment discards qualifiers from pointer target type
        warning: return discards qualifiers from pointer target type
        warning: passing arg...discards qualifiers from pointer target type
All (or almost all) of them are caused by the definition of gettext in
include/gettext.h:
        # define gettext(Msgid) ((const char *) (Msgid))

Repeat-By:

1. configure outside the source tree and run "make;make install"

2. configure with "--diable-nls" and run "make"

Fix:

1. Apply this patch:

diff -ur bash-3.0.orig/doc/Makefile.in bash-3.0/doc/Makefile.in
--- bash-3.0.orig/doc/Makefile.in       2004-07-27 14:57:48.000000000 +0200
+++ bash-3.0/doc/Makefile.in    2004-09-13 18:18:26.000000000 +0200
@@ -225,7 +225,7 @@
        -$(INSTALL_DATA) $(srcdir)/bashbug.1 
$(DESTDIR)$(man1dir)/bashbug${man1ext}
 # uncomment the next line to install the builtins man page
 #      -$(INSTALL_DATA) $(srcdir)/builtins.1 
$(DESTDIR)$(man1dir)/bash_builtins${man1ext}
-       -$(INSTALL_DATA) $(srcdir)/bash.info $(DESTDIR)$(infodir)/bash.info
+       -$(INSTALL_DATA) bash.info $(DESTDIR)$(infodir)/bash.info
 # run install-info if it is present to update the info directory
        if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
                install-info --dir-file=$(DESTDIR)$(infodir)/dir 
$(DESTDIR)$(infodir)/bash.info; \

2. That's more tricky. A quick and dirty way would be to define
        # define gettext(Msgid) Msgid
That should do because as far as I have seen Msgid is always either
a string literal or a (const or non-const?) string variable.

I do, however, suppose you don't want to modify include/gettext.h or even
can't do so.

Then the hard and painful way is to carefully make all the relevant
variables constant strings. This might not be entirely trivial and I didn't
attempt to do so.

BTW: Should'nt the getext function be declared "const char * gettext(...)"
or does it really return a COPY of the string?

regards
Peter Breitenlohner <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]