Re: Cryptic error message from collect2

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

 



On Sat, 09 Aug 2008 22:13:55 +0200, Brian Dessent <brian@xxxxxxxxxxx> wrote:

> Jonas Karlsson wrote:
>
>> collect2: open temporary output file: File exists
>
> collect2 needs to create a number of temporary output files, and
> apparently the name it has chosen for one of them already exists and
> cannot be overwritten.  It tries a number of locations -- you can look
> through the code at libiberty/make_temp_file.c and so on, but it's
> probably easier just to strace it to find out what's going on.  If you
> strace the gcc command however you won't see much as it doesn't do a lot
> other than invoke subprocesses.  So run the failing gcc command with
> -### which will give you the exact invocation of collect2 which you can
> then strace.
>
Ok, thanks. Now that I've done that I still can't figure out what goes
wrong without digging into some GCC code. If it's necessary I'll do it,
but I rather have one or two comments from someone who knows a bit more
about the inner workings of GCC and its libs before that. The collect2
command line is as follows:

/Programs/GCC/4.3.1/libexec/gcc/i686-pc-linux-gnu/4.3.1/collect2 --eh-frame-hdr -m elf_i386 -shared -o .libs/libgstbase-0.10.so.0.17.0 /lib/crti.o /Programs/GCC/4.3.1/lib/gcc/i686-pc-linux-gnu/4.3.1/crtbeginS.o -L/Programs/GStreamer/0.10.20/lib -L/System/Links/Libraries -L/Programs/GCC/4.3.1/lib/gcc/i686-pc-linux-gnu/4.3.1 -L/usr/lib/gcc/i686-pc-linux-gnu/4.3.1 -L/Programs/GCC/4.3.1/lib/gcc/i686-pc-linux-gnu/4.3.1/../../.. .libs/libgstbase_0.10_la-gstadapter.o .libs/libgstbase_0.10_la-gstbasesink.o .libs/libgstbase_0.10_la-gstbasesrc.o .libs/libgstbase_0.10_la-gstbasetransform.o .libs/libgstbase_0.10_la-gstcollectpads.o .libs/libgstbase_0.10_la-gstpushsrc.o .libs/libgstbase_0.10_la-gsttypefindhelper.o .libs/libgstbase_0.10_la-gstdataqueue.o --rpath /Programs/GStreamer/0.10.20/lib -lgstreamer-0.10 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lrt -ldl -soname libgstbase-0.10.so.0 -version-script .libs/libgstbase-0.10.ver -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /Programs/GCC/4.3.1/lib/gcc/i686-pc-linux-gnu/4.3.1/crtendS.o /lib/crtn.o

I've also attached the strace output. Below is an extract, which I think
is the relevant part for this error, from that file.

access("/tmp", R_OK|W_OK|X_OK)          = 0
gettimeofday({1218323494, 186358}, NULL) = 0
getpid()                                = 10474
open("/tmp/ccwd9tsm.c", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
gettimeofday({1218323494, 186907}, NULL) = 0
open("/tmp/ccsVXawy.o", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
gettimeofday({1218323494, 187408}, NULL) = 0
open("/tmp/ccc72aCK.ld", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
gettimeofday({1218323494, 187842}, NULL) = 0
open("/tmp/ccAnM5IW.le", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
open("/tmp/ccc72aCK.ld", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EEXIST (File exists)
write(2, "collect2: ", 10)              = 10
write(2, "open temporary output file", 26) = 26
open("/Programs/Glibc/2.8/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/Programs/Glibc/2.8/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": File exists\n", 14)         = 14

-- 
/Jonas

Attachment: gstreamer_collect2.strace
Description: Binary data


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux