public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Jonas Karlsson" <jonka750@student.liu.se>
To: "GCC Help mailinglist" <gcc-help@gcc.gnu.org>
Subject: Re: Cryptic error message from collect2
Date: Sat, 09 Aug 2008 23:27:00 -0000	[thread overview]
Message-ID: <op.ufm7ewbmllys5b@localhost.localdomain> (raw)
In-Reply-To: <489DFA83.52107B06@dessent.net>

[-- Attachment #1: Type: text/plain, Size: 3494 bytes --]

On Sat, 09 Aug 2008 22:13:55 +0200, Brian Dessent <brian@dessent.net> 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 #2: gstreamer_collect2.strace --]
[-- Type: application/octet-stream, Size: 10223 bytes --]

execve("/Programs/GCC/4.3.1/libexec/gcc/i686-pc-linux-gnu/4.3.1/collect2", ["/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"], [/* 101 vars */]) = 0
brk(0)                                  = 0x8061000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fb0000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/Programs/Glibc/Settings/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=138730, ...}) = 0
mmap2(NULL, 138730, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f8e000
close(3)                                = 0
open("/System/Links/Libraries/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000g\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1569778, ...}) = 0
mmap2(NULL, 1316432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e4c000
mmap2(0xb7f88000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13c) = 0xb7f88000
mmap2(0xb7f8b000, 9808, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f8b000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e4b000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e4b6c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7f88000, 8192, PROT_READ)   = 0
mprotect(0xb7fcc000, 4096, PROT_READ)   = 0
munmap(0xb7f8e000, 138730)              = 0
brk(0)                                  = 0x8061000
brk(0x8082000)                          = 0x8082000
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
open("/Programs/Glibc/2.8/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=79105856, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7c4b000
mmap2(NULL, 245760, PROT_READ, MAP_PRIVATE, 3, 0x2237) = 0xb7c0f000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2290) = 0xb7faf000
close(3)                                = 0
open("/Programs/Glibc/2.8/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fae000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7fae000, 4096)                = 0
open("/Programs/GCC/4.3.1/share/locale/en_US/LC_MESSAGES/gcc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/Programs/GCC/4.3.1/share/locale/en/LC_MESSAGES/gcc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0x804b1e0, [QUIT], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {0x804b1e0, [INT], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGALRM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGALRM, {0x804b1e0, [ALRM], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x804b1e0, [HUP], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGSEGV, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGSEGV, {0x804b1e0, [SEGV], SA_RESTART}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGBUS, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGBUS, {0x804b1e0, [BUS], SA_RESTART}, {SIG_IGN}, 8) = 0
stat64("/System/Links/Executables/ld", {st_mode=S_IFREG|0755, st_size=338072, ...}) = 0
access("/System/Links/Executables/ld", X_OK) = 0
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/gnm", 0xbfccbd08)      = -1 ENOENT (No such file or directory)
stat64("/bin/gnm", 0xbfccbd08)          = -1 ENOENT (No such file or directory)
stat64("/Programs/Xorg/6.8.2/bin/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/usr/games/gnm", 0xbfccbd08)    = -1 ENOENT (No such file or directory)
stat64("./gnm", 0xbfccbd08)             = -1 ENOENT (No such file or directory)
stat64("./gnm", 0xbfccbd08)             = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gnm", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("./gnm", 0xbfccbd08)             = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/nm", {st_mode=S_IFREG|0755, st_size=90488, ...}) = 0
access("/System/Links/Executables/nm", X_OK) = 0
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/usr/local/bin/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/gstrip", 0xbfccbd08)   = -1 ENOENT (No such file or directory)
stat64("/bin/gstrip", 0xbfccbd08)       = -1 ENOENT (No such file or directory)
stat64("/Programs/Xorg/6.8.2/bin/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/usr/games/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("./gstrip", 0xbfccbd08)          = -1 ENOENT (No such file or directory)
stat64("./gstrip", 0xbfccbd08)          = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/gstrip", 0xbfccbd08) = -1 ENOENT (No such file or directory)
stat64("./gstrip", 0xbfccbd08)          = -1 ENOENT (No such file or directory)
stat64("/System/Links/Executables/strip", {st_mode=S_IFREG|0755, st_size=228896, ...}) = 0
access("/System/Links/Executables/strip", X_OK) = 0
stat64("/System/Links/Executables/gcc", {st_mode=S_IFREG|0755, st_size=200792, ...}) = 0
access("/System/Links/Executables/gcc", X_OK) = 0
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
lstat64("/tmp/ccwd9tsm.c", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("/tmp/ccwd9tsm.c")               = 0
lstat64("/tmp/ccsVXawy.o", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("/tmp/ccsVXawy.o")               = 0
open("/tmp/ccc72aCK.ld", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fae000
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7fae000, 4096)                = 0
lstat64("/tmp/ccc72aCK.ld", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("/tmp/ccc72aCK.ld")              = 0
open("/tmp/ccAnM5IW.le", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fae000
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7fae000, 4096)                = 0
lstat64("/tmp/ccAnM5IW.le", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink("/tmp/ccAnM5IW.le")              = 0
lstat64(".libs/libgstbase-0.10.so.0.17.0", {st_mode=S_IFREG|0755, st_size=457923, ...}) = 0
unlink(".libs/libgstbase-0.10.so.0.17.0") = 0
exit_group(1)                           = ?

  reply	other threads:[~2008-08-09 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09 17:58 Jonas Karlsson
2008-08-09 20:26 ` Brian Dessent
2008-08-09 23:27   ` Jonas Karlsson [this message]
2008-08-10  1:58     ` Brian Dessent
2008-08-10  4:29       ` Jonas Karlsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.ufm7ewbmllys5b@localhost.localdomain \
    --to=jonka750@student.liu.se \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).