Bugs item #1053052, was opened at 2004-10-24 17:44
Message generated for change (Comment added) made by dannysmith
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1053052&group_id=2435
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: gcc
Group: Known bugs
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Gregory Casamento (gcasa)
Assigned to: Danny Smith (dannysmith)
Summary: Problem with -I../../ when building/Multiple slash handling
Initial Comment:
Compiler seems to fail when attempting to add -I
with ../../ or ../ to include files one or two dirs above.
Same example works fine under Linux and Solaris.
Steps to recreate:
1) Untar the dir...
2) go down to the lowest dir where test.c is
3) type gcc -I../../ test.c
EXPECTED RESULT: Successful compile.
ACTUAL:
$ gcc -I../../ test.c
test.c:2:17: foo.h: No such file or directory
test.c: In function `main':
test.c:7: error: `ONE' undeclared (first use in this
function)
test.c:7: error: (Each undeclared identifier is reported
only once
test.c:7: error: for each function it appears in.)
I have some live examples of this happening.
However, when I do
gcc -I../.. test.c
Everything works. This seems to imply that MinGW
doesn't properly handle multiple slashes in a pathname,
which is a critical bug, if it's going to offer a UNIX
compatible build platform.
--- INFO
Windows 2000
$ gcc -v
Reading specs from
c:/GNUstep/Development/msys/1.0/mingw/bin/../lib/gcc/
mingw32/3.4.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-
ld --with-gnu-as --host=mingw32 --target=mingw32 --
prefix=/mingw --enable-threads --disable-nls --enable-
languages=c,c++,f77,ada,objc,java --disable-win32-
registry --disable-shared --enable-sjlj-exceptions --
enable-libgcj --disable-java-awt --without-x --enable-
java-gc=boehm --disable-libgcj-debug --enable-
interpreter --enable-hash-synchronization --enable-
libstdcxx-debug
Thread model: win32
gcc version 3.4.2 (mingw-special)
$ ld -v
GNU ld version 2.13.90 20030111
MinGW version 3.1.0
MSYS version 1.0.10
Test case is attached.
#define __MINGW32_VERSION 3.1
#define __W32API_VERSION 2.4
----------------------------------------------------------------------
>Comment By: Danny Smith (dannysmith)
Date: 2006-01-11 11:44
Message:
Logged In: YES
user_id=11494
Fixed in mingw gcc 3.4.5 RC
Danny
----------------------------------------------------------------------
Comment By: Onno Hommes (ohommes)
Date: 2005-06-21 05:19
Message:
Logged In: YES
user_id=122287
All,
I want to confirm this same problem. I currently have the
same problem when I try to compile with the release of
MinGW-4.1.0.exe
This problem did not exist in gcc.exe (GCC) 3.2.3 (mingw
special 20030504-1). MinGW-3.1.0-1.exe also doesn't seem to
have
this problem.
Hope this gets fixed soon! (I am runningWin2K SP4).
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2005-02-24 08:45
Message:
Logged In: YES
user_id=11494
Attached is a patch to gcc sources that should fix. It causes
no regressions with NT4-sp5. I am not going to submit it to
gcc lists because I don't have an XP or W2K to test.
Feel free to submit a variant of this to gcc-patches.
Danny
----------------------------------------------------------------------
Comment By: Earnie Boyd (earnie)
Date: 2005-02-24 00:58
Message:
Logged In: YES
user_id=15438
Danny,
I'm passing this bug back to you. After more testing I
realized that gcc is the one that needs to strip the
trailing slash from the -I argument. From the cmd.exe shell
doing gcc -o test test.c -I..\..\ breaks the build. Doing
gcc -o test test.c -I..\.. the build completes.
Earnie
----------------------------------------------------------------------
Comment By: Gregory Casamento (gcasa)
Date: 2004-10-25 13:52
Message:
Logged In: YES
user_id=209166
My apologies as I didn't include this information. I was in
the MSYS shell when I found the bug.
Thanks, GJC
----------------------------------------------------------------------
Comment By: Earnie Boyd (earnie)
Date: 2004-10-25 12:09
Message:
Logged In: YES
user_id=15438
Ok, this is a bug in MSYS that I didn't know about. Anyone
wishing to supply a patch for this bug, feel free to submit
one. Hint, IIRC, Windows OS doesn't like c:/foo//bar so the
trailing / on input needs stripped.
Earnie
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-10-25 10:25
Message:
Logged In: YES
user_id=11494
I cannot reproduce the problem when running from DOS cmd
shell or from zsh or cygwin bash.
I suspect a msys shell problem. A similar problem was
reported to gcc lists when using -I./ and was only observed
with msys shell.
Danny
Danny
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1053052&group_id=2435
|