Hi,
Please cc me, I am not subscribed to bug.gnulib.
I intended to import canonicalize_file_name() to GNU gv, but started
with updating the existing getopt.
I am using CentOS 5.5. I cloned my repository via
$ git clone git://git.savannah.gnu.org/gv.git
did a
$ cd gv/gv
$ $PATH/to/gnulib/gnulib-tool --import
resp. "--update" (both with the same result).
Checked configure.ac and Makefile.am (every change I tried did not
change the result, so for reproducing, leave both as is).
ran
$ ./bootstrap
$ ./configure
4 make
and I got:
Making all in lib
make[1]: Entering directory `/dev/shm/1/gv/gv/lib'
rm -f arg-nonnull.h-t arg-nonnull.h && \
sed -n -e '/GL_ARG_NONNULL/,$p' \
< .././arg-nonnull.h \
> arg-nonnull.h-t && \
mv arg-nonnull.h-t arg-nonnull.h
rm -f c++defs.h-t c++defs.h && \
sed -n -e '/_GL_CXXDEFS/,$p' \
< .././c++defs.h \
> c++defs.h-t && \
mv c++defs.h-t c++defs.h
rm -f getopt.h-t getopt.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_GETOPT_H''@|1|g' \
-e 's|@''INCLUDE_NEXT''@|include_next|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC
system_header|g' \
-e 's|@''NEXT_GETOPT_H''@|<getopt.h>|g' \
-e '/definition of _GL_ARG_NONNULL/r arg-nonnull.h' \
< ./getopt.in.h; \
} > getopt.h-t && \
mv -f getopt.h-t getopt.h
rm -f warn-on-use.h-t warn-on-use.h && \
sed -n -e '/^.ifndef/,$p' \
< .././warn-on-use.h \
> warn-on-use.h-t && \
mv warn-on-use.h-t warn-on-use.h
rm -f unistd.h-t unistd.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_UNISTD_H''@|1|g' \
-e 's|@''INCLUDE_NEXT''@|include_next|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC
system_header|g' \
-e 's|@''NEXT_UNISTD_H''@|<unistd.h>|g' \
-e 's|@''GNULIB_CHOWN''@|0|g' \
-e 's|@''GNULIB_CLOSE''@|0|g' \
-e 's|@''GNULIB_DUP2''@|0|g' \
-e 's|@''GNULIB_DUP3''@|0|g' \
-e 's|@''GNULIB_ENVIRON''@|0|g' \
-e 's|@''GNULIB_EUIDACCESS''@|0|g' \
-e 's|@''GNULIB_FACCESSAT''@|0|g' \
-e 's|@''GNULIB_FCHDIR''@|0|g' \
-e 's|@''GNULIB_FCHOWNAT''@|0|g' \
-e 's|@''GNULIB_FSYNC''@|0|g' \
-e 's|@''GNULIB_FTRUNCATE''@|0|g' \
-e 's|@''GNULIB_GETCWD''@|0|g' \
-e 's|@''GNULIB_GETDOMAINNAME''@|0|g' \
-e 's|@''GNULIB_GETDTABLESIZE''@|0|g' \
-e 's|@''GNULIB_GETGROUPS''@|0|g' \
-e 's|@''GNULIB_GETHOSTNAME''@|0|g' \
-e 's|@''GNULIB_GETLOGIN''@|0|g' \
-e 's|@''GNULIB_GETLOGIN_R''@|0|g' \
-e 's|@''GNULIB_GETPAGESIZE''@|0|g' \
-e 's|@''GNULIB_GETUSERSHELL''@|0|g' \
-e 's|@''GNULIB_LCHOWN''@|0|g' \
-e 's|@''GNULIB_LINK''@|0|g' \
-e 's|@''GNULIB_LINKAT''@|0|g' \
-e 's|@''GNULIB_LSEEK''@|0|g' \
-e 's|@''GNULIB_PIPE2''@|0|g' \
-e 's|@''GNULIB_PREAD''@|0|g' \
-e 's|@''GNULIB_PWRITE''@|0|g' \
-e 's|@''GNULIB_READLINK''@|0|g' \
-e 's|@''GNULIB_READLINKAT''@|0|g' \
-e 's|@''GNULIB_RMDIR''@|0|g' \
-e 's|@''GNULIB_SLEEP''@|0|g' \
-e 's|@''GNULIB_SYMLINK''@|0|g' \
-e 's|@''GNULIB_SYMLINKAT''@|0|g' \
-e 's|@''GNULIB_TTYNAME_R''@|0|g' \
-e 's|@''GNULIB_UNISTD_H_GETOPT''@|1|g' \
-e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|0|g' \
-e 's|@''GNULIB_UNLINK''@|0|g' \
-e 's|@''GNULIB_UNLINKAT''@|0|g' \
-e 's|@''GNULIB_USLEEP''@|0|g' \
-e 's|@''GNULIB_WRITE''@|0|g' \
< ./unistd.in.h | \
sed -e 's|@''HAVE_CHOWN''@|1|g' \
-e 's|@''HAVE_DUP2''@|1|g' \
-e 's|@''HAVE_DUP3''@|1|g' \
-e 's|@''HAVE_EUIDACCESS''@|1|g' \
-e 's|@''HAVE_FACCESSAT''@|1|g' \
-e 's|@''HAVE_FCHDIR''@|1|g' \
-e 's|@''HAVE_FCHOWNAT''@|1|g' \
-e 's|@''HAVE_FSYNC''@|1|g' \
-e 's|@''HAVE_FTRUNCATE''@|1|g' \
-e 's|@''HAVE_GETDOMAINNAME''@|1|g' \
-e 's|@''HAVE_GETDTABLESIZE''@|1|g' \
-e 's|@''HAVE_GETGROUPS''@|1|g' \
-e 's|@''HAVE_GETHOSTNAME''@|1|g' \
-e 's|@''HAVE_GETLOGIN''@|1|g' \
-e 's|@''HAVE_GETPAGESIZE''@|1|g' \
-e 's|@''HAVE_LCHOWN''@|1|g' \
-e 's|@''HAVE_LINK''@|1|g' \
-e 's|@''HAVE_LINKAT''@|1|g' \
-e 's|@''HAVE_PIPE2''@|1|g' \
-e 's|@''HAVE_PREAD''@|1|g' \
-e 's|@''HAVE_PWRITE''@|1|g' \
-e 's|@''HAVE_READLINK''@|1|g' \
-e 's|@''HAVE_READLINKAT''@|1|g' \
-e 's|@''HAVE_SLEEP''@|1|g' \
-e 's|@''HAVE_SYMLINK''@|1|g' \
-e 's|@''HAVE_SYMLINKAT''@|1|g' \
-e 's|@''HAVE_TTYNAME_R''@|1|g' \
-e 's|@''HAVE_UNLINKAT''@|1|g' \
-e 's|@''HAVE_USLEEP''@|1|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|1|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|1|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|1|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|1|g' \
-e 's|@''HAVE_OS_H''@|0|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|0|g' \
-e 's|@''REPLACE_CHOWN''@|0|g' \
-e 's|@''REPLACE_CLOSE''@|0|g' \
-e 's|@''REPLACE_DUP''@|0|g' \
-e 's|@''REPLACE_DUP2''@|0|g' \
-e 's|@''REPLACE_FCHOWNAT''@|0|g' \
-e 's|@''REPLACE_GETCWD''@|0|g' \
-e 's|@''REPLACE_GETGROUPS''@|0|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|0|g' \
-e 's|@''REPLACE_LCHOWN''@|0|g' \
-e 's|@''REPLACE_LINK''@|0|g' \
-e 's|@''REPLACE_LINKAT''@|0|g' \
-e 's|@''REPLACE_LSEEK''@|0|g' \
-e 's|@''REPLACE_PREAD''@|0|g' \
-e 's|@''REPLACE_PWRITE''@|0|g' \
-e 's|@''REPLACE_READLINK''@|0|g' \
-e 's|@''REPLACE_RMDIR''@|0|g' \
-e 's|@''REPLACE_SLEEP''@|0|g' \
-e 's|@''REPLACE_SYMLINK''@|0|g' \
-e 's|@''REPLACE_TTYNAME_R''@|0|g' \
-e 's|@''REPLACE_UNLINK''@|0|g' \
-e 's|@''REPLACE_UNLINKAT''@|0|g' \
-e 's|@''REPLACE_USLEEP''@|0|g' \
-e 's|@''REPLACE_WRITE''@|0|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|0|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|0|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r c++defs.h' \
-e '/definition of _GL_ARG_NONNULL/r arg-nonnull.h' \
-e '/definition of _GL_WARN_ON_USE/r warn-on-use.h'; \
} > unistd.h-t && \
mv unistd.h-t unistd.h
make all-recursive
make[2]: Entering directory `/dev/shm/1/gv/gv/lib'
make[3]: Entering directory `/dev/shm/1/gv/gv/lib'
gcc -DHAVE_CONFIG_H -I. -I../src -g -O2 -MT dummy.o -MD -MP -MF
.deps/dummy.Tpo -c -o dummy.o dummy.c
mv -f .deps/dummy.Tpo .deps/dummy.Po
gcc -DHAVE_CONFIG_H -I. -I../src -g -O2 -MT getopt.o -MD -MP -MF
.deps/getopt.Tpo -c -o getopt.o getopt.c
In file included from getopt.h:31,
from getopt.c:26:
./getopt.h:195: error: redefinition of 'struct option'
getopt.c:225: error: expected ';', ',' or ')' before '_GL_UNUSED'
getopt.c: In function '_getopt_internal_r':
getopt.c:362: warning: assignment makes pointer from integer without a cast
make[3]: *** [getopt.o] Error 1
make[3]: Leaving directory `/dev/shm/1/gv/gv/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/dev/shm/1/gv/gv/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/dev/shm/1/gv/gv/lib'
make: *** [all-recursive] Error 1
I repeated the test on fedora 13, tared in the whole repository after
"./bootstrap" (to be used later), configured and make and it worked.
Then I copied the tar archive created before to my centos machine,
"configure && make" and got the above error again.
Is there anything wrong with my sources configuration or is there an
gnulib bug? What should I do?
If it helps, I can send you a tarball created after the failing make for
analysis. I estimate it's less than 2 MB.
Thanks in advance
Markus Steinborn
GNU gv maintainer