public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Can't run some apps with 4.5 built libraries
@ 2009-12-26  0:37 Patrick Horgan
  2009-12-26  1:33 ` Thomas Martitz
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Horgan @ 2009-12-26  0:37 UTC (permalink / raw)
  To: GCC-help

I'm very motivated and a bit technically adept, so anything I can do to 
help resolve this--I'm your guy.  After building gcc from trunk and 
installing under /usr/local, some apps won't run.  An example of this is 
firefox.  When I try to run it, dynamically linking against the libs in 
/usr/local/lib:

/usr/lib/firefox-3.5.7pre/firefox: error while loading shared libraries: 
libstdc++.so.6: failed to map segment from shared object: Permission denied

strace shows us:

open("/usr/local/lib/libstdc++.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\0\200\37\4\0004\0\0\0"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=4419480, ...}) = 0
mmap2(NULL, 939000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = -1 EACCES (Permission denied)
close(3)                                = 0

and the man page for mmap tells us that EACCES means:

       EACCES A file descriptor refers to a non-regular file.  Or  
MAP_PRIVATE
              was  requested,  but  fd is not open for reading.  Or 
MAP_SHARED
              was requested and PROT_WRITE is set,  but  fd  is  not  
open  in
              read/write (O_RDWR) mode.  Or PROT_WRITE is set, but the 
file is
              append-only.

fd is open for reading, MAP_SHARED not requested, and PROT_WRITE not 
requested, which only leaves A file descriptor refers to a non-regular file.

patrick@dell$ ls -l /usr/local/lib/libstdc++.so.6
lrwxrwxrwx 1 patrick patrick 19 2009-12-25 15:48 
/usr/local/lib/libstdc++.so.6 -> libstdc++.so.6.0.14*
ls -l /usr/local/lib/libstdc++.so.6.0.14
-rwxr-xr-x 1 patrick patrick 4419480 2009-12-25 15:48 
/usr/local/lib/libstdc++.so.6.0.14*

Making it a hard link instead of a soft link doesn't help.

hexdump -C libstdc++.so.6 | head
00000000  7f 45 4c 46 01 01 01 00  00 00 00 00 00 00 00 00  
|.ELF............|
00000010  03 00 03 00 01 00 00 00  80 1f 04 00 34 00 00 00  
|............4...|
00000020  80 3a 3f 00 00 00 00 00  34 00 20 00 07 00 28 00  |.:?.....4. 
....(.|
00000030  29 00 26 00 01 00 00 00  00 00 00 00 00 00 00 00  
|).&.............|
00000040  00 00 00 00 08 94 0d 00  08 94 0d 00 05 00 00 00  
|................|
00000050  00 10 00 00 01 00 00 00  48 95 0d 00 48 a5 0d 00  
|........H...H...|
00000060  48 a5 0d 00 e8 45 00 00  b0 ae 00 00 06 00 00 00  
|H....E..........|
00000070  00 10 00 00 02 00 00 00  78 c9 0d 00 78 d9 0d 00  
|........x...x...|
00000080  78 d9 0d 00 f0 00 00 00  f0 00 00 00 06 00 00 00  
|x...............|
00000090  04 00 00 00 07 00 00 00  48 95 0d 00 48 a5 0d 00  
|........H...H...|

If I remove /usr/local/libstdc++* then I have the same problem with 
libgcc* -- removing libgcc*  allows everything to start working again.

Please let me know if I need to send this to some other list, (is there 
a toolcom list?)

Patrick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can't run some apps with 4.5 built libraries
  2009-12-26  0:37 Can't run some apps with 4.5 built libraries Patrick Horgan
@ 2009-12-26  1:33 ` Thomas Martitz
  2009-12-26 22:29   ` Patrick Horgan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Martitz @ 2009-12-26  1:33 UTC (permalink / raw)
  To: gcc-help

You have already made a thread for that 2 days ago...Don't do that.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Can't run some apps with 4.5 built libraries
  2009-12-26  1:33 ` Thomas Martitz
@ 2009-12-26 22:29   ` Patrick Horgan
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Horgan @ 2009-12-26 22:29 UTC (permalink / raw)
  To: Thomas Martitz; +Cc: gcc-help

Thomas Martitz wrote:
> You have already made a thread for that 2 days ago...Don't do that.
>
Sorry.  I never saw it or any responses to it and got a bounce message.

Patrick

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-26  1:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-26  0:37 Can't run some apps with 4.5 built libraries Patrick Horgan
2009-12-26  1:33 ` Thomas Martitz
2009-12-26 22:29   ` Patrick Horgan

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).