Opened 10 years ago

Last modified 9 years ago

#13032 closed enhancement

Add ccache as a standard spkg — at Version 29

Reported by: ohanar Owned by: GeorgSWeber
Priority: major Milestone: sage-5.6
Component: packages: optional Keywords: sd40.5
Cc: kini, robertwb, ppurka, jdemeyer Merged in:
Authors: R. Andrew Ohana Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by ohanar)

This is needed to eliminate the majority of the build time when switching between various branches in the git based workflow. It is also useful in the short run for dramatically speeding up the build process for many spkgs.

Installation:

Change History (30)

comment:1 Changed 10 years ago by ohanar

  • Description modified (diff)

Not yet ready, the build scripts still need to be modified to set CC and CXX once this is installed.

comment:2 Changed 10 years ago by kini

  • Cc kini added

comment:3 Changed 10 years ago by ohanar

  • Dependencies set to #13040
  • Keywords sd40.5 added

comment:4 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:5 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:6 Changed 10 years ago by ohanar

  • Description modified (diff)
  • Summary changed from Add ccache as a standard spkg to Add ccache and f90cache as standard spkgs

comment:7 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:8 Changed 10 years ago by ohanar

  • Dependencies changed from #13040 to #13040 #13044
  • Description modified (diff)

comment:9 Changed 10 years ago by ohanar

  • Status changed from new to needs_review

comment:10 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:11 Changed 10 years ago by ohanar

  • Cc robertwb added

comment:12 Changed 10 years ago by ppurka

  • Cc ppurka added

comment:13 follow-up: Changed 10 years ago by ppurka

Two general comments:

  1. We probably need to set the max cache size. On my system the default is 1G, which some people may dislike. It can be set using ccache -M <size>{G,M,K}, where the letters G, M, K can be used to specify the usual gigabytes, megabytes and kilobytes. This needs to be set only if CCACHE_DIR is empty, since the user may have his/her own ccache settings.
  2. This fact about the ccache size should be mentioned in the documentation, so that the user knows how much of disk space will be used.

comment:14 in reply to: ↑ 13 Changed 10 years ago by ohanar

Replying to ppurka:

Two general comments:

  1. We probably need to set the max cache size. On my system the default is 1G, which some people may dislike. It can be set using ccache -M <size>{G,M,K}, where the letters G, M, K can be used to specify the usual gigabytes, megabytes and kilobytes.

This is set in the spkg-install to 3G.

This needs to be set only if CCACHE_DIR is empty, since the user may have his/her own ccache settings.

  1. This fact about the ccache size should be mentioned in the documentation, so that the user knows how much of disk space will be used.

Both good points, I'll see about changing these.

comment:15 Changed 10 years ago by ohanar

  • Status changed from needs_review to needs_work

comment:16 Changed 10 years ago by ohanar

  • Status changed from needs_work to needs_review

comment:17 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:18 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:19 Changed 10 years ago by ohanar

  • Description modified (diff)

comment:20 Changed 10 years ago by ohanar

  • Dependencies #13040 #13044 deleted

comment:21 Changed 10 years ago by ohanar

  • Cc jdemeyer added
  • Description modified (diff)
  • Summary changed from Add ccache and f90cache as standard spkgs to Add ccache as a standard spkg
  1. The f90cache source code does not include a copy of its license. Since it is based off of and old version of ccache, it must be GPL licensed, so it is in violation of GPL license. For this reason, I'm going to remove it from this ticket.
  2. ccache depends on zlib and includes its own copy to use if it can't find one. I've updated the spkg and build scripts to ensure that it uses our copy.

Changed 10 years ago by ohanar

apply to scripts repo

comment:22 follow-up: Changed 10 years ago by kini

Have you reported the f90cache licensing problem upstream, or asked for a special dispensation?

comment:23 in reply to: ↑ 22 Changed 10 years ago by ohanar

Replying to kini:

Have you reported the f90cache licensing problem upstream, or asked for a special dispensation?

I just reported the problem upstream. A special dispensation is irrelevant, it must be GPL since it derivative of ccache-2.4, which is licensed under GPL-2+, so it is an issue with violating the GPL.

Regardless, I think it would be best to place a f90cache spkg in a different ticket.

comment:24 follow-up: Changed 10 years ago by kini

AFAIK the licensing classification of software applies not to the body of its source code in general but to a particular act of distribution of that body of source code (though open source projects often offer public downloads of their source code with the understanding that each download of the code is taken to be governed by the license specified in the COPYING file and referred to as the license "of the software" itself). By "special dispensation" I meant the obtainment of a copy of the source code from the copyright holder under a one-time transferral stipulated to be under GPLv2+, even while the public download link was perhaps not governed by GPLv2+.

comment:25 in reply to: ↑ 24 Changed 10 years ago by jdemeyer

Replying to kini:

AFAIK the licensing classification of software applies not to the body of its source code in general but to a particular act of distribution of that body of source code (though open source projects often offer public downloads of their source code with the understanding that each download of the code is taken to be governed by the license specified in the COPYING file and referred to as the license "of the software" itself). By "special dispensation" I meant the obtainment of a copy of the source code from the copyright holder under a one-time transferral stipulated to be under GPLv2+, even while the public download link was perhaps not governed by GPLv2+.

I don't understand what you're trying to say here. The GPL talks both about running the code (I guess this is what you refer to when talking about "the body of its source code in general") and distributing the code. Running and distributing are two essentially independent things, but both governed by the same license.

comment:26 follow-up: Changed 10 years ago by jdemeyer

In the doc patch: the command

sage -sh ccache --max-size=SIZE

surely isn't correct. Either you mean "first run ./sage --sh, then ccache --max-size=SIZE", or you mean "sage --sh -c "ccache --max-size=SIZE"" or you mean "sage --ccache --max-size=SIZE" with adding a --ccache option to spkg/bin/sage.

comment:27 Changed 10 years ago by kini

I mean that when you say "Software X is under the GPL", what you actually mean is "when I obtained software X, I did so under the GPL". If I am the copyright holder to software X, there is no contradiction in me giving it to person A under the GPL and person B under the BSD license. Similarly, if I'm the copyright holder of f90cache, there's no contradiction if I give f90cache to J. Random Hacker under an ill-specified non-GPL license, but at the same time give f90cache to ohanar under GPLv2+.

Of course, it turns out I am actually contractually forbidden by the ccache authors from licensing f90cache to J. Random Hacker under this ill-specified non-GPL license, because f90cache is a derivative work of a version of ccache which I myself obtained under the GPLv2+. But there's nothing wrong with my simultaneous licensing of f90cache to ohanar under GPLv2+. At least, that's my understanding of it, based on what guys on #fsf told me a long time ago - IANAL, needless to say :)

comment:28 in reply to: ↑ 26 Changed 10 years ago by ohanar

Replying to jdemeyer:

In the doc patch: the command

sage -sh ccache --max-size=SIZE

surely isn't correct.

You are right, I could have sworn that worked. Updating the patch now...

comment:29 Changed 10 years ago by ohanar

  • Description modified (diff)

Updated to 3.1.8 and removed fuzz. Otherwise, everything still works fine...

Note: See TracTickets for help on using tickets.