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

Bug#177076: marked as done (gcc-3.2: building the pkg from a shell with non-null $CDPATH fails)



Your message dated Mon, 17 Mar 2003 16:37:24 -0500
with message-id <E18v2IO-0004BZ-00@auric.debian.org>
and subject line Bug#177076: fixed in gcc-3.2 1:3.2.3ds5-0pre6
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 16 Jan 2003 23:39:14 +0000
>From swift@alum.mit.edu Thu Jan 16 17:39:13 2003
Return-path: <swift@alum.mit.edu>
Received: from pool-68-160-52-184.bos.east.verizon.net (beth.swift.xxx) [68.160.52.184] (root)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18ZJbN-0000DE-00; Thu, 16 Jan 2003 17:39:13 -0600
Received: from beth.swift.xxx (swift@localhost [127.0.0.1])
	by beth.swift.xxx (8.12.6/8.12.6/Debian-8) with ESMTP id h0GNd5UM026574;
	Thu, 16 Jan 2003 18:39:05 -0500
Message-Id: <200301162339.h0GNd5UM026574@beth.swift.xxx>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Matthew Swift <swift@alum.mit.edu>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gcc-3.2: building the pkg from a shell with non-null $CDPATH fails
X-Mailer: reportbug 2.9
Date: Thu, 16 Jan 2003 18:39:05 -0500
X-Mailscanner: clean	(beth.swift.xxx)
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=0.8 required=5.0
	tests=MSG_ID_ADDED_BY_MTA_3,SPAM_PHRASE_00_01
	version=2.41
X-Spam-Level: 

Package: gcc-3.2
Version: 1:3.2.1-0pre3
Severity: normal

Now that I think about it, I see no good reason to export $CDPATH from a shell,
as I was doing.  But if for whatever reason one does export a non-null value of
$CDPATH while building gcc-3.2, say, with "debuild", the build is going to
fail.  The gcc-3.2 makefiles could be more robust, to prevent this failure,
which will occur in such situations whenever $CDPATH is exported and non-null.

To explain, let me first review how Bash handles the "cd" command.

Fact 1: Quoting from bash-2.05b/builtins/cd.def:

	      /* POSIX.2 says that if a nonempty directory from CDPATH
		 is used to find the directory to change to, the new
		 directory name is echoed to stdout, whether or not
		 the shell is interactive. */

Fact 2: Bash considers strings starting with "./" and "../" to be
absolute.  (There is no mention in the source (general.c) whether this is a
POSIX spec.)

Consequently, the following:

Suppose it is possible to cd to a subdirectory "MySubdir" of the
current directory.
When bash is in POSIX mode and either interactive or not,

        cd ./MySubdir

never echoes the new directory, and

        cd MySubdir

always echoes it, when the command is successful.  The command is successful
when $CDPATH is null or unset, or is set and contains ".".


