Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32238 - GCC3: "rm: cannot remove `': Invalid argument
Summary: GCC3: "rm: cannot remove `': Invalid argument
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 32949
  Show dependency tree
 
Reported: 2003-10-28 21:36 UTC by Kameron Hoffs
Modified: 2004-02-23 11:37 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sandbox-bug32238.patch (sandbox-bug32238.patch,1.75 KB, patch)
2003-11-02 09:33 UTC, Martin Schlemmer (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kameron Hoffs 2003-10-28 21:36:00 UTC
When compiling using ACCEPT_KEYWORDS="~x86" GCC 3.3.2-r2, linux-headers 2.4.21, 
glibc 2.3.2-r8 and a 2.6 kernel you get this while compiling:


Reproducible: Always
Steps to Reproduce:
1.ACCEPT_KEYWORDS="~x86" emerge GCC 3.3.2-r2, linux-headers 2.4.21, glibc 2.3.
2-r8 and a 2.6 kernel
2.emerge xine-libs
3.

Actual Results:  
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. 
-I../../include -I../../include -I../../src -I../../src/xine-engine -I../..
/src/xine-engine -I../../src/xine-utils  -I../../src/input -I../../src/input    
-I/usr/X11R6/include -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE  
-Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -O2   -I/usr/kde/3.1/include/artsc  
-c -o cpu_accel.lo `test -f 'cpu_accel.c' || echo './'`cpu_accel.c
mkdir .libs
rm: cannot remove `': Invalid argument


Expected Results:  
Unknown, but I would expect the file to have been deleted and removed correctly.

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.6.
0-test8-love3)
=================================================================
System uname: 2.6.0-test8-love3 i686 Intel(R) Pentium(R) III Mobile CPU      
1133MHz
Gentoo Base System version 1.4.3.11
distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -mfpmath=sse -msse -mmmx -O3 -pipe -fomit-frame-pointer 
-fPIC -funroll-loops"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config 
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config 
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ 
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -mfpmath=sse -msse -mmmx -O3 -pipe 
-fomit-frame-pointer -fPIC -funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs sandbox distcc userpriv usersandbox -ccache"
GENTOO_MIRRORS="http://www.ibiblio.org/gentoo ftp://ftp.gtlib.cc.gatech.
edu/pub/gentoo ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://mirror.
iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.
ucsb.edu/pub/mirrors/linux/gentoo/ ftp://gentoo.mirrors.pair.com/ ftp://gentoo.
noved.org/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod mpeg 
ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa 
gdbm berkdb slang readline arts tetex aalib svga ggi tcltk java X sdl gpm tcpd 
pam libwww ssl perl python esd imlib oggvorbis gtk qt kde motif opengl ldap cdr 
acpi acpi4linux autofs dnd dv dvd fbcon flash gd gtk2 gtkhtml i8x0 javascript 
jikes kerberos maildir memlimit moznocompose moznoirc moznomail parse-clocks pnp 
slp sse tiff trusted usb wmf -oss -gnome"
Comment 1 Joshua Kinard gentoo-dev 2003-10-29 02:46:54 UTC
Does this affect the build in any way, shape, or form, like make it fail/error
out?

If not, then this is really negligible, like a minor typo in the gcc Makefiles
somewheres.
Comment 2 Kameron Hoffs 2003-10-29 09:08:32 UTC
It does not impact compiling that I'm aware of, but I don't know if it's
causing files to be left behind which normally would be removed thus taking
up disk space unnecessarily.
Comment 3 Joshua Kinard gentoo-dev 2003-10-29 15:26:50 UTC
I would doubt that.  The "make install" section of gcc's Makefile likely
is designed to install a specific set of files, leaving others behind.  These
files get installed to a temp directory inside portage before getting merged
into the live fs.  I would say the chances of "rogue" files getting installed
is very small.

However, if you want to check, use the "ebuild" command to compile and "install"
(NOT merge) gcc-3.3.2-r1 and gcc-3.3.2-r2.  Once both are compiled and installed
into the temporary portage folders (before merging into the live fs), you
can then  run an 'ls' command on each folder, store the 'ls' output into
two different text files, and then diff the two files to see if gcc-3.3.2-r2
contains significantly more files for it's installation than 3.3.2-r1.  I
say "significantly more" because if there are indeed files not being properly
deleted during compiliation, then they are likely specialized source files
and there should be a large number of them.

If you are unsure how to use the 'ebuild' command, run 'man ebuild' for more
info.  Portage's image directory is in ${PORTAGE_TMPDIR}/portage/<package>/image.
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2003-10-31 15:28:13 UTC
This isn't a gcc thing, it's a sandbox thing:

Try this:

rm -f "" at the prompt.

then enter the sandbox and try it again.  You get an error in the sandbox.

The main thing here is that most packages built with libtool use the syntax
rm -f "" a lot in their scripts, so this "error" pops up quite a bit.  It's
harmless, but probably should be fixed.

Reassigning.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-02 09:25:25 UTC
Below should fix it, but I just need to confirm that it does not break the
original bug which that bit fixes:

--
Index: libsandbox.c
===================================================================
RCS file: /home/cvsroot/gentoo-src/portage/src/sandbox-1.1/libsandbox.c,v
retrieving revision 1.13
diff -u -p -r1.13 libsandbox.c
--- libsandbox.c        14 Oct 2003 20:24:39 -0000      1.13
+++ libsandbox.c        2 Nov 2003 17:23:41 -0000
@@ -1286,7 +1286,8 @@ before_syscall(const char *func, const c
        sbcontext_t sbcontext;
  
        if (!strlen(file)) {
-               errno = EINVAL;
+                /* The file/directory does not exist */
+               errno = ENOENT;
                return 0;
        }
  
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-02 09:27:50 UTC
Btw, the fix was for bug #29846.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-02 09:33:15 UTC
Created attachment 20120 [details, diff]
sandbox-bug32238.patch

Full patch set.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-02 09:35:08 UTC
Hi guys (Weeve =), could we get this tested for original problem in bug #29846?
 Thanks.
Comment 9 Jason Wever (RETIRED) gentoo-dev 2003-11-02 10:30:10 UTC
Looks good here.  One package that always used to fail because of the sandbox
violation doesn't.
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-02 11:08:27 UTC
Thanks Jason.  Nick, commited, when ever you are ready.
Comment 11 Jeremy S Lowery 2003-11-09 01:40:15 UTC
This message is also displayed after every command while emerging kde 3.1.4

USE="X gtk jack freetype2 -gnome -alsa  kde 3dnow -acpi apm -arts avi cdr
cups directfb dvd -emacs fbcon -gpm java jikes jpeg
 mpeg mozilla ncurses -pcmcia pda -pnp python qt quicktime samba tcltk tetex
truetype usb zlib x86 joystick"
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-09 15:36:09 UTC
It will happen with anything using libtool-1.5 (maybe 1.4.3, not sure).
Comment 13 Tony Vroon gentoo-dev 2003-12-03 00:12:41 UTC
Ended up compiling a new libsandbox for this manually.
It's been a while, is the bugfix going to make it into portage?
Comment 14 Pedro B. 2003-12-03 14:09:02 UTC
Martin: AND in 1.4.3-r1 too. Confirmed.

On a 2.6 kernel withOUT "~x86". Compiled Kde, greped and counted occurences on log after compile, this message appeared exactly 1618 times.



Comment 15 SpanKY gentoo-dev 2003-12-08 06:21:08 UTC
this isnt a gcc3 bug it's a sandbox bug
Comment 16 Nicholas Jones (RETIRED) gentoo-dev 2003-12-24 00:28:47 UTC
This should be in 49-r18 and is in all the 2.0.50 series.
Comment 17 Scott Taylor (RETIRED) gentoo-dev 2003-12-30 15:26:03 UTC
The last comment said it should be in -r18. I still got it with -r18 and -r19

rm: cannot remove `': Invalid argument
source='demux_vqa.c' object='demux_vqa.lo' libtool=yes \
depfile='.deps/demux_vqa.Plo' tmpdepfile='.deps/demux_vqa.TPlo' \
depmode=gcc3 /bin/sh ../../depcomp \
/bin/sh ../../libtool-nofpic --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I../../include -I../../src -I../../src/xine-engine -I../../src/xine-engine -I../../src/xine-utils  -I../../src/input -I../../src/input      -Wall -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE  -Wpointer-arith -Wnested-externs -Wcast-align -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -march=athlon-xp -O2 -yno_propolice -yno_propolice -yno_propolice -c -o demux_vqa.lo `test -f 'demux_vqa.c' || echo './'`demux_vqa.c
rm: cannot remove `': Invalid argument
...

Blue gentoo-dev-sources # emerge -p portage

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-apps/portage-2.0.49-r19  

Comment 18 Jason Wever (RETIRED) gentoo-dev 2004-02-21 15:00:00 UTC
Anyone still seeing this problem?  If not can it be closed?
Comment 19 Tony Vroon gentoo-dev 2004-02-21 18:13:28 UTC
Feel free to close, it is fixed in 2.0.50 (but the bug was still open because it didn't make it into -r18 as originally intended).
Comment 20 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-23 11:37:57 UTC
Fixed.