bug using gcc and LD_LIBRARY_PATH for solaris
Afzal, Naeem M
naeem.m.afzal@intel.com
Tue Apr 25 14:24:00 GMT 2000
Description of bug:
I have compiler installed on one machine (solarisbuild) and on
another machine (squirtle) I am trying to using that gcc by mount the
usr/local from solarisbuild to /mnt1 on squirtle. There is no compiler
installed locally on squirtle.
I set
GCC_EXEC_PREFIX=/mnt1
LD_LIBRARY_PATH=/usr/local:/mnt1/lib:/mnt1/sparc-sun-solaris2.7/2.95.2/lib
and try to compile the x.c file, which jut a hello world program to
see if I can compile with gcc. Program never returns (sleep). I did truss on
the gcc and saw that the gcc is trying to access libraries in a path that
does not exist and seems like see is not parsing the path correctly and
passing it to access call.
.......
access("/mnt1sparc-sun-solaris2.7/2.95.2/specs", 4) Err#2 ENOENT
......
Seems like a bug to me, as when I truss ls command, it goes to the
right library and returns ok. I have tried doing like specifying /mnt1/, it
did not make any difference.
Naeem Afzal
Intel Corp. Mountain View CA
=======================================================
Here is the supporting info:
Squirtle# which gcc
/mnt1/bin/gcc
Squirtle# mount |grep mnt1
/mnt1 on solarisbuild:/usr/local read/write/setuid/remote on Tue Apr
25 20:04:52 2000
Squirtle# uname -a
SunOS Squirtle 5.7 Generic_106541-02 sun4u sparc SUNW,Ultra-5_10
Squirtle# gcc -v
Using builtin specs.
gcc version 2.95.2 19991024 (release)
Squirtle# env
HOME=/
PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/openwin/bin:/mnt/bin:
/mnt1/bin:.
LOGNAME=root
HZ=100
TERM=xterm
TZ=US/Pacific
SHELL=/bin/csh
MAIL=/var/mail/root
LANG=C
PWD=/
USER=root
MANPATH=/usr/share/man:/usr/local/samba/man:/ixsdk/usr/local/man
GCC_EXEC_PREFIX=/mnt1
LD_LIBRARY_PATH=/usr/local:/mnt1/lib:/mnt1/sparc-sun-solaris2.7/2.95.2/lib
DISPLAY=10.3.31.61:0.0
WINDOW_TERMIOS=
TERMCAP=sun-cmd:te=\E[>4h:ti=\E[>4l:tc=sun:
WINDOWID=29360141
Squirtle#
Squirtle# truss gcc x.c
execve("/mnt1/bin/gcc", 0xFFBEFD34, 0xFFBEFD40) argc = 2
open("/dev/zero", O_RDONLY) = 3
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE,
3, 0) = 0xFF3A0000
open("/usr/local/libc.so.1", O_RDONLY) Err#2 ENOENT
open("/mnt1/lib/libc.so.1", O_RDONLY) Err#2 ENOENT
open("/mnt1/sparc-sun-solaris2.7/2.95.2/lib/libc.so.1", O_RDONLY)
Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY) = 4
fstat(4, 0xFFBEF8CC) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0xFF390000
mmap(0x00000000, 761856, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0xFF280000
munmap(0xFF324000, 57344) = 0
mmap(0xFF332000, 25540, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 4, 663552) = 0xFF332000
close(4) = 0
open("/usr/local/libdl.so.1", O_RDONLY) Err#2 ENOENT
open("/mnt1/lib/libdl.so.1", O_RDONLY) Err#2 ENOENT
open("/mnt1/sparc-sun-solaris2.7/2.95.2/lib/libdl.so.1", O_RDONLY)
Err#2 ENOENT
open("/usr/lib/libdl.so.1", O_RDONLY) = 4
fstat(4, 0xFFBEF8CC) = 0
mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED,
4, 0) = 0xFF390000
close(4) = 0
open("/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1", O_RDONLY) =
4
fstat(4, 0xFFBEF6AC) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0xFF380000
mmap(0x00000000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0xFF370000
close(4) = 0
close(3) = 0
munmap(0xFF380000, 8192) = 0
sigaction(SIGINT, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGINT, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGHUP, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGHUP, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGTERM, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGTERM, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGPIPE, 0xFFBEFB98, 0xFFBEFC18) = 0
sigaction(SIGPIPE, 0xFFBEFB98, 0xFFBEFC18) = 0
brk(0x00034058) = 0
brk(0x00036058) = 0
brk(0x00036058) = 0
brk(0x00038058) = 0
brk(0x00038058) = 0
brk(0x0003A058) = 0
access("x.c", 4) = 0
access("x.c", 4) = 0
access("/mnt1sparc-sun-solaris2.7/2.95.2/specs", 4) Err#2 ENOENT
access("/mnt1specs", 4) Err#2 ENOENT
access("/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs",
4) Err#2 ENOENT
access("/usr/lib/gcc/sparc-sun-solaris2.7/2.95.2/specs", 4) Err#2
ENOENT
access("/usr/local/sparc-sun-solaris2.7/lib/sparc-sun-solaris2.7/2.95.2/spec
s", 4) Err#2 ENOENT
access("/usr/local/sparc-sun-solaris2.7/lib/specs", 4) Err#2 ENOENT
access("/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/specs", 4) Err#2
ENOENT
access("/var/tmp/", 7) = 0
getpid() = 29035 [29034]
open("/var/tmp/ccf3mWcK.i", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
close(3) = 0
access("/mnt1sparc-sun-solaris2.7/2.95.2/cpp", 1) Err#2 ENOENT
access("/mnt1cpp", 1) Err#2 ENOENT
access("/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/cpp", 1)
Err#2 ENOENT
access("/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/cpp", 1) Err#2
ENOENT
access("/usr/lib/gcc/sparc-sun-solaris2.7/2.95.2/cpp", 1) Err#2
ENOENT
access("/usr/lib/gcc/sparc-sun-solaris2.7/cpp", 1) Err#2 ENOENT
access("/usr/local/sparc-sun-solaris2.7/bin/sparc-sun-solaris2.7/2.95.2/cpp"
, 1) Err#2 ENOENT
access("/usr/local/sparc-sun-solaris2.7/bin/cpp", 1) Err#2 ENOENT
access("/usr/ccs/bin/sparc-sun-solaris2.7/2.95.2/cpp", 1) Err#2
ENOENT
access("/usr/ccs/bin/cpp", 1) Err#2 ENOENT
vfork() = 29036
wait() (sleeping...)
^CSquirtle#
More information about the Gcc-bugs
mailing list