For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > November 2005 > Re: segmentation fault when shared object using STL is statically









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: segmentation fault when shared object using STL is statically
Paul Pluzhnikov

2005-11-24, 6:58 pm

"Nilesh" <nileshg@gmail.com> writes:

> I am using libstdc++.a that comes with gcc 3.3.2 installables from
> sunfreeware.com and have notdone recompile with -fPIC . If i use -share
> instead og -G it does give me lots of location errors.:-)


Presumably: "Text relocation remains" errors.
They are likely the direct cause of your crash.

> I will
> recompile with -fPIC and checkl, do you know if there is such alrteady
> compiled library at gun.org?


I don't.

> I guess, are you sure, per GPL text I am not changing any stdc++ code
> and am using using as is, and thats why I am not liable to make my so
> GPL.


IANAL, but I believe your argument above is not valid.

From http://www.gnu.org/copyleft/lesser.html:

For example, if you distribute copies of the library, whether
gratis or for a fee, you must give the recipients all the
rights that we gave you. You must make sure that they, too,
receive or can get the source code. If you link other code
NB> with the library, you must provide complete object files to the
recipients, so that they can relink them with the library after
making changes to the library and recompiling it. And you must
show them these terms so they know their rights.
....
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being
compiled or linked with it, is called a "work that uses the
Library". Such a work, in isolation, is not a derivative work
of the Library, and therefore falls outside the scope of this
License.

However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library
(because it contains portions of the Library), rather than
NB> a "work that uses the library". The executable is therefore
covered by this License. Section 6 states terms for distribution
of such executables.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com