Now consider the following rule from gcc-3.2-3.2.2ds4/build/gcc/Makefile:


    pascal.real-install-doc: pascal.install-dir $(srcdir)/p/README \
     $(srcdir)/p/NEWS $(srcdir)/p/FAQ $(srcdir)/p/AUTHORS \
     $(srcdir)/p/COPYING $(srcdir)/p/COPYING.LIB $(srcdir)/p/COPYING.FDL $(srcdir)/p/test/README pascal.docdemos
            for f in README NEWS INSTALL FAQ AUTHORS COPYING COPYING.LIB COPYING.FDL; do \
              rm -f "$(p_inst_docdir)/$$f"; \
              $(INSTALL_DATA) "$(srcdir)/p/$$f" "$(p_inst_docdir)/$$f" || exit 1; \
              chmod a-x "$(p_inst_docdir)/$$f"; \
            done
            rm -f "$(p_inst_docdir)/BUGS"
            $(INSTALL_DATA) "$(srcdir)/p/test/README" "$(p_inst_docdir)/BUGS"
            for f in `cd "$(srcdir)/p/demos" && echo *`; do \
              if [ "$$f" != CVS ]; then \
                rm -f "$(p_inst_demodir)/$$f"; \
                $(INSTALL_DATA) "$(srcdir)/p/demos/$$f" "$(p_inst_demodir)/$$f" || exit 1; \
              fi \
            done
            chmod a-x "$(p_inst_docdir)/BUGS" "$(p_inst_demodir)"/*
            if [ "`cd p/docdemos && echo a*`" != "a*" ]; then \
              (cd "$(p_inst_docdemodir)"; for f in *; do rm -f "$$f"; done) && \
              for f in `cd p/docdemos && echo *`; do \
                rm -f "$(p_inst_docdemodir)/$$f"; \
                $(INSTALL_DATA) "p/docdemos/$$f" "$(p_inst_docdemodir)/$$f" && \
                chmod a-x "$(p_inst_docdemodir)/$$f" || exit 1; \
              done; \
            fi



In particular, observe the construction

    for f in `cd p/docdemos && echo *`; do

which is used twice in this rule ($(srcdir) happens to be absolute) -- and
probably elsewhere.

The makefile will behave in one of three ways:

    1) If $CDPATH is set and contains "." then the absolute pathname of the
       subdirectory itself will be the first value of $f in the loop, and
       the "install" command will fail.

    2) If $CDPATH is set but does not contain ".", the subdirectory will not be
       found by the "cd" command.

    3) If $CDPATH is null or unset, the Makefile will succeed as intended.


Conclusion:

The makefile would be more robust if it replaced constructions like

    for f in `cd p/docdemos && echo *`; do

with

    for f in `cd ./p/docdemos && echo *`; do

that is, add a "./" before "p/docdemos".

Moral:

Export as few envariables as you can get away with!



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux beth 2.4.20 #1 Wed Jan 15 16:59:59 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages gcc-3.2 depends on:
ii  binutils                  2.13.90.0.10-1 The GNU assembler, linker and bina
ii  cpp-3.2                   1:3.2.1-0pre3  The GNU C preprocessor.
ii  gcc-3.2-base              1:3.2.1-0pre3  The GNU Compiler Collection (base 
ii  libc6                     2.2.5-14.3     GNU C Library: Shared libraries an
ii  libgcc1                   1:3.2.1-0pre3  GCC support library.

-- no debconf information


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux beth 2.4.20 #1 Wed Jan 15 16:59:59 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages gcc-3.2 depends on:
ii  binutils                  2.13.90.0.10-1 The GNU assembler, linker and bina
ii  cpp-3.2                   1:3.2.1-0pre3  The GNU C preprocessor.
ii  gcc-3.2-base              1:3.2.1-0pre3  The GNU Compiler Collection (base 
ii  libc6                     2.2.5-14.3     GNU C Library: Shared libraries an
ii  libgcc1                   1:3.2.1-0pre3  GCC support library.

-- no debconf information


---------------------------------------
Received: (at 177076-close) by bugs.debian.org; 17 Mar 2003 21:38:15 +0000
>From katie@auric.debian.org Mon Mar 17 15:38:15 2003
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 18v2JB-0002h9-00; Mon, 17 Mar 2003 15:38:13 -0600
Received: from katie by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 18v2IO-0004BZ-00; Mon, 17 Mar 2003 16:37:24 -0500
From: Matthias Klose <doko@debian.org>
To: 177076-close@bugs.debian.org
X-Katie: $Revision: 1.33 $
Subject: Bug#177076: fixed in gcc-3.2 1:3.2.3ds5-0pre6
Message-Id: <E18v2IO-0004BZ-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Mon, 17 Mar 2003 16:37:24 -0500
Delivered-To: 177076-close@bugs.debian.org

We believe that the bug you reported is fixed in the latest version of
gcc-3.2, which is due to be installed in the Debian FTP archive:

cpp-3.2-doc_3.2.3-0pre6_all.deb
  to pool/main/g/gcc-3.2/cpp-3.2-doc_3.2.3-0pre6_all.deb
cpp-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/cpp-3.2_3.2.3-0pre6_i386.deb
fastjar_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/fastjar_3.2.3-0pre6_i386.deb
fixincludes_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/fixincludes_3.2.3-0pre6_i386.deb
g++-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/g++-3.2_3.2.3-0pre6_i386.deb
g77-3.2-doc_3.2.3-0pre6_all.deb
  to pool/main/g/gcc-3.2/g77-3.2-doc_3.2.3-0pre6_all.deb
g77-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/g77-3.2_3.2.3-0pre6_i386.deb
gcc-3.2-base_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gcc-3.2-base_3.2.3-0pre6_i386.deb
gcc-3.2-doc_3.2.3-0pre6_all.deb
  to pool/main/g/gcc-3.2/gcc-3.2-doc_3.2.3-0pre6_all.deb
gcc-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gcc-3.2_3.2.3-0pre6_i386.deb
gcc-3.2_3.2.3ds5-0pre6.diff.gz
  to pool/main/g/gcc-3.2/gcc-3.2_3.2.3ds5-0pre6.diff.gz
gcc-3.2_3.2.3ds5-0pre6.dsc
  to pool/main/g/gcc-3.2/gcc-3.2_3.2.3ds5-0pre6.dsc
gcc-3.2_3.2.3ds5.orig.tar.gz
  to pool/main/g/gcc-3.2/gcc-3.2_3.2.3ds5.orig.tar.gz
gcj-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gcj-3.2_3.2.3-0pre6_i386.deb
gij-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gij-3.2_3.2.3-0pre6_i386.deb
gnat-3.2-doc_3.2.3-0pre6_all.deb
  to pool/main/g/gcc-3.2/gnat-3.2-doc_3.2.3-0pre6_all.deb
gnat-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gnat-3.2_3.2.3-0pre6_i386.deb
gobjc-3.2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gobjc-3.2_3.2.3-0pre6_i386.deb
gpc-2.1-3.2-doc_3.2.3.20030209-0pre6_all.deb
  to pool/main/g/gcc-3.2/gpc-2.1-3.2-doc_3.2.3.20030209-0pre6_all.deb
gpc-2.1-3.2_3.2.3.20030209-0pre6_i386.deb
  to pool/main/g/gcc-3.2/gpc-2.1-3.2_3.2.3.20030209-0pre6_i386.deb
libffi2-dev_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libffi2-dev_3.2.3-0pre6_i386.deb
libffi2_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libffi2_3.2.3-0pre6_i386.deb
libg2c0_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libg2c0_3.2.3-0pre6_i386.deb
libgcc1_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libgcc1_3.2.3-0pre6_i386.deb
libgcj-common_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libgcj-common_3.2.3-0pre6_i386.deb
libgcj3-dev_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libgcj3-dev_3.2.3-0pre6_i386.deb
libgcj3_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libgcj3_3.2.3-0pre6_i386.deb
libobjc1_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libobjc1_3.2.3-0pre6_i386.deb
libstdc++5-dbg_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libstdc++5-dbg_3.2.3-0pre6_i386.deb
libstdc++5-dev_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libstdc++5-dev_3.2.3-0pre6_i386.deb
libstdc++5-doc_3.2.3-0pre6_all.deb
  to pool/main/g/gcc-3.2/libstdc++5-doc_3.2.3-0pre6_all.deb
libstdc++5-pic_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libstdc++5-pic_3.2.3-0pre6_i386.deb
libstdc++5_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/libstdc++5_3.2.3-0pre6_i386.deb
protoize_3.2.3-0pre6_i386.deb
  to pool/main/g/gcc-3.2/protoize_3.2.3-0pre6_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 177076@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-3.2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----

Format: 1.7
Date: Sun, 16 Mar 2003 21:40:57 +0100
Source: gcc-3.2
Binary: gcc-3.2-base libstdc++5-dev cpp-3.2-doc libgcj3-dev libobjc1 libstdc++5-doc libgcc1 libstdc++5 protoize g77-3.2-doc libstdc++5-dbg gobjc-3.2 g++-3.2 gnat-3.2-doc gcc-3.2 gpc-2.1-3.2-doc libstdc++5-pic g77-3.2 libgcj3 libffi2-dev gpc-2.1-3.2 gcc-3.2-soft-float gcj-3.2 libgcj-common fastjar gcc-3.2-doc gcc-3.2-nof libg2c0 fixincludes gij-3.2 cpp-3.2 libffi2 gnat-3.2
Architecture: source all i386
Version: 1:3.2.3ds5-0pre6
Distribution: unstable
Urgency: high
Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Description: 
 cpp-3.2    - The GNU C preprocessor
 cpp-3.2-doc - Documentation for the GNU C preprocessor (cpp)
 fastjar    - Jar creation utility
 fixincludes - Fix non-ANSI header files
 g++-3.2    - The GNU C++ compiler
 g77-3.2    - The GNU Fortran 77 compiler
 g77-3.2-doc - Documentation for the GNU Fortran compiler (g77)
 gcc-3.2    - The GNU C compiler
 gcc-3.2-base - The GNU Compiler Collection (base package)
 gcc-3.2-doc - Documentation for the GNU compilers (gcc, gobjc, g++)
 gcj-3.2    - The GNU compiler for Java(TM)
 gij-3.2    - The GNU Java bytecode interpreter
 gnat-3.2   - The GNU Ada compiler
 gnat-3.2-doc - Documentation for the GNU Ada compiler (gnat)
 gobjc-3.2  - The GNU Objective-C compiler
 gpc-2.1-3.2 - The GNU Pascal compiler
 gpc-2.1-3.2-doc - Documentation for the GNU Pascal compiler (gpc)
 libffi2    - Foreign Function Interface library runtime
 libffi2-dev - Foreign Function Interface library development
 libg2c0    - Runtime library for GNU Fortran 77 applications
 libgcc1    - GCC support library
 libgcj-common - Java runtime library (common files)
 libgcj3    - Java runtime library for use with gcj
 libgcj3-dev - Java development headers and static library for use with gcj
 libobjc1   - Runtime library for GNU Objective-C applications
 libstdc++5 - The GNU Standard C++ Library v3
 libstdc++5-dbg - The GNU Standard C++ Library v3 (debugging files)
 libstdc++5-dev - The GNU Standard C++ Library v3 (development files)
 libstdc++5-doc - The GNU Standard C++ Library v3 (documentation files)
 libstdc++5-pic - The GNU Standard C++ Library v3 (shared library subset kit)
 protoize   - Create/remove ANSI prototypes from C code
Closes: 167014 168310 177076 178144 184650 184684
Changes: 
 gcc-3.2 (1:3.2.3ds5-0pre6) unstable; urgency=high
 .
   * gcc-3.2.3 prerelease (CVS 200300316)
     - Fixes <xmmintrin.h> usage for C++ (closes: #168310).
   * Add GNU Free Documentation License to copyright file (closes: #178144).
   * Don't build packages built by gcc-3.3 on hppa: libgcc1, libobcj1, libg2c,
     libffi2, libgcj-common and libstdc++5, fastjar, fixincludes, protoize.
   * gpc build error with non-null $CDPATH fixed in gpc 20030209 package.
     Closes: #177076.
   * gij/gcj wrapper scripts handle spaces (closes: #167014).
   * Add fix for ICE on powerpc (closes: #184684).
   * m68k-linux survived the bootstrap (closes: #184650).
Files: 
 bd55539476cb9a5c88ca96512e1bf7cf 2194 devel standard gcc-3.2_3.2.3ds5-0pre6.dsc
 1baf5b9c2e3d557e22ccf0dff5324b4d 20962750 devel standard gcc-3.2_3.2.3ds5.orig.tar.gz
 b02bb289b8ccc7a3efe71b4936d29e9d 1788765 devel standard gcc-3.2_3.2.3ds5-0pre6.diff.gz
 e2ab56bd7d6ff45f1fc0bdecacf8c992 84300 doc optional cpp-3.2-doc_3.2.3-0pre6_all.deb
 07a1c900f2447912c4097a5f715b31d0 2213958 doc optional libstdc++5-doc_3.2.3-0pre6_all.deb
 923b77d0f895acdc34538baf91922d1a 309444 doc optional g77-3.2-doc_3.2.3-0pre6_all.deb
 d4a5f1bfe1118743f920aa488847f61d 346698 doc optional gnat-3.2-doc_3.2.3-0pre6_all.deb
 a7f62ac138ea53d5b5496a1e9f6fe3d7 474176 doc optional gpc-2.1-3.2-doc_3.2.3.20030209-0pre6_all.deb
 d0319c437688784aefa21c24cfb7baae 631002 doc optional gcc-3.2-doc_3.2.3-0pre6_all.deb
 54f284cd84bf8eb05e339c5c5a29081f 128460 devel important gcc-3.2-base_3.2.3-0pre6_i386.deb
 076e48c75786ca3f5f02ba6d875c62e7 61898 libs important libgcc1_3.2.3-0pre6_i386.deb
 78c330d5ac216f5e54c5bbfb3f95b725 119954 interpreters standard cpp-3.2_3.2.3-0pre6_i386.deb
 59bfa05258f920f20d33dc61443f3215 22518 devel optional protoize_3.2.3-0pre6_i386.deb
 4803ad4d24f021daf7901bb30aad93f1 47138 devel optional fixincludes_3.2.3-0pre6_i386.deb
 048705fbbf11d6602b733970686374f1 1297818 devel optional gobjc-3.2_3.2.3-0pre6_i386.deb
 32069ab52aecf3658b29f78246620f16 117280 libs optional libobjc1_3.2.3-0pre6_i386.deb
 97ccef6a437e62951b86f7a0f01ba9f5 12656 devel optional gij-3.2_3.2.3-0pre6_i386.deb
 99da668b10d6c7641eaac05890b05d0a 2687910 libs optional libgcj3_3.2.3-0pre6_i386.deb
 19d9820a1223dcc5d72043f03ab30035 48110 libs optional libgcj-common_3.2.3-0pre6_i386.deb
 badfb253b5f4522b7c4197cda27d1a76 1503794 devel optional gcj-3.2_3.2.3-0pre6_i386.deb
 862ace6f0a266b74a4dccfa9b367cd0f 3012580 devel optional libgcj3-dev_3.2.3-0pre6_i386.deb
 6c0d23737acd7cf046c80ad0ab638264 90248 devel extra fastjar_3.2.3-0pre6_i386.deb
 b1a7f04598f7756255828d582c30b206 56676 libs optional libffi2_3.2.3-0pre6_i386.deb
 1efdf50b43d656a5bc31ea15337d6c8d 10584 devel optional libffi2-dev_3.2.3-0pre6_i386.deb
 f6af046e02f7d357aef65991290119ef 1550242 devel standard g++-3.2_3.2.3-0pre6_i386.deb
 c9b9fd78f8ccb7a6338bde930fcad629 260494 base important libstdc++5_3.2.3-0pre6_i386.deb
 d3137a79ae4a8a70faf02fbfc4452dd7 729086 devel standard libstdc++5-dev_3.2.3-0pre6_i386.deb
 e7084241afb756d965a13e373e0f4def 309078 devel extra libstdc++5-pic_3.2.3-0pre6_i386.deb
 1a099d4ede03e1fe40f9e84b7d91939c 1506042 devel extra libstdc++5-dbg_3.2.3-0pre6_i386.deb
 7b4e84f26b4a1263113458325355e8b6 47494 libs optional libg2c0_3.2.3-0pre6_i386.deb
 cf9a7446e5a9dc4ce98cdc0577928eba 1431478 devel optional g77-3.2_3.2.3-0pre6_i386.deb
 9826737c49010038d99da3f5c10636c5 5416398 devel optional gnat-3.2_3.2.3-0pre6_i386.deb
 43f1a6b8d7e911a4dcd6fcaa7b33b69c 1883586 devel optional gpc-2.1-3.2_3.2.3.20030209-0pre6_i386.deb
 96810691c708d48f04742155b9cc4023 2277538 devel standard gcc-3.2_3.2.3-0pre6_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Requires PGP version 2.6 or later.

iQEVAwUBPnYLlwuDzMCIcnEhAQHm2Qf+IDsMgPf2Kqk/Z1jrwoNLu062LUFbr9jh
zW22FgFetg9n8JKvURFatMQu2vUDjp+aeE677FzwrX7VuFQh8SLLlU1JTpTkx8bw
dQ1jgisBYaGZi0cQILJF0OFoVHSyAt9qiaXS20wkc5shZaDFzIUwRZ4GwkooL+26
kVE+CQs+QlW5G5od0rwrpc5V/7jfyC3A1EBaXD9y1gHY887TneCZwxQWMsKZUeNK
KcKXUNBrogqlA/bQuZl6m+5Azp578DSiaSFRgGlg8aGFlZXCfPhh6iG6Zftr6rAj
r30hKRzUv3WQJsJDOb2Mftm3cwS3SvJAvJvDzDxdvi2cv/iH3dhwTw==
=Lcsh
-----END PGP SIGNATURE-----



Reply to: