From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24829 invoked by alias); 23 Jan 2007 16:59:38 -0000 Received: (qmail 24665 invoked by uid 48); 23 Jan 2007 16:59:26 -0000 Date: Tue, 23 Jan 2007 16:59:00 -0000 Subject: [Bug ada/30560] New: gnatchop behaves differently dependend on argv[0] -- make check-ada fails X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-01/txt/msg01984.txt.bz2 I have lrwxrwxrwx 1 root root 12 Jan 22 14:54 /usr/bin/gnatchop -> gnatchop-4.1 -rwxr-xr-x 1 root root 285224 Nov 25 12:24 /usr/bin/gnatchop-4.1 calling > gnatchop x.adb works as expected, calling > gnatchop-4.1 x.adb does not (PR29127), and > /usr/bin/gnatchop x.adb doesn't work either! (which breaks the acats host_gnatchop script) It looks like gnatchop follows symlinks on each path component if argv[0] is not gnatchop. From strace of the last case: execve("/usr/bin/gnatchop", ["/usr/bin/gnatchop", "support/checkfil.ada"], [/* 80 vars */]) = 0 ... getcwd("/abuild/rguenther/obj/gcc/testsuite/ada/acats", 4096) = 46 readlink("/usr", 0x7fff76f33480, 4098) = -1 EINVAL (Invalid argument) readlink("/usr/bin", 0x7fff76f33480, 4098) = -1 EINVAL (Invalid argument) stat("support/checkfil.ada", {st_mode=S_IFREG|0644, st_size=7893, ...}) = 0 stat("support/checkfil.ada", {st_mode=S_IFREG|0644, st_size=7893, ...}) = 0 getcwd("/abuild/rguenther/obj/gcc/testsuite/ada/acats", 4096) = 46 readlink("/usr", 0x7fff76f332c0, 4098) = -1 EINVAL (Invalid argument) readlink("/usr/bin", 0x7fff76f332c0, 4098) = -1 EINVAL (Invalid argument) readlink("/usr/bin/gnatchop", "gnatchop-4.1", 4098) = 12 readlink("/usr/bin/gnatchop-4.1", 0x7fff76f332c0, 4098) = -1 EINVAL (Invalid argument) stat("/usr/bin/gnatchop-gcc", 0x7fff76f362c0) = -1 ENOENT (No such file or directory) stat("/usr/local/bin/gnatchop-gcc", 0x7fff76f362c0) = -1 ENOENT (No such file or directory) stat("/usr/bin/gnatchop-gcc", 0x7fff76f362c0) = -1 ENOENT (No such file or direc ... This causes make check-ada to fail like === acats support === Generating support files...gnatmake --GCC="/abuild/rguenther/obj/gcc/xgcc -B/abuild/rguenther/obj/gcc/" -gnatws -O2 /space/rguenther/src/svn/trunk/gcc/testsuite/ada/acats/support/impbit.adb -largs --GCC="/abuild/rguenther/obj/gcc/xgcc -B/abuild/rguenther/obj/gcc/" /abuild/rguenther/obj/gcc/xgcc -c -I/space/rguenther/src/svn/trunk/gcc/testsuite/ada/acats/support/ -B/abuild/rguenther/obj/gcc/ -gnatws -O2 -I- /space/rguenther/src/svn/trunk/gcc/testsuite/ada/acats/support/impbit.adb gnatbind -x impbit.ali gnatlink impbit.ali --GCC=/abuild/rguenther/obj/gcc/xgcc -B/abuild/rguenther/obj/gcc/ target_bit= 64 target_insn=nop gnatchop-gcc: installation problem, executable not found no source files written gnatchop-gcc: installation problem, executable not found no source files written ... -- Summary: gnatchop behaves differently dependend on argv[0] -- make check-ada fails Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org OtherBugsDependingO 29127 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30560