-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define conventions for shared / static builds #2380
Comments
This is a continuation of #2478... I think we're getting ahead of ourselves here. Let's go back to use cases, of which I see two:
Case (1) should be the default. But case (2) should be as easy as possible for Cray users to turn on, and to use consistently. Are there any other use cases here? If not, we need only one variant, which I would call With this in place, there should be a way for Cray users to put [Many users THINK they want static linking because it's easier to |
what about p.s. I don't have a strong opinion on how to call a single variant to control shared/static, namely |
@citibeth If I understand your proposal correctly, i.e.:
then I fully agree with it. I don't see why we may want to use: variant('static', default=False) instead of variant('shared', default=True) as there are 32 package that now adopt the opposite convention vs. 0 that adopt this one, but if people like the renaming I won't oppose. If you think of an additional
Right now I think it doesn't work like that. Slightly ot: does anybody know any architecture which enters in "Spack range" and don't permit pic code? |
No, pic is off for static. You only need it if you plan to link with
dynamic libs.
…On Dec 6, 2016 5:00 AM, "Massimiliano Culpo" ***@***.***> wrote:
@citibeth <https://github.com/citibeth> If I understand your proposal
correctly, i.e.:
- there's only one variant that controls shared/static
- if in shared mode pic is assumed if you can only build static
libraries
then I fully agree with it.
I don't see why we may want to use:
variant('static', default=False)
instead of
variant('shared', default=True)
as there are 32 package that now adopt the opposite convention vs. 0 that
adopt this one, but if people like the renaming I won't oppose.
If you think of an additional pic variant on top of the one above, then I
don't agree because of either +shared~pic or ~static~pic.
@davydden <https://github.com/davydden>
what about pic, i presume it's on by default on all static libs, right?
Right now I think it doesn't work like that. Slightly ot: does anybody
know any architecture which enters in "Spack range" and don't permit pic
code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2380 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd-87u7RHalk3CDLXthslehw_YzH7ks5rFTI4gaJpZM4K5gYF>
.
|
Sorry, I don't get to what part of the comment you are replying... Anyhow, I am fine as long as we keep only one variant. If we want to go with
If we want to maintain the current convention just substitute |
h
I don't see why we may want to use:
variant('static', default=False)
instead of
variant('shared', default=True)
In 1990, static libs were standard and people were just beginning to add
shared libs to their builds. '+shared' made sense from that point of
view. Today shared libs are standard, so it makes sense to acknowledge
that by using '+static' for the nonstandard build.
Right now I think it doesn't work like that.
That is right. Under my scheme, pic would only be used if you don't ask
for '+static' and the build is unable to make a shared lib. So instead it
will make a static lib that can be linked with shared. It codifies and
simplifies the way '+pic' is currently used.
|
It looks like we all agree to use a single variant, so it only a matter of taste how to name it: shared or static. @tgamblin ping |
Sorry, I disagree after a night's sleep; see #2492
…On Tue, Dec 6, 2016 at 6:41 AM, Denis Davydov ***@***.***> wrote:
It looks like we all agree to use a single variant, so it only a matter of
taste how to name it: shared or static. @tgamblin
<https://github.com/tgamblin> ping
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2380 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd-ddty8EuHCTq7RfQdVoCJ0UTKFjks5rFUnfgaJpZM4K5gYF>
.
|
So... we've had a lot of talk about Universal Variants (#2492) and gneralized Variant Forwarding (#2594), and recurring issues with R. But putting all that aside... I think #2644 will get us what we need here in a simple, understandable way. If we can also get #2386 merged, then the final proposal looks like this:
Thoughts? Once #2386 is merged, this is eminently doable. Or should we go ahead without #2386 (@tgamblin)? I've heard that Cray requires static linking; are there any Cray users that could review this proposal? One thing this proposal doesn't really support well is people who want to use static linking for part of their build and shared for other parts; for example, build common stuff shared, but app-specific stuff static. Is this something people want to do, that we should support? |
This discussion is now obsolete, closing. |
subj. Roughly that
+shared
enables shared libs, whereas~shared
implies that static-only libs will be built.Most likely we cant really enforce
+shared
not to have static libs, as some packages may build them anyway.from @alalazo
While here, also document
+pic
variant for static libs only and that+pic+shared
should throw an error.The text was updated successfully, but these errors were encountered: