public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: static version of libgcc_s.so.1...
@ 2004-04-20  7:38 Venkatakrishnan, V
  2004-04-20 11:50 ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Venkatakrishnan, V @ 2004-04-20  7:38 UTC (permalink / raw)
  To: 'Ian Lance Taylor'; +Cc: gcc-help

Ian,
	I'm doing something like
g++ myapp.C -L/path1 -L/path2 -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
-lmySharedLib -o myApp
	Isn't this what you've mentioned?

	and this still has a dependency on libgcc_s.so.1 as well as
libstdc++.so.4.


	

-----Original Message-----
From: Ian Lance Taylor [mailto:ian@wasabisystems.com]
Sent: Tuesday, April 20, 2004 12:41 PM
To: Venkatakrishnan, V
Cc: gcc-help@gcc.gnu.org
Subject: Re: static version of libgcc_s.so.1...


"Venkatakrishnan, V" <v.venkatakrishnan@sdi.usa.xerox.com> writes:

> 	I'm running into this issue where an application when ported to a
> target machine NOT having gcc installed, does NOT run and throws the
> following error...
> 
> ld.so.1: MyApp: fatal: libstdc++.so.4: open failed: No such file or
> directory or 
> ld.so.1: MyApp: fatal: libgcc_s.so.4: open failed: No such file or
directory
> 
> 	now, I did try to compile it using libstdc++.a to have that library
> statically linked to the application, but similarly I CANNOT find
> libgcc_s.a.  Where can I get this from???

Use -static-libgcc when you link.  The file you want is libgcc.a.

Ian

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

* Re: static version of libgcc_s.so.1...
  2004-04-20  7:38 static version of libgcc_s.so.1 Venkatakrishnan, V
@ 2004-04-20 11:50 ` Ian Lance Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2004-04-20 11:50 UTC (permalink / raw)
  To: Venkatakrishnan, V; +Cc: gcc-help

"Venkatakrishnan, V" <v.venkatakrishnan@sdi.usa.xerox.com> writes:

> Ian,
> 	I'm doing something like
> g++ myapp.C -L/path1 -L/path2 -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
> -lmySharedLib -o myApp
> 	Isn't this what you've mentioned?
> 
> 	and this still has a dependency on libgcc_s.so.1 as well as
> libstdc++.so.4.

No, there is an option "-static-libgcc".  See the docs.

Ian

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

* RE: static version of libgcc_s.so.1...
@ 2004-04-20 16:48 lrtaylor
  0 siblings, 0 replies; 5+ messages in thread
From: lrtaylor @ 2004-04-20 16:48 UTC (permalink / raw)
  To: v.venkatakrishnan, ian; +Cc: gcc-help

No, using -static-libgcc is not the same as what you have done below.
Try this:

g++ myapp.C -L/path1 -L/path2 -lmySharedLib -o myApp -static-libgcc
-static

Cheers,
Lyle

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Venkatakrishnan, V
Sent: Tuesday, April 20, 2004 1:39 AM
To: 'Ian Lance Taylor'
Cc: gcc-help@gcc.gnu.org
Subject: RE: static version of libgcc_s.so.1...


Ian,
	I'm doing something like
g++ myapp.C -L/path1 -L/path2 -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
-lmySharedLib -o myApp
	Isn't this what you've mentioned?

	and this still has a dependency on libgcc_s.so.1 as well as
libstdc++.so.4.


	

-----Original Message-----
From: Ian Lance Taylor [mailto:ian@wasabisystems.com]
Sent: Tuesday, April 20, 2004 12:41 PM
To: Venkatakrishnan, V
Cc: gcc-help@gcc.gnu.org
Subject: Re: static version of libgcc_s.so.1...


"Venkatakrishnan, V" <v.venkatakrishnan@sdi.usa.xerox.com> writes:

> 	I'm running into this issue where an application when ported to
a
> target machine NOT having gcc installed, does NOT run and throws the
> following error...
> 
> ld.so.1: MyApp: fatal: libstdc++.so.4: open failed: No such file or
> directory or 
> ld.so.1: MyApp: fatal: libgcc_s.so.4: open failed: No such file or
directory
> 
> 	now, I did try to compile it using libstdc++.a to have that
library
> statically linked to the application, but similarly I CANNOT find
> libgcc_s.a.  Where can I get this from???

Use -static-libgcc when you link.  The file you want is libgcc.a.

Ian

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

* Re: static version of libgcc_s.so.1...
  2004-04-20  7:05 Venkatakrishnan, V
@ 2004-04-20  7:11 ` Ian Lance Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2004-04-20  7:11 UTC (permalink / raw)
  To: Venkatakrishnan, V; +Cc: gcc-help

"Venkatakrishnan, V" <v.venkatakrishnan@sdi.usa.xerox.com> writes:

> 	I'm running into this issue where an application when ported to a
> target machine NOT having gcc installed, does NOT run and throws the
> following error...
> 
> ld.so.1: MyApp: fatal: libstdc++.so.4: open failed: No such file or
> directory or 
> ld.so.1: MyApp: fatal: libgcc_s.so.4: open failed: No such file or directory
> 
> 	now, I did try to compile it using libstdc++.a to have that library
> statically linked to the application, but similarly I CANNOT find
> libgcc_s.a.  Where can I get this from???

Use -static-libgcc when you link.  The file you want is libgcc.a.

Ian

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

* static version of libgcc_s.so.1...
@ 2004-04-20  7:05 Venkatakrishnan, V
  2004-04-20  7:11 ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Venkatakrishnan, V @ 2004-04-20  7:05 UTC (permalink / raw)
  To: gcc-help

Hi,
	I'm running into this issue where an application when ported to a
target machine NOT having gcc installed, does NOT run and throws the
following error...

ld.so.1: MyApp: fatal: libstdc++.so.4: open failed: No such file or
directory or 
ld.so.1: MyApp: fatal: libgcc_s.so.4: open failed: No such file or directory

	now, I did try to compile it using libstdc++.a to have that library
statically linked to the application, but similarly I CANNOT find
libgcc_s.a.  Where can I get this from???
	I believe gccv3.3.1 does support this according to
http://www.stanford.edu/dept/itss/infrastructure/announce/pubsw/Sep2003/gcc3
31.html

	Please let me know what I can do.

Thanks,
Venky

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

end of thread, other threads:[~2004-04-20 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20  7:38 static version of libgcc_s.so.1 Venkatakrishnan, V
2004-04-20 11:50 ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2004-04-20 16:48 lrtaylor
2004-04-20  7:05 Venkatakrishnan, V
2004-04-20  7:11 ` Ian Lance Taylor

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