Skip to content

tcl: Install sources#8153

Merged
scheibelp merged 3 commits intospack:developfrom
citibeth:efischer/180516-FixTclTk
Jun 8, 2018
Merged

tcl: Install sources#8153
scheibelp merged 3 commits intospack:developfrom
citibeth:efischer/180516-FixTclTk

Conversation

@citibeth
Copy link
Copy Markdown
Member

@citibeth citibeth commented May 16, 2018

This fixes a bug in the Tcl/Tk installation #8151. Previously, the recipe for tk would erroneously pick up the system-installed tcl.h file. This "worked" for newer systems that had TCL 8.6 installed. The bug was unmasked building on SLES 11, which comes with an older version of TCL.

Long story short, the tcl build references the original sources upon install, and the tk build requires the tcl sources. TCL sources were installed following the example of #4102. If the user installs with spack install --source, then the sources would be copied twice. This should not be a serious problem.

@junghans @davydden @tgamblin from #4083:

Do we need a global variant, which modifies the hash for no reason related to the artifact, or would it make sense to just make this an install option

Note that this is a case in which the presence of the source is structural, not an install option. If it were optional (it's not), then a +source variant would be warranted here.

*** In addition, a make install-headers was added, as per advice for TCL 8.6

@citibeth citibeth added bug Something isn't working update-package labels May 16, 2018
@citibeth citibeth requested a review from adamjstewart May 16, 2018 15:27
@citibeth citibeth mentioned this pull request May 16, 2018
15 tasks
@adamjstewart
Copy link
Copy Markdown
Member

Interesting. It looks like Homebrew solves this problem by combining both in the same package:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/tcl-tk.rb

I think I like this solution better, but let's wait for others to comment.

@citibeth
Copy link
Copy Markdown
Member Author

It looks like Homebrew solves this problem by combining both in the same package:

That solution leaves an obviously wrong tclConfig.sh file, in that it points to "source" directories that don't exist. My conclusion is: if TCL is going to put TCL_SRC directories in tclConfig.sh, then the source needs to be kept around.

Combining the builds means you require a lot of X11 stuff just to run TCL. Some people might not want that; for example, TCL-based web servers. That's probably by TCL and Tk were separate to begin with.

@citibeth
Copy link
Copy Markdown
Member Author

@adamjstewart Is any further review needed on this PR?

@citibeth
Copy link
Copy Markdown
Member Author

@adamjstewart ping

@adamjstewart
Copy link
Copy Markdown
Member

Is any further review needed on this PR?

Still waiting on others to comment on this PR. I don't know of any other packages that install their own source, so I'm hesitant to just merge it.

@citibeth
Copy link
Copy Markdown
Member Author

Still waiting on others to comment on this PR. I don't know of any other packages that install their own source, so I'm hesitant to just merge it.

@scheibelp @tgamblin @alalazo Can anyone else chime in on this?

@healther
Copy link
Copy Markdown
Contributor

Didn't we, at some point discuss, whether spack install should have a general option that installs the sources into prefix? I'm too unfamiliar with the history and potential legal reasons for why the sources aren't generally kept around, but there have been a number of times where I wished for such an option (which I'd want to default to True at least on our CI stuff)

@citibeth
Copy link
Copy Markdown
Member Author

citibeth commented May 22, 2018 via email

@healther
Copy link
Copy Markdown
Contributor

when you say "This PR uses its code" shouldn't that mean you just have to do a function call?

@citibeth
Copy link
Copy Markdown
Member Author

citibeth commented May 22, 2018 via email

@citibeth
Copy link
Copy Markdown
Member Author

@healther see #4102

@citibeth
Copy link
Copy Markdown
Member Author

@tgamblin @alalazo @scheibelp Can one of you please comment on this PR? @adamjstewart would like more eyes looking at it, due to the unusual nature of keeping sources around.

@KineticTheory
Copy link
Copy Markdown
Contributor

@citibeth Now that you are calling the install-headers make target, do you still need to copy all of the sources to the install location?

For the record, I'm in favor of this type of solution. IMHO, the primary task of spack is to provide a fully functioning installation without the need for extra arguments. If Tcl's source is needed in the installation directory to allow Tk to find/link properly, then the default recipe should install the sources (even if --source isn't requested).

@citibeth
Copy link
Copy Markdown
Member Author

citibeth commented Jun 6, 2018 via email

@scheibelp scheibelp merged commit 4a53942 into spack:develop Jun 8, 2018
@scheibelp
Copy link
Copy Markdown
Member

Thanks!

In general there may be a concern that the same problem comes up several times across several packages and it would create clutter if it were solved differently each time. I'm trying to help recognize patterns by recording strange behavior at https://github.com/spack/spack/wiki/Packaging-Special-Cases (the point being that if multiple packages start doing something then it will become apparent by viewing/updating that page).

@adamjstewart adamjstewart deleted the efischer/180516-FixTclTk branch June 8, 2018 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working update-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants