public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Seeking Help with GCC for SunOS 2.8
@ 2002-12-23 22:12 Steven Teeter
  2002-12-23 22:49 ` LLeweLLyn Reese
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Teeter @ 2002-12-23 22:12 UTC (permalink / raw)
  To: gcc-help


Hello GCC Help.  I'm hoping you can advise me on a problem resulting from the upgrade of a Sun E450 from SunOS 2.6 to SunOS 2.8.  

I have a C application that compiled and executed successfully on SunOS 2.6 using gcc 2.95.3 and make 3.79.1.  The machine was recently upgraded to SunOS 2.8, obliterating all traces of the former system and GNU libraries.

In the new SunOS 2.8 environment, I installed gcc 2.95.3 and make 3.80.  The application compiles without complaint (see output below), but the resulting executable is much smaller than the SunOS 2.6 version.  The SunOS 2.8 executable ssod.so7 is 117556 bytes, while the SunOS 2.6 executable was 781396 bytes.  This suggests something is missing.

When I attempt to execute the SunOS 2.8 executable ssod.so7, it terminates instantly:

# ./bin/ssod.so7
ld.so.1: ./bin/ssod.so7: fatal: libstdc++.so.2.10.0: open failed: No such file or directory
Killed

However, the stdc++ library seems to be where it belongs:

# ls -l /usr/local/lib/libstd*
-rw-r--r--   1 bin      bin      2222756 Mar 16  2001 /usr/local/lib/libstdc++.a.2.10.0
-r-xr-xr-x   1 bin      bin      2232464 Mar 16  2001 /usr/local/lib/libstdc++.so.2.10.0
# ls -l /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstd*
lrwxrwxrwx   1 root     other         27 Dec 20 13:13 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstdc++.a -> ../../../libstdc++.a.2.10.0
lrwxrwxrwx   1 root     other         28 Dec 20 13:13 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstdc++.so -> ../../../libstdc++.so.2.10.0

Any suggestions will be appreciated.  I can provide source code or other information if it is needed.  Many thanks.

Steven Teeter
Director, Information Technology
Symyx Technologies, Inc.
steeter@symyx.com
408-764-2067


Make output under SunOS 2.8, gcc 2.95.3, and make 3.80
-----------------------------------------------------------------------
# make
*** Building retail ssod module
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/messages.o ../common/messages.cpp
[ ssod2pam.cpp -> obj/i386/ssod2pam.o ]
gcc   -Dsolaris -I /usr/include     -c -o obj/i386/ssod2pam.o ssod2pam.cpp
[ ssod.cpp -> obj/i386/ssod.o ]
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/ssod.o ssod.cpp 
[ sso_pakt.cpp -> obj/i386/sso_pakt.o ]
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/sso_pakt.o sso_pakt.cpp
[ password.cpp -> obj/i386/password.o ]
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/password.o password.cpp
[ dimonfnc.cpp -> obj/i386/dimonfnc.o ]
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/dimonfnc.o dimonfnc.cpp
[ crypto.cpp -> obj/i386/crypto.o ]
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/crypto.o crypto.cpp
[ ../common/sha1.cpp -> obj/i386/sha1.o ]
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/sha1.o ../common/sha1.cpp
gcc   -Dsolaris -I /usr/include    -c -o obj/i386/rotlr.o ../common/rotlr.cpp
[ obj/i386/messages.o -> bin/ssod.so7 ]
gcc  -o bin/ssod.so7 obj/i386/messages.o obj/i386/ssod2pam.o obj/i386/ssod.o obj/i386/sso_pakt.o obj/i386/password.o obj/i386/dimonfnc.o obj/i386/crypto.o obj/i386/sha1.o obj/i386/rotlr.o -lsocket -lnsl -lpam -L/usr/local/lib -lstdc++ -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3 -lgcc -L../tripldes -l3des  -Xlinker -dy  -Xlinker -B -Xlinker dynamic -lgcc -lnsl 
#





=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. that may be confidential, 
proprietary, copyrighted, privileged and/or protected work product, 
and is meant solely for the intended recipient. If you are not the 
intended recipient, and have received this message in error, please
contact the sender immediately, permanently delete the original and 
any copies of this email and any attachments thereto.

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

* Re: Seeking Help with GCC for SunOS 2.8
  2002-12-23 22:12 Seeking Help with GCC for SunOS 2.8 Steven Teeter
@ 2002-12-23 22:49 ` LLeweLLyn Reese
  0 siblings, 0 replies; 2+ messages in thread
From: LLeweLLyn Reese @ 2002-12-23 22:49 UTC (permalink / raw)
  To: Steven Teeter; +Cc: gcc-help

"Steven Teeter" <steeter@symyx.com> writes:

> Hello GCC Help.  I'm hoping you can advise me on a problem resulting from the upgrade of a Sun E450 from SunOS 2.6 to SunOS 2.8.  
> 
> I have a C application that compiled and executed successfully on SunOS 2.6 using gcc 2.95.3 and make 3.79.1.  The machine was recently upgraded to SunOS 2.8, obliterating all traces of the former system and GNU libraries.
> 
> In the new SunOS 2.8 environment, I installed gcc 2.95.3 and make 3.80.  The application compiles without complaint (see output below), but the resulting executable is much smaller than the SunOS 2.6 version.  The SunOS 2.8 executable ssod.so7 is 117556 bytes, while the SunOS 2.6 executable was 781396 bytes.  This suggests something is missing.
> 
> When I attempt to execute the SunOS 2.8 executable ssod.so7, it terminates instantly:
> 
> # ./bin/ssod.so7
> ld.so.1: ./bin/ssod.so7: fatal: libstdc++.so.2.10.0: open failed: No such file or directory
> Killed

Ah. This is what is missing. The gcc you had under 2.6 was probably
configured to link staticly (this including everything used from
libstdc++) while the gcc you installed under 2.8 was probably
configured to link dynamicly. Add -v to your CFLAGS and gcc will dump
some extra info that should help you verify this assumption.

> 
> However, the stdc++ library seems to be where it belongs:
> 
> # ls -l /usr/local/lib/libstd*
> -rw-r--r--   1 bin      bin      2222756 Mar 16  2001 /usr/local/lib/libstdc++.a.2.10.0
> -r-xr-xr-x   1 bin      bin      2232464 Mar 16  2001 /usr/local/lib/libstdc++.so.2.10.0
> # ls -l /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstd*
> lrwxrwxrwx   1 root     other         27 Dec 20 13:13 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstdc++.a -> ../../../libstdc++.a.2.10.0
> lrwxrwxrwx   1 root     other         28 Dec 20 13:13 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/libstdc++.so -> ../../../libstdc++.so.2.10.0
> 
> Any suggestions will be appreciated.  I can provide source code or
> other information if it is needed.  Many thanks.

It's been a while since I used solaris, but ISTR that /usr/local/lib
is not searched for dynamic libs by default. That is, your solaris
install probably isn't configured to look there for libstdc++.

One fix is to set LD_LBRIARY_PATH to include /usr/local/lib :

$export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

or in csh:

>set LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}:/usr/local/lib

before running the program.

An alternative is recompile the program with -static.

Finally, read 'man ld.so.1' . It likely contains something I've forgotten.

[snip]

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

end of thread, other threads:[~2002-12-23 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23 22:12 Seeking Help with GCC for SunOS 2.8 Steven Teeter
2002-12-23 22:49 ` LLeweLLyn Reese

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