Re: source builds vs. RPMs (was: Re: gettext 0.18 grumbles)
On Thu, Jun 03, 2010 at 10:04:28PM +0200, Bruno Haible wrote: > Let me repeat it: We have GNU standards that guarantee you that > ./configure > make > make install > must work everywhere. This *is* the "easy install" that anyone must be > able to use. > > Why did you choose to ignore the contents of the INSTALL file and go > searching for a distribution specific spec file instead? I'd like to > know. The 'buildballs' project is attempting to address issues like this. I think it's fairly obvious why I'd want to build an RPM on an RPM-based distribution, rather than having two conflicting gettext versions installed, one unrecognized by the packaging system. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Re: gettext 0.18 grumbles
On Thu, Jun 03, 2010 at 02:29:44PM -0600, Eric Blake wrote: > On 06/03/2010 12:59 PM, Jim Meyering wrote: > > Richard W.M. Jones wrote: > >> I just updated gnulib in libguestfs. This pulls in gettext 0.18 -- I > >> don't directly depend on the gettext module in gnulib, but doubtless > >> it's being pulled in as a dependency of something. > >> > >> There's no gettext 0.18 in Fedora, even in Rawhide, and it seems > >> non-trivial to build. > > > > It built fine for me on Rawhide a few weeks ago. > > What went wrong for you? > > It built fine for me, but only after I installed the rcs package (which > is not present by default). Perhaps this is the issue that Richard was > encountering with the proper archive.tar.gz files not being created? This didn't help ... archive.tar.gz is still missing. I don't know what that file is used for and whether it's important. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Re: source builds vs. RPMs
Hi Richard, > > Why did you choose to ignore the contents of the INSTALL file and go > > searching for a distribution specific spec file instead? I'd like to > > know. The 'buildballs' project is attempting to address issues like this. > > I think it's fairly obvious why I'd want to build an RPM on an > RPM-based distribution, rather than having two conflicting gettext > versions installed, one unrecognized by the packaging system. Thanks for answering. We're getting closer to the point. There is no conflict between a gettext installed by the system and a gettext installed by yourself. I have, for example, 26 versions of GCC installed on my system, 5 versions of emacs, and so on. Where does the thinking come from that "there must be only one instance of every package"? From Microsoft Windows? Where does the thinking come from that it is bad to have something not recognized by the package system? This is important, because the GNU system is about bringing YOU, the user, the freedom to install anything you want, with any modifications that you want. If there are memes floating around that make it seem an unattainable or undesirable goal, we need to know about it. Bruno
Re: source builds vs. RPMs
On Fri, Jun 04, 2010 at 11:05:56AM +0200, Bruno Haible wrote: > Where does the thinking come from that "there must be only one instance > of every package"? From Microsoft Windows? I've hardly ever used MS Windows, but I do know they have no packaging system to speak of and often install multiple, sometimes out of date versions of libraries and so on. My experience of the goodness of packaging systems comes from my use of OSes like Minix and FreeBSD which don't have good (or any) packaging systems, and require complete reinstallation after a short period of time once the layers of cruft from multiple 'make install' commands have built up. > Where does the thinking come from that it is bad to have something not > recognized by the package system? The packaging system manages security updates, that's one very big reason. > This is important, because the GNU system is about bringing YOU, the user, > the freedom to install anything you want, with any modifications that > you want. If there are memes floating around that make it seem an > unattainable or undesirable goal, we need to know about it. Don't push this into a debate about Freedom. Just because I can do anything I want with my computer doesn't mean I don't appreciate having (Free) tools to help manage it sanely. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
./getopt.h:195: error: redefinition of 'struct option'
make[4]: Entering directory `/home/rjones/d/libguestfs/gnulib/lib' CC xstrtol.lo In file included from xstrtol.h:23, from xstrtol.c:32: ./getopt.h:195: error: redefinition of 'struct option' In file included from xstrtol.h:23, from xstrtol.c:32: ./getopt.h:241: error: conflicting types for 'getopt_long' /usr/include/getopt.h:175: note: previous declaration of 'getopt_long' was here ./getopt.h:245: error: conflicting types for 'getopt_long_only' /usr/include/getopt.h:179: note: previous declaration of 'getopt_long_only' was here make[4]: *** [xstrtol.lo] Error 1 This is a very bizarre error because I have two machines: - identical libguestfs from git - identical gnulib submodule (74d509383fe30bb5511) - identical glibc (glibc-2.12.90-2) The only difference is that one machine is i686 -- it fails on this machine. The other machine is x86_64 and it compiles fine. 'struct option' declaration is completely identical between glibc and gnulib. 'getopt_long' and 'getopt_long_only' are slightly different (see the additional _GL_ARG_NONNULL and possibly in whatever __getopt_argv_const expands to). In glibc: #ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; #endif In gnulib: #ifndef __need_getopt extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW _GL_ARG_NONNULL ((2, 3)); #endif Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
Re: ./getopt.h:195: error: redefinition of 'struct option'
Hi Richard, Last time we saw this error message, it was due to a wrong config.h. Richard W.M. Jones wrote: > make[4]: Entering directory `/home/rjones/d/libguestfs/gnulib/lib' > CC xstrtol.lo Can you show the complete command line? ("make V=1" will show it.) > In file included from xstrtol.h:23, > from xstrtol.c:32: > ./getopt.h:195: error: redefinition of 'struct option' Next, you need to show 1) grep GETOPT config.status 2) the contents of config.h 3) if the first two don't help, also the output of the complete command line, without -c and -o options, but with -E and -dD options instead. Bruno
check-news target fails if NEWS file starts with a copyright header
Hi, the NEWS file of the GNU Autoconf Archive begins with a copyright header. As a result, the check-news target fails, because the output of "head ./NEWS" doesn't contain the release line that target is looking for. I have worked around the problem by patching maint.mk as follows: sed -i -e 's,head $(srcdir)/NEWS,head -n 20 $(srcdir)/NEWS,' maint.mk Maybe it's worthwhile to change that in the distribution, too? Take care Peter
Re: check-news target fails if NEWS file starts with a copyright header
Peter Simons wrote: > the NEWS file of the GNU Autoconf Archive begins with a copyright header. As a > result, the check-news target fails, because the output of "head ./NEWS" > doesn't contain the release line that target is looking for. > > I have worked around the problem by patching maint.mk as follows: > > sed -i -e 's,head $(srcdir)/NEWS,head -n 20 $(srcdir)/NEWS,' maint.mk > > Maybe it's worthwhile to change that in the distribution, too? You may want to put the copyright at the end of NEWS. Human readers prefer it that way, too ;-) Here's what I use: Copyright (C) 2001-2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the ``GNU Free Documentation License'' file as part of this distribution.
Re: ./getopt.h:195: error: redefinition of 'struct option'
On Fri, Jun 04, 2010 at 02:17:22PM +0200, Bruno Haible wrote: > Hi Richard, > > Last time we saw this error message, it was due to a wrong config.h. The results below are after 'rm config.h; ./configure ...; make clean' > Richard W.M. Jones wrote: > > make[4]: Entering directory `/home/rjones/d/libguestfs/gnulib/lib' > > CC xstrtol.lo > > Can you show the complete command line? ("make V=1" will show it.) make[4]: Entering directory `/home/rjones/d/libguestfs/gnulib/lib' depbase=`echo xstrtol.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT xstrtol.lo -MD -MP -MF $depbase.Tpo -c -o xstrtol.lo xstrtol.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT xstrtol.lo -MD -MP -MF .deps/xstrtol.Tpo -c xstrtol.c -fPIC -DPIC -o .libs/xstrtol.o In file included from xstrtol.h:23, from xstrtol.c:32: ./getopt.h:195: error: redefinition of 'struct option' [...] > > In file included from xstrtol.h:23, > > from xstrtol.c:32: > > ./getopt.h:195: error: redefinition of 'struct option' > > Next, you need to show > 1) grep GETOPT config.status $ grep GETOPT config.status S["GETOPT_H"]="" S["HAVE_GETOPT_H"]="1" S["NEXT_AS_FIRST_DIRECTIVE_GETOPT_H"]="" S["NEXT_GETOPT_H"]="" S["GNULIB_UNISTD_H_GETOPT"]="0" D["HAVE_GETOPT_H"]=" 1" D["HAVE_GETOPT_H"]=" 1" D["HAVE_GETOPT_LONG_ONLY"]=" 1" D["HAVE_DECL_GETOPT_CLIP"]=" 0" D["GNULIB_TEST_GETOPT_GNU"]=" 1" > 2) the contents of config.h Attached. > 3) if the first two don't help, also the output of the >complete command line, without -c and -o options, but with -E and -dD >options instead. gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT xstrtol.lo -MD -MP -MF .deps/xstrtol.Tpo -dD -E xstrtol.c -fPIC -DPIC > xstrtol-preproc.i http://www.annexia.org/tmp/xstrtol-preproc.i This shows: # 175 "/usr/include/getopt.h" 3 4 extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __attribute__ ((__nothrow__)); [...] extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); So the difference does seem to be down to the extra _GL_ARG_NONNULL attribute. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define if the compiler is building for multiple architectures of Apple platforms at once. */ /* #undef AA_APPLE_UNIVERSAL_BUILD */ /* Define to the number of bits in type 'ptrdiff_t'. */ /* #undef BITSIZEOF_PTRDIFF_T */ /* Define to the number of bits in type 'sig_atomic_t'. */ /* #undef BITSIZEOF_SIG_ATOMIC_T */ /* Define to the number of bits in type 'size_t'. */ /* #undef BITSIZEOF_SIZE_T */ /* Define to the number of bits in type 'wchar_t'. */ /* #undef BITSIZEOF_WCHAR_T */ /* Define to the number of bits in type 'wint_t'. */ /* #undef BITSIZEOF_WINT_T */ /* Define to 1 if chown fails to change ctime when at least one argument was not -1. */ /* #undef CHOWN_CHANGE_TIME_BUG */ /* Define if chown is not POSIX compliant regarding IDs of -1. */ /* #undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE */ /* Define if chown modifies symlinks. */ /* #undef CHOWN_MODIFIES_SYMLINK */ /* Define to 1 if chown mishandles trailing slash. */ /* #undef CHOWN_TRAILING_SLASH_BUG */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* the name of the file descriptor member of DIR */ /* #undef DIR_FD_MEMBER_NAME */ #ifdef DIR_FD_MEMBER_NAME # define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) #else # define DIR_TO_FD(Dir_p) -1 #endif /* Define to 1 if // is a file system root distinct from /. */ /* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ /* Default drive interface. */ #define DRIVE_IF "virtio" /* Define if struct dirent has a member d_ino that actually works. */ #define D_INO_IN_DIRENT 1 /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 /* Enable packet dumps in verbose mode. */ /* #undef ENABLE_PACKET_DUMP */ /* Define to 1 if your platform has fchownat, but it can
Re: ./getopt.h:195: error: redefinition of 'struct option'
Richard W.M. Jones wrote: > /bin/sh ../../libtool --tag=CC --mode=compile gcc -std=gnu99 > -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT xstrtol.lo -MD -MP -MF > $depbase.Tpo -c -o xstrtol.lo xstrtol.c &&\ This command line is line. > > 2) the contents of config.h > > Attached. Fine as well. > > 1) grep GETOPT config.status > > $ grep GETOPT config.status > S["GETOPT_H"]="" So, gnulib has determined that it does not need to use its own 'getopt.h' replacement. > gcc -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT xstrtol.lo > -MD -MP -MF .deps/xstrtol.Tpo -dD -E xstrtol.c -fPIC -DPIC > > xstrtol-preproc.i > > http://www.annexia.org/tmp/xstrtol-preproc.i This contains: # 106 "/usr/include/getopt.h" 3 4 struct option { const char *name; int has_arg; int *flag; int val; }; and # 194 "./getopt.h" 3 struct option { const char *name; int has_arg; int *flag; int val; }; The first one is fine. The second one should not be there. Conclusion: You had a getopt.h that was necessary for one platform, and you transported it to another platform where it is not needed. You need to do "make distclean" before copying code to another platform, or reconfiguring under different conditions. Or build in separate directories (VPATH builds), if you prefer that. > The results below are after 'rm config.h; ./configure ...; make clean' It's good habit to always do "make -k distclean" before reconfiguring. Bruno
Re: ./getopt.h:195: error: redefinition of 'struct option'
On Fri, Jun 04, 2010 at 03:16:38PM +0200, Bruno Haible wrote: > The first one is fine. The second one should not be there. Yes, I see now that gnulib/lib/getopt.h is present on the machine which fails and absent on the other one. > Conclusion: You had a getopt.h that was necessary for one platform, and you > transported it to another platform where it is not needed. Obviously I wouldn't have done that, but I'll see if make distclean will fix it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
Re: ./getopt.h:195: error: redefinition of 'struct option'
On 06/04/2010 08:05 AM, Richard W.M. Jones wrote: > > On Fri, Jun 04, 2010 at 03:16:38PM +0200, Bruno Haible wrote: >> The first one is fine. The second one should not be there. > > Yes, I see now that gnulib/lib/getopt.h is present on the machine > which fails and absent on the other one. > >> Conclusion: You had a getopt.h that was necessary for one platform, and you >> transported it to another platform where it is not needed. > > Obviously I wouldn't have done that, but I'll see if make distclean > will fix it. Meanwhile, gnulib could help the situation, by splitting a portion of the current getopt{,-gnu} module out into a new header getopt-h that guarantees a valid getopt.h wrapper even for glibc, allowing us to implement GNULIB_POSIXCHECK semantics. It's not my highest priority, but I might be able to help with that task. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
Re: ./getopt.h:195: error: redefinition of 'struct option'
Indeed 'make distclean' does fix this. Sorry for the noise .. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
havelib module: '+' in library names
Hello everyone, the havelib module cannot handle library names that contain the '+' character, such as libGraphicsMagick++.so. The attached patch fixes this for me, but I'm not sure if any special quoting or escaping of '+' is necessary. Martin diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index c73bd8e..376ebc3 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 @@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([Name],[translit([$1],[./-+], [])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-+], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" @@ -58,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([Name],[translit([$1],[./-+], [])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-+], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. @@ -157,13 +157,13 @@ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-+], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-+], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) popdef([PACKUP]) @@ -178,11 +178,11 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-+], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-+], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) @@ -242,7 +242,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. -uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` +uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-+|ABCDEFGHIJKLMNOPQRSTUVWXYZ|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then
Re: source builds vs. RPMs
On Friday, June 04, 2010 05:05:56 Bruno Haible wrote: > Where does the thinking come from that it is bad to have something not > recognized by the package system? because it is bad. i rarely install packages onto my system anymore without a way of tracking them via my PM. if i do, i leverage DISTDIR first, and cherry pick what i want into /usr/local. packages install way too much cruft that changes over versions to sanely track without a PM, and `make uninstall` is way too inconsistent and "helpful" to even think about trusting. as for sticking things in /usr/local vs /usr, having different versions simultaneously with most packages just breaks things. -mike signature.asc Description: This is a digitally signed message part.
Re: check-news target fails if NEWS file starts with a copyright header
Hi Jim, Peter, * Jim Meyering wrote on Fri, Jun 04, 2010 at 02:40:20PM CEST: > > You may want to put the copyright at the end of NEWS. > Human readers prefer it that way, too ;-) > > Here's what I use: > > > Copyright (C) 2001-2010 Free Software Foundation, Inc. > > Permission is granted to copy, distribute and/or modify this document > under the terms of the GNU Free Documentation License, Version 1.3 or > any later version published by the Free Software Foundation; with no > Invariant Sections, with no Front-Cover Texts, and with no Back-Cover > Texts. A copy of the license is included in the ``GNU Free > Documentation License'' file as part of this distribution. A while ago, Karl encouraged GNU maintainers to just license files like NEWS, ChangeLog, TODO, and similar (but maybe not THANKS) under an all-permissive license. I think that is a good example to follow (autoconf/NEWS): Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Cheers, Ralf
Re: havelib module: '+' in library names
On 06/04/2010 11:45 AM, Martin Lambers wrote: > Hello everyone, > > the havelib module cannot handle library names that contain the '+' > character, such as libGraphicsMagick++.so. > > The attached patch fixes this for me, but I'm not sure if any special > quoting or escaping of '+' is necessary. No, but while we're touching this, we might as well fix poor quoting and use preferred macro spellings: m4_pushdef([Name],m4_translit([[$1]],[./-+], [])) m4_pushdef([NAME],m4_translit([[$1]],[abcdefghijklmnopqrstuvwxyz./-+], [ABCDEFGHIJKLMNOPQRSTUVWXYZ])) -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
Re: check-news target fails if NEWS file starts with a copyright header
A while ago, Karl encouraged GNU maintainers to just license files like Well, more precisely, I attempted to clarify rms' recommendation which has been the intention since the early days of GNU. I don't make policy decisions like this myself :). However, I don't see any particular problem with using the no-invariant-GFDL, or with putting the copyright at the end of NEWS, if that's a maintainer's preference. However however, I also see no harm in looking at the first 20 lines instead of the first 10 lines to match the version. My $0.2 :). karl
Re: check-news target fails if NEWS file starts with a copyright header
Karl Berry wrote: > A while ago, Karl encouraged GNU maintainers to just license files like > > Well, more precisely, I attempted to clarify rms' recommendation which > has been the intention since the early days of GNU. I don't make policy > decisions like this myself :). > > However, I don't see any particular problem with using the > no-invariant-GFDL, or with putting the copyright at the end of NEWS, if > that's a maintainer's preference. > > However however, I also see no harm in looking at the first 20 lines > instead of the first 10 lines to match the version. Looking at the first 20 lines was not an option for me when I wrote that, because it would be more likely to hit a false-positive match. These days it's less of a problem -- assuming you use the default regexp, since it is so tight -- but early regexps matched only the version string, with no anchor or date. Since the regexp is customizable via cfg.mk, extending the range would carry a small risk for those who customize it with a weaker regexp.
gettext: update to 0.18.1
gettext 0.18.1 was released today. This patch upgrades the gnulib module. The macros are already up-to-date (only iconv.m4 changed). 2010-06-04 Bruno Haible Update to GNU gettext 0.18.1. * modules/gettext (configure.ac): Require gettext infrastructure from version 0.18.1. --- modules/gettext.origSat Jun 5 01:59:49 2010 +++ modules/gettext Sat Jun 5 01:24:48 2010 @@ -39,7 +39,7 @@ configure.ac: AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.18]) +AM_GNU_GETTEXT_VERSION([0.18.1]) Makefile.am: # This is for those projects which use "gettextize --intl" to put a source-code
Re: havelib module: '+' in library names
Hello Martin, > the havelib module cannot handle library names that contain the '+' > character, such as libGraphicsMagick++.so. > > The attached patch fixes this for me Thanks, I'm applying it with a minor tweak: Leave the '-' the last character. While for m4_translit and sed it does not matter where the '-' is, for 'tr' it matters. It saves me a few brain cycles to use the same style as for 'tr' also in m4_translit and sed invocations. Bruno 2010-06-04 Martin Lambers Bruno Haible havelib: Allow library names with '+' characters. * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS, AC_LIB_FROMPACKAGE, AC_LIB_LINKFLAGS_BODY): Convert '+' in name to '_'. --- m4/lib-link.m4.orig Sat Jun 5 03:25:50 2010 +++ m4/lib-link.m4 Sat Jun 5 03:23:32 2010 @@ -1,4 +1,4 @@ -# lib-link.m4 serial 21 (gettext-0.18) +# lib-link.m4 serial 22 (gettext-0.18.2) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,9 +18,9 @@ [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([Name],[translit([$1],[./+-], [])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" @@ -58,9 +58,9 @@ [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./-], [___])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([Name],[translit([$1],[./+-], [])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. @@ -157,13 +157,13 @@ dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) popdef([PACKUP]) @@ -178,11 +178,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], +[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) @@ -242,7 +242,7 @@ names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. -uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` +uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then
Re: havelib module: '+' in library names
On 06/04/2010 07:29 PM, Bruno Haible wrote: > Hello Martin, > >> the havelib module cannot handle library names that contain the '+' >> character, such as libGraphicsMagick++.so. >> >> The attached patch fixes this for me > > Thanks, I'm applying it with a minor tweak: Leave the '-' the last > character. While for m4_translit and sed it does not matter where the > '-' is, for 'tr' it matters. It saves me a few brain cycles to use > the same style as for 'tr' also in m4_translit and sed invocations. Actually, for m4, it DOES matter, and - must be at the beginning or the end unless you want a range. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
Re: havelib module: '+' in library names
Eric Blake wrote: > we might as well fix poor quoting and use preferred macro spellings: > > m4_pushdef([Name],m4_translit([[$1]],[./-+], [])) > m4_pushdef([NAME],m4_translit([[$1]],[abcdefghijklmnopqrstuvwxyz./-+], > [ABCDEFGHIJKLMNOPQRSTUVWXYZ])) OK for m4_translit. Done through the attached patch. Regarding the quoting: Each change requires explicit testing: 1. determine the maximum number of brackets that yields a working configure, 2. try to add m4_define([foo], [undesired substitution]) and see whether the expansion is picked up or not. As it's low priority, I'm not doing it now. But I'll keep the technique in mind. Bruno 2010-06-04 Bruno Haible Prefer documented low-level autoconf macro names. * m4/lib-link.m4: Use m4_translit instead of translit. * m4/environ.m4: Likewise. * m4/mathfunc.m4: Likewise. * m4/onceonly.m4: Likewise. * m4/stdint.m4: Likewise. Suggested by Eric Blake. --- m4/environ.m4.orig Sat Jun 5 03:38:17 2010 +++ m4/environ.m4 Sat Jun 5 03:36:21 2010 @@ -1,4 +1,4 @@ -# environ.m4 serial 3 +# environ.m4 serial 4 dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -29,7 +29,7 @@ gt_cv_var=yes)]) AC_MSG_RESULT([$gt_cv_var]) if test $gt_cv_var = yes; then -AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1, +AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, [Define if you have the declaration of $2.]) fi undefine([gt_cv_var]) --- m4/lib-link.m4.orig Sat Jun 5 03:38:17 2010 +++ m4/lib-link.m4 Sat Jun 5 03:34:17 2010 @@ -1,4 +1,4 @@ -# lib-link.m4 serial 22 (gettext-0.18.2) +# lib-link.m4 serial 23 (gettext-0.18.2) dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,9 +18,9 @@ [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./+-], [])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + pushdef([Name],[m4_translit([$1],[./+-], [])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" @@ -58,9 +58,9 @@ [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[translit([$1],[./+-], [])]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + pushdef([Name],[m4_translit([$1],[./+-], [])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. @@ -157,13 +157,13 @@ dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) popdef([PACKUP]) @@ -178,14 +178,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], -[ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP,
Re: strcoll on Solaris
Eric Blake wrote: > And in the meantime, now that we've confirmed that it is a Solaris > strcoll() bug, it would be nice to code a gnulib workaround. As expected, this code reproduces it: === #include #include #include #include int main () { static char input1[] = "\360\222\203\276\360\222\205\226"; /* U+120FE U+12156 */ static char input2[] = "\360\222\200\255\360\222\213\253\360\222\213\253\360\222\200\255"; /* U+1202D U+122EB U+122EB U+1202D */ int ret; setlocale (LC_ALL, ""); errno = 0; ret = strcoll (input1, input2); printf ("ret = %d, errno = %d%s\n", ret, errno, errno == EILSEQ ? " = EILSEQ" : ""); ret = strcoll (input2, input1); printf ("ret = %d, errno = %d%s\n", ret, errno, errno == EILSEQ ? " = EILSEQ" : ""); return 0; } === When run in an en_US.UTF-8 locale, this yields $ LC_ALL=en_US.UTF-8 ./a.out ret = 3, errno = 88 = EILSEQ ret = -3, errno = 88 = EILSEQ The next program prints the ranges of Unicode characters for which strcoll returns an error. = #include #include #include #include int main () { static char input2[] = "a"; int uc; int interval_start; setlocale (LC_ALL, ""); interval_start = -1; for (uc = 0x1; uc < 0x11; uc++) { char input1[5]; input1[0] = 0xf0 | (uc >> 18); input1[1] = 0x80 | ((uc >> 12) & 0x3f); input1[2] = 0x80 | ((uc >> 6) & 0x3f); input1[3] = 0x80 | (uc & 0x3f); input1[4] = 0; errno = 0; strcoll (input1, input2); if (errno) { /* Failed */ if (interval_start < 0) interval_start = uc; } else { /* Succeeded */ if (interval_start >= 0) { printf("U+%04X..U+%04X\n", interval_start, uc-1); interval_start = -1; } } } if (interval_start >= 0) { printf("U+%04X..U+%04X\n", interval_start, uc-1); interval_start = -1; } return 0; } = It prints: U+10200..U+102FF U+10500..U+107FF U+10900..U+1CFFF U+1D200..U+1D2FF U+1D800..U+1 U+2A700..U+2F7FF U+2FB00..U+D U+E0200..U+E In other words, the Solaris strcoll recognizes non-BMP characters only from the following ranges: range| introduced in --+-- U+1..U+10200 | Unicode 4.0 U+10300..U+104FF | Unicode 3.1 U+10800..U+108FF | Unicode 4.0 U+1D000..U+1D1FF | Unicode 3.1 U+1D300..U+1D3FF | Unicode 4.0 U+1D400..U+1D7FF | Unicode 3.1 U+2..U+2A6FF | Unicode 3.1 U+2F800..U+2FAFF | Unicode 3.1 U+E..U+E01FF | Unicode 3.1 U+F..U+10 | Unicode 3.1 - So, you can see that - it's using Unicode 4.0, not a newer version. - it rejects unassigned Unicode characters, which is against the recommendation of the Unicode consortium. See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf section 3.1, 3.2, http://www.unicode.org/versions/Unicode5.2.0/ch05.pdf section 5.3. IMO, this is a "quality of implementation" issue. But POSIX specifies that strcoll can fail anyway [1]. So I think all callers of strcoll() should be able to deal with an EINVAL error. Adding handling for other errors, such as EILSEQ, is not hard then. I therefore don't think gnulib should replace strcoll() because of this. But it may be worth to introduce an xstrcoll() function that treats strings with invalid bytes or characters, sorting them at the end of the continuum, and comparing them with strcmp. (Similar to what lib/unistr/u-strcoll.h does, except that I just notice that this implementation is not entirely right.) [1] http://www.opengroup.org/onlinepubs/9699919799/functions/strcoll.html 2010-06-05 Bruno Haible * doc/posix-functions/strcoll.texi: Mention Solaris limitation. Reported by River Tarnell via Eric Blake. --- doc/posix-functions/strcoll.texi.orig Sat Jun 5 05:13:08 2010 +++ doc/posix-functions/strcoll.texiSat Jun 5 05:13:03 2010 @@ -12,4 +12,8 @@ Portability problems not fixed by Gnulib: @itemize +...@item +This function fails, setting @code{errno} to @code{EILSEQ}, on Solaris 10, in +UTF-8 locales, when at least one of the strings contains a Unicode character +in a block that was not assigned in Unicode 4.0. @end itemize
Re: ‘libunistring’ module errors
[ adding bug-automake ] Hi Bruno, * Bruno Haible wrote on Thu, Jun 03, 2010 at 02:01:29PM CEST: > > The reason is that 'aclocal' has generated an aclocal.m4 file that does not > include m4/libunistring.m4. I thought that 'aclocal' was using autom4te with > --trace options, implying that any AC_DEFUN or AC_DEFUN_ONCE invocation that > is correct from an m4 point of view is also seen by 'aclocal'. But this is > not the case: 'aclocal' actually has a first pass that scans the files using > 'grep', rather than autom4te. This pass fails to notice the AC_DEFUN or > AC_DEFUN_ONCE invocation if it is written in this way: > m4_version_prereq([2.64],[AC_DEFUN_ONCE],[AC_DEFUN])([gl_LIBUNISTRING], ...) > > This patch adds a workaround by using a syntax that is both m4-correct _and_ > matches the undocumented(!) syntax that 'aclocal' expects. Thanks for the analysis. I'm fairly sure aclocal does this out of necessity, i.e., it might lead to disaster if it were to trace an unknown, possibly conflicting set of macro files. (The other possibility why it was done this way is efficiency.) The macros which are essentially grepped are AC_DEFUN, AU_DEFUN, AC_DEFUN_ONCE, AU_ALIAS, AC_REQUIRE, m4_include, m4_sinclude, include, sinclude. This needs to be documented in the manual. I'm actually not sure whether it was an unintended error to let aclocal also match words only ending in the above, such as gl_iconv_AC_DEFUN so another way to get around that would be, I think, m4_version_prereq([2.64], [m4_pushdef([AC_DEFUN], m4_defn([AC_DEFUN_ONCE]))]) AC_DEFUN([AM_ICONV], ...) m4_popdef([AC_DEFUN]) Cheers, Ralf > 2010-06-03 Bruno Haible > > Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands. > * m4/iconv.m4 (gl_iconv_AC_DEFUN): New macro. > (AM_ICONV): Define it through gl_iconv_AC_DEFUN. > * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): New macro. > (gl_LIBUNISTRING): Define it through gl_libunistring_AC_DEFUN. > Reported by Ludovic Courtès .